Package com.oorian.css
Enum Class Display
- All Implemented Interfaces:
Serializable,Comparable<Display>,Constable
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 widthINLINE- Element flows with text, no line breaksFLEX- Element becomes a flex containerGRID- Element becomes a grid containerNONE- 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 ConstantsEnum ConstantDescriptionElement 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 TypeMethodDescriptiongetValue()Returns the CSS value string.toString()Returns the CSS value string.static DisplayReturns the enum constant of this class with the specified name.static Display[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
INHERIT
Inherits the display value from the parent element. -
INITIAL
Sets the display to the default value for that element. -
UNSET
Resets the property to its inherited value or initial value. -
REVERT
Rolls back to the value defined by a previous cascade origin. -
REVERT_LAYER
Rolls back to the value defined in the previous cascade layer. -
NONE
Element is completely removed from the document flow and not rendered. -
CONTENTS
Element is replaced by its children in the box tree. Useful for wrapper elements that shouldn't affect layout. -
INLINE
Element is an inline-level element (like span). Flows with text. -
BLOCK
Element is a block-level element (like div). Starts on new line. -
RUN_IN
Element is either block or inline depending on surrounding context. -
FLOW_ROOT
Establishes a new block formatting context. Contains floats and prevents margin collapse. -
FLEX
Element becomes a block-level flex container. -
GRID
Element becomes a block-level grid container. -
RUBY
Element generates a ruby container box. -
INLINE_BLOCK
Element is an inline-level block container. -
INLINE_FLEX
Element is an inline-level flex container. -
INLINE_GRID
Element is an inline-level grid container. -
INLINE_TABLE
Element is an inline-level table. -
LIST_ITEM
Element is a list item (like li). Generates a marker box. -
TABLE
Element behaves like a table element. -
TABLE_ROW
Element behaves like a table row (tr). -
TABLE_CELL
Element behaves like a table cell (td/th). -
TABLE_CAPTION
Element behaves like a table caption (caption). -
TABLE_ROW_GROUP
Element behaves like a table body group (tbody). -
TABLE_HEADER_GROUP
Element behaves like a table header group (thead). -
TABLE_FOOTER_GROUP
Element behaves like a table footer group (tfoot). -
TABLE_COLUMN
Element behaves like a table column (col). -
TABLE_COLUMN_GROUP
Element behaves like a column group (colgroup). -
RUBY_BASE
Element behaves like a ruby base container. -
RUBY_TEXT
Element behaves like a ruby text container. -
RUBY_BASE_CONTAINER
Element behaves like a ruby base container group. -
RUBY_TEXT_CONTAINER
Element behaves like a ruby text container group.
-
-
Method Details
-
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
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 nameNullPointerException- if the argument is null
-
getValue
Returns the CSS value string.- Returns:
- the CSS value
-
toString
Returns the CSS value string.
-