Package com.vaadin.ui

Class Alignment

  • All Implemented Interfaces:
    Serializable

    public final class Alignment
    extends Object
    implements Serializable
    Class containing information about alignment of a component. Use the pre-instantiated classes.
    See Also:
    Serialized Form
    • Field Detail

      • TOP_RIGHT

        public static final Alignment TOP_RIGHT
      • TOP_LEFT

        public static final Alignment TOP_LEFT
      • TOP_CENTER

        public static final Alignment TOP_CENTER
      • MIDDLE_RIGHT

        public static final Alignment MIDDLE_RIGHT
      • MIDDLE_LEFT

        public static final Alignment MIDDLE_LEFT
      • MIDDLE_CENTER

        public static final Alignment MIDDLE_CENTER
      • BOTTOM_RIGHT

        public static final Alignment BOTTOM_RIGHT
      • BOTTOM_LEFT

        public static final Alignment BOTTOM_LEFT
      • BOTTOM_CENTER

        public static final Alignment BOTTOM_CENTER
    • Constructor Detail

      • Alignment

        public Alignment​(int bitMask)
    • Method Detail

      • getBitMask

        public int getBitMask()
        Returns a bitmask representation of the alignment value. Used internally by terminal.
        Returns:
        the bitmask representation of the alignment value
      • isTop

        public boolean isTop()
        Checks if component is aligned to the top of the available space.
        Returns:
        true if aligned top
      • isBottom

        public boolean isBottom()
        Checks if component is aligned to the bottom of the available space.
        Returns:
        true if aligned bottom
      • isLeft

        public boolean isLeft()
        Checks if component is aligned to the left of the available space.
        Returns:
        true if aligned left
      • isRight

        public boolean isRight()
        Checks if component is aligned to the right of the available space.
        Returns:
        true if aligned right
      • isMiddle

        public boolean isMiddle()
        Checks if component is aligned middle (vertically center) of the available space.
        Returns:
        true if aligned bottom
      • isCenter

        public boolean isCenter()
        Checks if component is aligned center (horizontally) of the available space.
        Returns:
        true if aligned center
      • getVerticalAlignment

        public String getVerticalAlignment()
        Returns string representation of vertical alignment.
        Returns:
        vertical alignment as CSS value
      • getHorizontalAlignment

        public String getHorizontalAlignment()
        Returns string representation of horizontal alignment.
        Returns:
        horizontal alignment as CSS value
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object