Package com.oorian.css
Enum Class JustifyContent
- All Implemented Interfaces:
Serializable,Comparable<JustifyContent>,Constable
CSS justify-content property values for flexbox main axis alignment.
The justify-content property aligns flex items along the main axis of the flex container. It distributes extra space when items don't use all available space on the main axis.
Alignment Values:
- flex-start: Items packed to start of container
- flex-end: Items packed to end of container
- center: Items centered along main axis
- space-between: Even spacing, first/last at edges
- space-around: Even spacing with half-size edge gaps
Usage:
container.setJustifyContent(JustifyContent.CENTER);
container.setJustifyContent(JustifyContent.SPACE_BETWEEN);
- Since:
- 2012
- Version:
- 1.0
- 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 ConstantDescriptionItems centered along the main axis.Items packed to the end (writing-mode aware).Items packed toward the end of the main axis.Items packed toward the start of the main axis.Inherits from parent element.Sets to default value.Items packed to the left.Normal alignment behavior (context-dependent).Items packed to the right.Items evenly distributed with equal space around each.Items evenly distributed with first/last at edges.Items evenly distributed with equal space between them.Items packed to the start (writing-mode aware).Items stretched to distribute space evenly. -
Method Summary
Modifier and TypeMethodDescriptiongetValue()Returns the CSS value string.toString()Returns the CSS value string.static JustifyContentReturns the enum constant of this class with the specified name.static JustifyContent[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
CENTER
Items centered along the main axis. -
FLEX_START
Items packed toward the start of the main axis. -
FLEX_END
Items packed toward the end of the main axis. -
SPACE_BETWEEN
Items evenly distributed with first/last at edges. -
SPACE_AROUND
Items evenly distributed with equal space around each. -
SPACE_EVENLY
Items evenly distributed with equal space between them. -
START
Items packed to the start (writing-mode aware). -
END
Items packed to the end (writing-mode aware). -
LEFT
Items packed to the left. -
RIGHT
Items packed to the right. -
STRETCH
Items stretched to distribute space evenly. -
NORMAL
Normal alignment behavior (context-dependent). -
INITIAL
Sets to default value. -
INHERIT
Inherits from parent element.
-
-
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.- Overrides:
toStringin classEnum<JustifyContent>- Returns:
- the CSS value
-