Enum Class Flex.MainAlignment

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

public static enum Flex.MainAlignment extends Enum<Flex.MainAlignment>
How leftover space along the layout axis is distributed, on two vocabularies that coexist on purpose.

START, END and SPACE_BETWEEN are logical: they name where reading starts and ends, so on a Row they turn around with LayoutDirection. This is what a caller almost always wants, and it is why a dialog's button row needs no direction knowledge of its own.

LEFT and RIGHT are physical: they name a side of the box and keep naming it whichever way the subtree reads. Reach for one when the placement is about the box rather than about reading order — a resize grip, a debug strip, a control that has to stay put beside something outside this row. On a Column the main axis has no left, so LEFT behaves as START and RIGHT as END: a name that means nothing there must still mean something predictable.

CENTER is the same number in both vocabularies and in both directions.

  • Enum Constant Details

    • START

      public static final Flex.MainAlignment START
      Against the edge reading starts from.
    • CENTER

      public static final Flex.MainAlignment CENTER
      Centred.
    • END

      public static final Flex.MainAlignment END
      Against the edge reading ends on.
    • SPACE_BETWEEN

      public static final Flex.MainAlignment SPACE_BETWEEN
      Leftovers split evenly between children, from the edge reading starts from.
    • LEFT

      public static final Flex.MainAlignment LEFT
      Against the box's left edge, whichever way the subtree reads.
  • Method Details

    • values

      public static Flex.MainAlignment[] 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 Flex.MainAlignment 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