Enum Class Stack.Alignment
- All Implemented Interfaces:
Serializable,Comparable<Stack.Alignment>,Constable
- Enclosing class:
Stack
The nine physical constants name a side of the box and keep naming it whatever
the subtree reads: TOP_LEFT is the top left corner in a right-to-left interface
too. They are the escape hatch for the placement that is about the box and not about the
reading order — a resize grip, a watermark, a debug overlay — and TOP_LEFT stays
the default, so no existing stack moves.
The six logical constants name the side the content starts or ends on, and
follow LayoutDirection: TOP_START is the top left corner left to
right and the top right corner right to left. Reach for these when the placement means
"where reading begins" — a badge on a leading edge, a close button on a trailing one.
The nine are not renamed. Renaming them would be a source-breaking change to a published enum in order to fix the handful of places that name one, and adding is free.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionBottom, on the side the content ends on.Bottom, on the side the content starts from.Vertically centred, on the side the content ends on.Vertically centred, on the side the content starts from.Top, on the side the content ends on.Top, on the side the content starts from. -
Method Summary
Modifier and TypeMethodDescriptionstatic Stack.AlignmentReturns the enum constant of this class with the specified name.static Stack.Alignment[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
TOP_LEFT
-
TOP_CENTER
-
TOP_RIGHT
-
CENTER_LEFT
-
CENTER
-
CENTER_RIGHT
-
BOTTOM_LEFT
-
BOTTOM_CENTER
-
BOTTOM_RIGHT
-
TOP_START
Top, on the side the content starts from. -
CENTER_START
Vertically centred, on the side the content starts from. -
BOTTOM_START
Bottom, on the side the content starts from. -
TOP_END
Top, on the side the content ends on. -
CENTER_END
Vertically centred, on the side the content ends on. -
BOTTOM_END
Bottom, on the side the content ends on.
-
-
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
-