Enum Class Stack.Alignment

java.lang.Object
java.lang.Enum<Stack.Alignment>
limn.scene.layout.Stack.Alignment
All Implemented Interfaces:
Serializable, Comparable<Stack.Alignment>, Constable
Enclosing class:
Stack

public static enum Stack.Alignment extends Enum<Stack.Alignment>
Where a child sits in the stack's box, on two vocabularies that coexist on purpose.

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.

  • Enum Constant Details

    • TOP_LEFT

      public static final Stack.Alignment TOP_LEFT
    • TOP_CENTER

      public static final Stack.Alignment TOP_CENTER
    • TOP_RIGHT

      public static final Stack.Alignment TOP_RIGHT
    • CENTER_LEFT

      public static final Stack.Alignment CENTER_LEFT
    • CENTER

      public static final Stack.Alignment CENTER
    • CENTER_RIGHT

      public static final Stack.Alignment CENTER_RIGHT
    • BOTTOM_LEFT

      public static final Stack.Alignment BOTTOM_LEFT
    • BOTTOM_CENTER

      public static final Stack.Alignment BOTTOM_CENTER
    • BOTTOM_RIGHT

      public static final Stack.Alignment BOTTOM_RIGHT
    • TOP_START

      public static final Stack.Alignment TOP_START
      Top, on the side the content starts from.
    • CENTER_START

      public static final Stack.Alignment CENTER_START
      Vertically centred, on the side the content starts from.
    • BOTTOM_START

      public static final Stack.Alignment BOTTOM_START
      Bottom, on the side the content starts from.
    • TOP_END

      public static final Stack.Alignment TOP_END
      Top, on the side the content ends on.
    • CENTER_END

      public static final Stack.Alignment CENTER_END
      Vertically centred, on the side the content ends on.
    • BOTTOM_END

      public static final Stack.Alignment BOTTOM_END
      Bottom, on the side the content ends on.
  • Method Details

    • values

      public static Stack.Alignment[] 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 Stack.Alignment 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