Class Align

×News: XavaPro 7.7 released - March 11 · Read more
java.lang.Object
org.openxava.util.Align
All Implemented Interfaces:
Serializable

public class Align extends Object implements Serializable
Represents a text (or another element) align.

The number of objects of this class is finete and accesible only by final variables or the method get(int).

See Also:
  • Field Details

    • DEFAULT

      public static final Align DEFAULT
    • LEFT

      public static final Align LEFT
    • CENTER

      public static final Align CENTER
  • Constructor Details

    • Align

      protected Align(int code, String description)
  • Method Details

    • equals

      public boolean equals(Object object)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • get

      public static Align get(int code)
      Obtain align associated to indicated code.

      Throws:
      IllegalStateException - If code does not match with a existing align.
    • getCode

      public int getCode()
    • getDescription

      public String getDescription()
    • getAll

      public static Align[] getAll()
      All available aligns.

      Returns:
      Not null
    • isCenter

      public boolean isCenter()
      Facilitates ask about what type of align is this.

      Returns:
      true if this.equals(Align.CENTER)
    • isDefault

      public boolean isDefault()
      Facilitates ask about what type of align is this.

      Returns:
      true if this.equals(Align.DEFAULT)
    • isRight

      public boolean isRight()
      Facilitates ask about what type of align is this.

      Returns:
      true if this.equals(Align.RIGHT)
    • isLeft

      public boolean isLeft()
      Facilitates ask about what type of align is this.

      Returns:
      true if this.equals(Align.LEFT)
    • toString

      public String toString()
      Overrides:
      toString in class Object