Enum HAlign

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<HAlign>

    public enum HAlign
    extends java.lang.Enum<HAlign>
    Version:
    $Revision: 8afef6dd0d58 $
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      CENTER
      Center align.
      LEFT
      Left align.
      RIGHT
      Right align.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String ALIGN_CENTER
      constant for center align.
      static java.lang.String ALIGN_RIGHT
      constant for right align.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      float getHAlignOffset​(LayoutStage stage, LayoutInfo info, float width)
      Retrieve H-Align offset.
      static HAlign parseString​(java.lang.String alignString, HAlign defaultt)
      Parse an Alignment String.
      static HAlign valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static HAlign[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Enum Constant Detail

      • LEFT

        public static final HAlign LEFT
        Left align.
      • CENTER

        public static final HAlign CENTER
        Center align.
      • RIGHT

        public static final HAlign RIGHT
        Right align.
    • Field Detail

      • ALIGN_CENTER

        public static final java.lang.String ALIGN_CENTER
        constant for center align.
        See Also:
        Constant Field Values
      • ALIGN_RIGHT

        public static final java.lang.String ALIGN_RIGHT
        constant for right align.
        See Also:
        Constant Field Values
    • Method Detail

      • values

        public static HAlign[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (HAlign c : HAlign.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static HAlign valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • parseString

        public static HAlign parseString​(java.lang.String alignString,
                                         HAlign defaultt)
        Parse an Alignment String.
        Parameters:
        alignString - String to parse.
        defaultt - default value.
        Returns:
        a HAlign value.
      • getHAlignOffset

        public float getHAlignOffset​(LayoutStage stage,
                                     LayoutInfo info,
                                     float width)
        Retrieve H-Align offset.
        Parameters:
        stage - current Layout Stage
        info - Info object to examine
        width - Total width
        Returns:
        Alignment offset to add to left.