Class Align


  • public final class Align
    extends Object

    A non-instantiable class containing several constants dealing with alignments. Alignments are made up of various bits, stored in an integer, which may be bitwise-ORed together. So, for example, to align something to the top-left, you could set int align = Align.TOP | Align.LEFT. Following the standard set by CSS2 and HTML, CENTER means horizontally centered, and MIDDLE means vertically centered.

    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int BOTTOM
      The constant representing bottom vertical alignment
      static int BOX
      A constant requesting horizontal alignment to be done based on the "box" of all values rather than this individual value.
      static int CENTER
      The constant representing centered horizontal alignment
      static int LEFT
      The constant representing left horizontal alignment
      static int MIDDLE
      The constant representing middle vertical alignment
      static int RIGHT
      The constant representing right horizontal alignment
      static int TOP
      The constant representing top vertical alignment
    • Field Detail

      • TOP

        public static final int TOP
        The constant representing top vertical alignment
        See Also:
        Constant Field Values
      • BOTTOM

        public static final int BOTTOM
        The constant representing bottom vertical alignment
        See Also:
        Constant Field Values
      • MIDDLE

        public static final int MIDDLE
        The constant representing middle vertical alignment
        See Also:
        Constant Field Values
      • LEFT

        public static final int LEFT
        The constant representing left horizontal alignment
        See Also:
        Constant Field Values
      • RIGHT

        public static final int RIGHT
        The constant representing right horizontal alignment
        See Also:
        Constant Field Values
      • CENTER

        public static final int CENTER
        The constant representing centered horizontal alignment
        See Also:
        Constant Field Values
      • BOX

        public static final int BOX
        A constant requesting horizontal alignment to be done based on the "box" of all values rather than this individual value. Applies only to values on axes
        Since:
        2.4.7
        See Also:
        Constant Field Values