public class BorderLayout extends Layout
Modifier and Type | Field and Description |
---|---|
static String |
CENTER
The center layout constraint (middle of container)
|
static String |
EAST
The east layout constraint (right of container).
|
static String |
NORTH
The north layout constraint (top of container).
|
static String |
SOUTH
The south layout constraint (bottom of container).
|
static String |
WEST
The west layout constraint (left of container).
|
Constructor and Description |
---|
BorderLayout()
Creates a new instance of BorderLayout
|
Modifier and Type | Method and Description |
---|---|
void |
addLayoutComponent(Object name,
Component comp,
Container c)
Some layouts can optionally track the addition of elements with meta-data
that allows the user to "hint" on object positioning.
|
protected Component |
getCenter()
Returns the component in the center location
|
Object |
getComponentConstraint(Component comp)
Returns the component constraint
|
protected Component |
getEast()
Returns the component in the east location
|
protected Component |
getNorth()
Returns the component in the north location
|
Dimension |
getPreferredSize(Container parent)
Returns the container preferred size
|
protected Component |
getSouth()
Returns the component in the south location
|
protected Component |
getWest()
Returns the component in the west location
|
void |
layoutContainer(Container target)
Layout the given parent container children
|
void |
removeLayoutComponent(Component comp)
Removes the component from the layout this operation is only useful if the
layout maintains references to components within it
|
isOverlapSupported
public static final String NORTH
public static final String SOUTH
public static final String CENTER
public static final String WEST
public static final String EAST
public void addLayoutComponent(Object name, Component comp, Container c)
Layout
addLayoutComponent
in class Layout
name
- optional meta data information, like alignment orientationcomp
- the added component to the layoutc
- the parent containerpublic void removeLayoutComponent(Component comp)
Layout
removeLayoutComponent
in class Layout
comp
- the removed component from layoutpublic Object getComponentConstraint(Component comp)
getComponentConstraint
in class Layout
comp
- the component whose constraint is queriedpublic void layoutContainer(Container target)
Layout
layoutContainer
in class Layout
target
- the given parent containerpublic Dimension getPreferredSize(Container parent)
Layout
getPreferredSize
in class Layout
parent
- the parent containerprotected Component getSouth()
protected Component getCenter()
protected Component getNorth()
protected Component getEast()
protected Component getWest()