- java.lang.Object
-
- java.lang.Enum<GridLayout.Alignment>
-
- com.googlecode.lanterna.gui2.GridLayout.Alignment
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<GridLayout.Alignment>
- Enclosing class:
- GridLayout
public static enum GridLayout.Alignment extends java.lang.Enum<GridLayout.Alignment>
The enum is used to specify where in a grid cell a component should be placed, in the case that the preferred size of the component is smaller than the space in the cell. This class will generally use two alignments, one for horizontal and one for vertical.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description BEGINNING
Place the component at the start of the cell (horizontally or vertically) and leave whatever space is left after the preferred size empty.CENTER
Place the component at the middle of the cell (horizontally or vertically) and leave the space before and after empty.END
Place the component at the end of the cell (horizontally or vertically) and leave whatever space is left before the preferred size empty.FILL
Force the component to be the same size as the table cell
-
Constructor Summary
Constructors Modifier Constructor Description private
Alignment()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static GridLayout.Alignment
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static GridLayout.Alignment[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
BEGINNING
public static final GridLayout.Alignment BEGINNING
Place the component at the start of the cell (horizontally or vertically) and leave whatever space is left after the preferred size empty.
-
CENTER
public static final GridLayout.Alignment CENTER
Place the component at the middle of the cell (horizontally or vertically) and leave the space before and after empty.
-
END
public static final GridLayout.Alignment END
Place the component at the end of the cell (horizontally or vertically) and leave whatever space is left before the preferred size empty.
-
FILL
public static final GridLayout.Alignment FILL
Force the component to be the same size as the table cell
-
-
Method Detail
-
values
public static GridLayout.Alignment[] 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 (GridLayout.Alignment c : GridLayout.Alignment.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static GridLayout.Alignment 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 namejava.lang.NullPointerException
- if the argument is null
-
-