public class BorderLayout extends PercentLayoutBase
A GUI library independent implementation of the AWT layout manager BorderLayout.
This layout manager implements the BorderLayout
functionality
based on the PercentLayout
layout manager. Because of that it
can be used for all platforms for which an adapter is available.
This implementation differs from the original BorderLayout
in
only a few points: Margins can be defined around the hosting container and
individual gaps are supported between all hosted components. These margins
and gaps can be specified using all supported units.
Modifier and Type | Field and Description |
---|---|
static String |
CENTER
Constant for the layout constraints Center.
|
static String |
EAST
Constant for the layout constraints East.
|
static String |
NORTH
Constant for the layout constraints North.
|
static String |
SOUTH
Constant for the layout constraints South.
|
static String |
WEST
Constant for the layout constraints West.
|
Constructor and Description |
---|
BorderLayout()
Creates a new instance of
BorderLayout . |
Modifier and Type | Method and Description |
---|---|
NumberWithUnit |
getBottomMargin()
Returns the bottom margin.
|
NumberWithUnit |
getEastGap()
Returns the east gap.
|
NumberWithUnit |
getLeftMargin()
Returns the left margin.
|
NumberWithUnit |
getNorthGap()
Returns the north gap.
|
NumberWithUnit |
getRightMargin()
Returns the right margin.
|
NumberWithUnit |
getSouthGap()
Returns the south gap.
|
NumberWithUnit |
getTopMargin()
Returns the top margin.
|
NumberWithUnit |
getWestGap()
Returns the west gap.
|
protected void |
initCells(PercentLayoutPlatformAdapter adapter)
Initializes the percent layout.
|
protected void |
initConstraints(boolean north,
boolean south,
boolean west,
boolean east)
Initializes the column and row constraints for the percent layout.
|
void |
setBottomMargin(NumberWithUnit bottomMargin)
Sets the bottom margin.
|
void |
setEastGap(NumberWithUnit eastGap)
Sets the east gap.
|
void |
setLeftMargin(NumberWithUnit leftMargin)
Sets the left margin.
|
void |
setNorthGap(NumberWithUnit northGap)
Sets the north gap.
|
void |
setRightMargin(NumberWithUnit rightMargin)
Sets the right margin.
|
void |
setSouthGap(NumberWithUnit southGap)
Sets the south gap.
|
void |
setTopMargin(NumberWithUnit topMargin)
Sets the top margin.
|
void |
setWestGap(NumberWithUnit westGap)
Sets the west gap.
|
addColumnGroup, addRowGroup, alignComponent, applyCellGroups, applyWeightFactors, applyWeightFactors, calcCellPositions, calcCellSize, calcCellSizes, calcCellSizesWithGroups, calcComponentSize, calcComponentSizes, calcMinimumLayoutSize, calcPreferredLayoutSize, calcSizes, calcTotalWeight, checkConstraints, clearCells, clearCells, constraintsFor, fetchPlatformAdapter, flushCache, getAllColumnConstraints, getAllRowConstraints, getColumnConstraints, getColumnCount, getColumnGroups, getComponent, getConstraintsBuilder, getInternalAllColumnConstraints, getInternalAllRowConstraints, getMinimumComponentSize, getOrientationValue, getPercentData, getPlatformAdapter, getPreferredComponentSize, getRowConstraints, getRowCount, getRowGroups, getSizeHandler, getTotalWeightX, getTotalWeightY, handleMultiSpans, initCell, initDimensions, initFromCollections, isCanShrink, performLayout, performLayout, removeComponent, setCanShrink, setColumnConstraints, setComponentBounds, setPlatformAdapter, setRowConstraints
public static final String NORTH
public static final String EAST
public static final String SOUTH
public static final String WEST
public static final String CENTER
public NumberWithUnit getBottomMargin()
public void setBottomMargin(NumberWithUnit bottomMargin)
bottomMargin
- the bottom marginpublic NumberWithUnit getEastGap()
public void setEastGap(NumberWithUnit eastGap)
eastGap
- the east gappublic NumberWithUnit getLeftMargin()
public void setLeftMargin(NumberWithUnit leftMargin)
leftMargin
- the left marginpublic NumberWithUnit getNorthGap()
public void setNorthGap(NumberWithUnit northGap)
northGap
- the north gappublic NumberWithUnit getRightMargin()
public void setRightMargin(NumberWithUnit rightMargin)
rightMargin
- the right marginpublic NumberWithUnit getSouthGap()
public void setSouthGap(NumberWithUnit southGap)
southGap
- the south gappublic NumberWithUnit getTopMargin()
public void setTopMargin(NumberWithUnit topMargin)
topMargin
- the top marginpublic NumberWithUnit getWestGap()
public void setWestGap(NumberWithUnit westGap)
westGap
- the west gapprotected void initCells(PercentLayoutPlatformAdapter adapter)
initCells
in class PercentLayoutBase
adapter
- the platform adapterprotected void initConstraints(boolean north, boolean south, boolean west, boolean east)
north
- flag whether the north position is occupiedsouth
- flag whether the south position is occupiedwest
- flag whether the west position is occupiedeast
- flag whether the east position is occupiedCopyright © 2016 The JGUIraffe Team. All rights reserved.