Class DocType

java.lang.Object
overit.geocall.basic.ui.DocType
All Implemented Interfaces:
Serializable

public class DocType extends Object implements Serializable
This class implements the object which consist of the instruction, given to the web browser, about what version of HTML the page is written in. It must be the first line of the html page.
See Also:
  • Field Details

    • HTML

      public static final DocType HTML
      Doctype created with the string declaration for HTML 5
    • HTML401STRICT

      public static final DocType HTML401STRICT
      Doctype created with the string declaration for HTML 4.01 Strict.
      This declaration contains all HTML elements and attributes, but does not include presentational or deprecated elements (like font). Framesets are not allowed.
    • HTML401TRANSITIONAL

      public static final DocType HTML401TRANSITIONAL
      Doctype created with the string declaration for TML 4.01 Transitional.
      This declaration contains all HTML elements and attributes, including presentational and deprecated elements (like font). Framesets are not allowed.
    • QUIRKS

      @Deprecated public static final DocType QUIRKS
      Deprecated.
      this is not supported anymore
      Doctype created to manage the quirks mode.
      This mode refers to a technique used by some web browsers to maintain backward compatibility with web pages designed for Internet Explorer 5 and earlier, instead of strictly complying with W3C standards.
    • _nick

      protected String _nick
    • _declaration

      protected String _declaration
    • _quirksMode

      protected boolean _quirksMode
  • Constructor Details

    • DocType

      public DocType(String nick, String declaration, boolean quirksMode)
      Creates a DocType
      Parameters:
      nick - The string used to identify the DocType
      declaration - The declaration string
      quirksMode - Determine if the DocType is for quirks mode
  • Method Details

    • getInstance

      public static DocType getInstance(String nick)
      Returns the instance of DocType that corresponds to the name passed as parameter; if the name is null or an empty string, it is used, if present, the one set in the configuration file of the application (PropertiesUI.DOC_TYPE)
      Parameters:
      nick - The name used to identify the DocType
      Returns:
      The instance of DocType that corresponds to the name passed as parameter or the name set in the configuration file. If the name does not have a match, it will be returned the QUIRKS
    • getDeclaration

      public String getDeclaration()
      Returns the DocType declaration string
      Returns:
      The DocType declaration string
    • isQuirksMode

      public boolean isQuirksMode()
      Checks if the DocType is for quirks mode
      Returns:
      true if the DocType is for quirks mode, false otherwise