- java.lang.Object
-
- java.lang.Enum<BorderLayout.Location>
-
- com.googlecode.lanterna.gui2.BorderLayout.Location
-
- All Implemented Interfaces:
LayoutData
,java.io.Serializable
,java.lang.Comparable<BorderLayout.Location>
- Enclosing class:
- BorderLayout
public static enum BorderLayout.Location extends java.lang.Enum<BorderLayout.Location> implements LayoutData
This type is what you use as the layout data for components added to a panel usingBorderLayout
for its layout manager. This values specified where inside the panel the component should be added.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description BOTTOM
The component with this value as its layout data will occupy the bottom side of the container, attempting to allocate the preferred height of the component and at least the preferred width, but could be more depending on the other components added.CENTER
The component with this value as its layout data will occupy the center space, whatever is remaining after the other components (if any) have allocated their space.LEFT
The component with this value as its layout data will occupy the left side of the container, attempting to allocate the preferred width of the component and at least the preferred height, but could be more depending on the other components added.RIGHT
The component with this value as its layout data will occupy the right side of the container, attempting to allocate the preferred width of the component and at least the preferred height, but could be more depending on the other components added.TOP
The component with this value as its layout data will occupy the top side of the container, attempting to allocate the preferred height of the component and at least the preferred width, but could be more depending on the other components added.
-
Constructor Summary
Constructors Modifier Constructor Description private
Location()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static BorderLayout.Location
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static BorderLayout.Location[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
CENTER
public static final BorderLayout.Location CENTER
The component with this value as its layout data will occupy the center space, whatever is remaining after the other components (if any) have allocated their space.
-
LEFT
public static final BorderLayout.Location LEFT
The component with this value as its layout data will occupy the left side of the container, attempting to allocate the preferred width of the component and at least the preferred height, but could be more depending on the other components added.
-
RIGHT
public static final BorderLayout.Location RIGHT
The component with this value as its layout data will occupy the right side of the container, attempting to allocate the preferred width of the component and at least the preferred height, but could be more depending on the other components added.
-
TOP
public static final BorderLayout.Location TOP
The component with this value as its layout data will occupy the top side of the container, attempting to allocate the preferred height of the component and at least the preferred width, but could be more depending on the other components added.
-
BOTTOM
public static final BorderLayout.Location BOTTOM
The component with this value as its layout data will occupy the bottom side of the container, attempting to allocate the preferred height of the component and at least the preferred width, but could be more depending on the other components added.
-
-
Method Detail
-
values
public static BorderLayout.Location[] 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 (BorderLayout.Location c : BorderLayout.Location.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static BorderLayout.Location 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
-
-