java.lang.Object | +--java.awt.BorderLayoutAll Implemented Interfaces:
static java.lang.String | AFTER_LAST_LINE The constant indicating the position after the last line of the layout. |
static java.lang.String | AFTER_LINE_ENDS The constant indicating the position after the last item of the layout. |
static java.lang.String | BEFORE_FIRST_LINE The constant indicating the position before the first line of the layout. |
static java.lang.String | BEFORE_LINE_BEGINS The constant indicating the position before the first item of the layout. |
static java.lang.String | CENTER Constant indicating the center of the container |
static java.lang.String | EAST Constant indicating the right side of the container |
static java.lang.String | LINE_END The constant indicating the position after the last item of the layout. |
static java.lang.String | LINE_START The constant indicating the position before the first item of the layout. |
static java.lang.String | NORTH Constant indicating the top of the container |
static java.lang.String | PAGE_END The constant indicating the position after the last line of the layout. |
static java.lang.String | PAGE_START The constant indicating the position before the first line of the layout. |
static java.lang.String | SOUTH Constant indicating the bottom of the container |
static java.lang.String | WEST Constant indicating the left side of the container |
BorderLayout() Initializes a new instance of |
BorderLayout(int hgap, int vgap) Initializes a new instance of |
void | addLayoutComponent(java.awt.Component component, java.lang.Object constraints) Adds a component to the layout in the specified constraint position, which must be one of the string constants defined in this class. |
void | addLayoutComponent(java.lang.String constraints, java.awt.Component component) Adds a component to the layout in the specified constraint position, which must be one of the string constants defined in this class. |
int | getHgap() Returns the horitzontal gap value. |
float | getLayoutAlignmentX(java.awt.Container parent) Returns the X axis alignment, which is a |
float | getLayoutAlignmentY(java.awt.Container parent) Returns the Y axis alignment, which is a |
int | getVgap() Returns the vertical gap value. |
void | invalidateLayout(java.awt.Container parent) Instructs this object to discard any layout information it might have cached. |
void | layoutContainer(java.awt.Container target) Lays out the specified container according to the constraints in this object. |
java.awt.Dimension | maximumLayoutSize(java.awt.Container target) Returns the maximum size of the specified container using this layout. |
java.awt.Dimension | minimumLayoutSize(java.awt.Container target) Returns the minimum size of the specified container using this layout. |
java.awt.Dimension | preferredLayoutSize(java.awt.Container target) Returns the preferred size of the specified container using this layout. |
void | removeLayoutComponent(java.awt.Component component) Removes the specified component from the layout. |
void | setHgap(int hgap) Sets the horizontal gap to the specified value. |
void | setVgap(int vgap) Sets the vertical gap to the specified value. |
java.lang.String | toString() Returns a string representation of this layout manager. |
public static final String AFTER_LAST_LINE
This constant is an older name for #PAGE_END which has exactly the same value.
public static final String AFTER_LINE_ENDS
This constant is an older name for #LINE_END which has exactly the same value.
public static final String BEFORE_FIRST_LINE
This constant is an older name for #PAGE_START which has exactly the same value.
public static final String BEFORE_LINE_BEGINS
This constant is an older name for #LINE_START which has exactly the same value.
public static final String CENTER
public static final String EAST
public static final String LINE_END
public static final String LINE_START
public static final String NORTH
public static final String PAGE_END
public static final String PAGE_START
public static final String SOUTH
public static final String WEST
public BorderLayout()
BorderLayout
with no
horiztonal or vertical gaps between components.
public BorderLayout(int hgap, int vgap)
BorderLayout
with the
specified horiztonal and vertical gaps between components.
hgap
- The horizontal gap between components.vgap
- The vertical gap between components.public void addLayoutComponent(java.awt.Component component, java.lang.Object constraints)
component
- The component to add.constraints
- The constraint string.IllegalArgumentException
- If the constraint object is not
a string, or is not one of the specified constants in this class.public void addLayoutComponent(java.lang.String constraints, java.awt.Component component)
constraints
- The constraint string.component
- The component to add.IllegalArgumentException
- If the constraint object is not
one of the specified constants in this class.public int getHgap()
public float getLayoutAlignmentX(java.awt.Container parent)
float
indicating
where along the X axis this container wishs to position its layout.
0 indicates align to the left, 1 indicates align to the right, and 0.5
indicates align to the center.
parent
- The parent container.public float getLayoutAlignmentY(java.awt.Container parent)
float
indicating
where along the Y axis this container wishs to position its layout.
0 indicates align to the top, 1 indicates align to the bottom, and 0.5
indicates align to the center.
parent
- The parent container.public int getVgap()
public void invalidateLayout(java.awt.Container parent)
parent
- The parent container.public void layoutContainer(java.awt.Container target)
target
- The container to lay out.public Dimension maximumLayoutSize(java.awt.Container target)
target
- The container to calculate the maximum size for.public Dimension minimumLayoutSize(java.awt.Container target)
target
- The container to calculate the minimum size for.public Dimension preferredLayoutSize(java.awt.Container target)
target
- The container to calculate the preferred size for.public void removeLayoutComponent(java.awt.Component component)
component
- The component to remove from the layout.public void setHgap(int hgap)
hgap
- The new horizontal gap.public void setVgap(int vgap)
vgap
- The new vertical gap value.public String toString()