Package net.sf.jguiraffe.gui.layout
Klasse BorderLayout
java.lang.Object
net.sf.jguiraffe.gui.layout.PercentLayoutBase
net.sf.jguiraffe.gui.layout.BorderLayout
- Alle implementierten Schnittstellen:
Serializable
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.
- Version:
- $Id: BorderLayout.java 205 2012-01-29 18:29:57Z oheger $
- Autor:
- Oliver Heger
- Siehe auch:
-
Feldübersicht
FelderModifizierer und TypFeldBeschreibungstatic final String
Constant for the layout constraints Center.static final String
Constant for the layout constraints East.static final String
Constant for the layout constraints North.static final String
Constant for the layout constraints South.static final String
Constant for the layout constraints West. -
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungReturns the bottom margin.Returns the east gap.Returns the left margin.Returns the north gap.Returns the right margin.Returns the south gap.Returns the top margin.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.Von Klasse geerbte Methoden net.sf.jguiraffe.gui.layout.PercentLayoutBase
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
-
Felddetails
-
NORTH
Constant for the layout constraints North.- Siehe auch:
-
EAST
Constant for the layout constraints East.- Siehe auch:
-
SOUTH
Constant for the layout constraints South.- Siehe auch:
-
WEST
Constant for the layout constraints West.- Siehe auch:
-
CENTER
Constant for the layout constraints Center.- Siehe auch:
-
-
Konstruktordetails
-
BorderLayout
public BorderLayout()Creates a new instance ofBorderLayout
.
-
-
Methodendetails
-
getBottomMargin
Returns the bottom margin.- Gibt zurück:
- the bottom margin
-
setBottomMargin
Sets the bottom margin.- Parameter:
bottomMargin
- the bottom margin
-
getEastGap
Returns the east gap.- Gibt zurück:
- the east gap
-
setEastGap
Sets the east gap. This is a gap between the center and the east component.- Parameter:
eastGap
- the east gap
-
getLeftMargin
Returns the left margin.- Gibt zurück:
- the left margin
-
setLeftMargin
Sets the left margin.- Parameter:
leftMargin
- the left margin
-
getNorthGap
Returns the north gap.- Gibt zurück:
- the north gap
-
setNorthGap
Sets the north gap. This is a gap between the north and the center component.- Parameter:
northGap
- the north gap
-
getRightMargin
Returns the right margin.- Gibt zurück:
- the right margin
-
setRightMargin
Sets the right margin.- Parameter:
rightMargin
- the right margin
-
getSouthGap
Returns the south gap.- Gibt zurück:
- the south gap
-
setSouthGap
Sets the south gap. This is a gap between the south and the center component.- Parameter:
southGap
- the south gap
-
getTopMargin
Returns the top margin.- Gibt zurück:
- the top margin
-
setTopMargin
Sets the top margin.- Parameter:
topMargin
- the top margin
-
getWestGap
Returns the west gap.- Gibt zurück:
- the west gap
-
setWestGap
Sets the west gap. This is a gap between the west and the center component.- Parameter:
westGap
- the west gap
-
initCells
Initializes the percent layout. This implementation creates a layout with 7 columns and 7 rows and places the contained components in the appropriate cells according to their constraints.- Angegeben von:
initCells
in KlassePercentLayoutBase
- Parameter:
adapter
- the platform adapter
-
initConstraints
protected void initConstraints(boolean north, boolean south, boolean west, boolean east) Initializes the column and row constraints for the percent layout. They depend on the occupied positions in the border layout.- Parameter:
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 occupied
-