Enum Class Display

java.lang.Object
java.lang.Enum<Display>
com.oorian.css.Display
All Implemented Interfaces:
Serializable, Comparable<Display>, Constable

public enum Display extends Enum<Display>
CSS display property values for element rendering behavior.

The display property specifies how an element is displayed. It determines whether an element is treated as a block, inline, table, flex container, grid container, or other layout type.

Common Values:

  • BLOCK - Element starts on a new line and takes full width
  • INLINE - Element flows with text, no line breaks
  • FLEX - Element becomes a flex container
  • GRID - Element becomes a grid container
  • NONE - Element is completely removed from layout

Usage:


 element.setDisplay(Display.FLEX);
 element.setDisplay(Display.GRID);
 element.setDisplay(Display.NONE);
 
Since:
2012
Version:
1.1
Author:
Marvin P. Warble Jr.
See Also:
  • Nested Class Summary

    Nested classes/interfaces inherited from class java.lang.Enum

    Enum.EnumDesc<E extends Enum<E>>
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
    Element is a block-level element (like div).
    Element is replaced by its children in the box tree.
    Element becomes a block-level flex container.
    Establishes a new block formatting context.
    Element becomes a block-level grid container.
    Inherits the display value from the parent element.
    Sets the display to the default value for that element.
    Element is an inline-level element (like span).
    Element is an inline-level block container.
    Element is an inline-level flex container.
    Element is an inline-level grid container.
    Element is an inline-level table.
    Element is a list item (like li).
    Element is completely removed from the document flow and not rendered.
    Rolls back to the value defined by a previous cascade origin.
    Rolls back to the value defined in the previous cascade layer.
    Element generates a ruby container box.
    Element behaves like a ruby base container.
    Element behaves like a ruby base container group.
    Element behaves like a ruby text container.
    Element behaves like a ruby text container group.
    Element is either block or inline depending on surrounding context.
    Element behaves like a table element.
    Element behaves like a table caption (caption).
    Element behaves like a table cell (td/th).
    Element behaves like a table column (col).
    Element behaves like a column group (colgroup).
    Element behaves like a table footer group (tfoot).
    Element behaves like a table header group (thead).
    Element behaves like a table row (tr).
    Element behaves like a table body group (tbody).
    Resets the property to its inherited value or initial value.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the CSS value string.
    Returns the CSS value string.
    static Display
    Returns the enum constant of this class with the specified name.
    static Display[]
    Returns an array containing the constants of this enum class, in the order they are declared.

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • INHERIT

      public static final Display INHERIT
      Inherits the display value from the parent element.
    • INITIAL

      public static final Display INITIAL
      Sets the display to the default value for that element.
    • UNSET

      public static final Display UNSET
      Resets the property to its inherited value or initial value.
    • REVERT

      public static final Display REVERT
      Rolls back to the value defined by a previous cascade origin.
    • REVERT_LAYER

      public static final Display REVERT_LAYER
      Rolls back to the value defined in the previous cascade layer.
    • NONE

      public static final Display NONE
      Element is completely removed from the document flow and not rendered.
    • CONTENTS

      public static final Display CONTENTS
      Element is replaced by its children in the box tree. Useful for wrapper elements that shouldn't affect layout.
    • INLINE

      public static final Display INLINE
      Element is an inline-level element (like span). Flows with text.
    • BLOCK

      public static final Display BLOCK
      Element is a block-level element (like div). Starts on new line.
    • RUN_IN

      public static final Display RUN_IN
      Element is either block or inline depending on surrounding context.
    • FLOW_ROOT

      public static final Display FLOW_ROOT
      Establishes a new block formatting context. Contains floats and prevents margin collapse.
    • FLEX

      public static final Display FLEX
      Element becomes a block-level flex container.
    • GRID

      public static final Display GRID
      Element becomes a block-level grid container.
    • RUBY

      public static final Display RUBY
      Element generates a ruby container box.
    • INLINE_BLOCK

      public static final Display INLINE_BLOCK
      Element is an inline-level block container.
    • INLINE_FLEX

      public static final Display INLINE_FLEX
      Element is an inline-level flex container.
    • INLINE_GRID

      public static final Display INLINE_GRID
      Element is an inline-level grid container.
    • INLINE_TABLE

      public static final Display INLINE_TABLE
      Element is an inline-level table.
    • LIST_ITEM

      public static final Display LIST_ITEM
      Element is a list item (like li). Generates a marker box.
    • TABLE

      public static final Display TABLE
      Element behaves like a table element.
    • TABLE_ROW

      public static final Display TABLE_ROW
      Element behaves like a table row (tr).
    • TABLE_CELL

      public static final Display TABLE_CELL
      Element behaves like a table cell (td/th).
    • TABLE_CAPTION

      public static final Display TABLE_CAPTION
      Element behaves like a table caption (caption).
    • TABLE_ROW_GROUP

      public static final Display TABLE_ROW_GROUP
      Element behaves like a table body group (tbody).
    • TABLE_HEADER_GROUP

      public static final Display TABLE_HEADER_GROUP
      Element behaves like a table header group (thead).
    • TABLE_COLUMN

      public static final Display TABLE_COLUMN
      Element behaves like a table column (col).
    • TABLE_COLUMN_GROUP

      public static final Display TABLE_COLUMN_GROUP
      Element behaves like a column group (colgroup).
    • RUBY_BASE

      public static final Display RUBY_BASE
      Element behaves like a ruby base container.
    • RUBY_TEXT

      public static final Display RUBY_TEXT
      Element behaves like a ruby text container.
    • RUBY_BASE_CONTAINER

      public static final Display RUBY_BASE_CONTAINER
      Element behaves like a ruby base container group.
    • RUBY_TEXT_CONTAINER

      public static final Display RUBY_TEXT_CONTAINER
      Element behaves like a ruby text container group.
  • Method Details

    • values

      public static Display[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static Display valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified name
      NullPointerException - if the argument is null
    • getValue

      public String getValue()
      Returns the CSS value string.
      Returns:
      the CSS value
    • toString

      public String toString()
      Returns the CSS value string.
      Overrides:
      toString in class Enum<Display>
      Returns:
      the CSS value