Enum Class Label.HAlign

java.lang.Object
java.lang.Enum<Label.HAlign>
limn.components.Label.HAlign
All Implemented Interfaces:
Serializable, Comparable<Label.HAlign>, Constable
Enclosing class:
Label

public static enum Label.HAlign extends Enum<Label.HAlign>
Where a line sits in the text region, on two vocabularies that coexist on purpose.

START and END are logical: they name where reading starts and ends, so they turn around with LayoutDirection. That is what a label almost always wants, because a label is text and text has a reading order.

LEFT and RIGHT are physical: they name a side of the region and keep naming it whichever way the subtree reads. Reach for one when the alignment is about the box rather than about the reading order — a column of figures that must stay flush with the column beside it, a caption pinned under one corner of a picture.

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

  • Enum Constant Details

    • START

      public static final Label.HAlign START
      Against the edge reading starts from.
    • CENTER

      public static final Label.HAlign CENTER
      Centred in the text region.
    • END

      public static final Label.HAlign END
      Against the edge reading ends on.
    • LEFT

      public static final Label.HAlign LEFT
      Against the region's left edge, whichever way the subtree reads.
  • Method Details

    • values

      public static Label.HAlign[] 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 Label.HAlign 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