- All Implemented Interfaces:
LayoutData
,Serializable
,Comparable<BorderLayout.Location>
,java.lang.constant.Constable
- Enclosing class:
BorderLayout
This type is what you use as the layout data for components added to a panel using
BorderLayout
for its
layout manager. This values specified where inside the panel the component should be added.-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionThe 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.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.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.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.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 -
Method Summary
Modifier and TypeMethodDescriptionstatic BorderLayout.Location
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 Details
-
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. -
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.
-
-
Constructor Details
-
Location
private Location()
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
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 nameNullPointerException
- if the argument is null
-