Enum TextIconAlignment

  • All Implemented Interfaces:
    Serializable, Comparable<TextIconAlignment>

    public enum TextIconAlignment
    extends Enum<TextIconAlignment>

    An enumeration class that defines the alignment of the text and the icon of a label or button-like component.

    This enumeration type is always used to define alignments of GUI controls that support both a text and an icon. The names of the defined alginment constants can also be passed to the alignment property of the tags for those components.

    Version:
    $Id: TextIconAlignment.java 205 2012-01-29 18:29:57Z oheger $
    Author:
    Oliver Heger
    • Enum Constant Detail

      • LEFT

        public static final TextIconAlignment LEFT
        Constant for the alignment LEFT: The icon is left to the text. This is the default alignment.
      • CENTER

        public static final TextIconAlignment CENTER
        Constant for the alignment CENTER: The icon is centered.
      • RIGHT

        public static final TextIconAlignment RIGHT
        Constant for the alignment RIGHT: The icon is right to the text.
    • Method Detail

      • values

        public static TextIconAlignment[] 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 (TextIconAlignment c : TextIconAlignment.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static TextIconAlignment valueOf​(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:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null