Enum Display

  • All Implemented Interfaces:
    Serializable, Comparable<Display>, Key

    public enum Display
    extends Enum<Display>
    implements Key
    Enumerates the property sets whether an element is treated as a block or inline element and the layout used for its children.
    Author:
    Andrea "Stock" Stocchero
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      BLOCK
      The element generates a block element box, generating line breaks both before and after the element when in the normal flow.
      FLEX
      The element behaves like a block element and lays out its content according to the flexbox model.
      INITIAL
      Uses the initial value.
      INLINE
      The element generates one or more inline element boxes that do not generate line breaks before or after themselves.
      In normal flow, the next element will be on the same line if there is space
      INLINE_BLOCK
      The element generates a block element box that will be flowed with surrounding content as if it were a single inline box (behaving much like a replaced element would).
      INLINE_FLEX
      The element behaves like an inline element and lays out its content according to the flexbox model.
      INLINE_TABLE
      The inline-table value does not have a direct mapping in HTML.
      It behaves like an HTML <table> element, but as an inline box, rather than a block-level box.
      LIST_ITEM
      The element generates a block box for the content and a separate list-item inline box.
      NONE
      Turns off the display of an element so that it has no effect on layout (the document is rendered as though the element did not exist).
      All descendant elements also have their display turned off.
      RUN_IN
      Run-in elements act like inlines or blocks, depending on the surrounding elements.
      That is: If the run-in box contains a block box, same as block.
      If a block box follows the run-in box, the run-in box becomes the first inline box of the block box.
      If an inline box follows, the run-in box becomes a block box.
    • Enum Constant Detail

      • NONE

        public static final Display NONE
        Turns off the display of an element so that it has no effect on layout (the document is rendered as though the element did not exist).
        All descendant elements also have their display turned off.
      • BLOCK

        public static final Display BLOCK
        The element generates a block element box, generating line breaks both before and after the element when in the normal flow.
      • INLINE

        public static final Display INLINE
        The element generates one or more inline element boxes that do not generate line breaks before or after themselves.
        In normal flow, the next element will be on the same line if there is space
      • INLINE_BLOCK

        public static final Display INLINE_BLOCK
        The element generates a block element box that will be flowed with surrounding content as if it were a single inline box (behaving much like a replaced element would).
      • INLINE_TABLE

        public static final Display INLINE_TABLE
        The inline-table value does not have a direct mapping in HTML.
        It behaves like an HTML <table> element, but as an inline box, rather than a block-level box. Inside the table box is a block-level context.
      • LIST_ITEM

        public static final Display LIST_ITEM
        The element generates a block box for the content and a separate list-item inline box.
      • RUN_IN

        public static final Display RUN_IN
        Run-in elements act like inlines or blocks, depending on the surrounding elements.
        That is: If the run-in box contains a block box, same as block.
        If a block box follows the run-in box, the run-in box becomes the first inline box of the block box.
        If an inline box follows, the run-in box becomes a block box.
      • INITIAL

        public static final Display INITIAL
        Uses the initial value.
      • FLEX

        public static final Display FLEX
        The element behaves like a block element and lays out its content according to the flexbox model.
      • INLINE_FLEX

        public static final Display INLINE_FLEX
        The element behaves like an inline element and lays out its content according to the flexbox model.
    • Method Detail

      • values

        public static Display[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (Display c : Display.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static Display valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null
      • value

        public String value()
        Description copied from interface: Key
        Returns the name value of property
        Specified by:
        value in interface Key
        Returns:
        the name value of property