|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.pxclass.gui.PXElasticLayout
public class PXElasticLayout
A layout manager.
Field Summary | |
---|---|
protected de.pxclass.gui.PXElasticLayout.CellArea |
cellArea
the layout information |
protected java.util.Map |
constraintsMap
This Map maintains the association between a component and
its constraints. |
Constructor Summary | |
---|---|
PXElasticLayout()
Creates a new PXElasticLayout layout manager. |
|
PXElasticLayout(int columnGap,
int rowGap)
Creates a new PXElasticLayout layout manager. |
|
PXElasticLayout(int columnGap,
int rowGap,
int outerHorizontalGap,
int outerVerticalGap)
Creates a new PXElasticLayout layout manager. |
|
PXElasticLayout(int columnGap,
int rowGap,
int outerTopGap,
int outerLeftGap,
int outerBottomGap,
int outerRightGap)
Creates a new PXElasticLayout layout manager. |
Method Summary | |
---|---|
void |
addLayoutComponent(java.awt.Component comp,
java.lang.Object constraints)
Adds the specified component to the layout, using the specified constraints object. |
void |
addLayoutComponent(java.lang.String name,
java.awt.Component comp)
Has no effect, since this layout manager does not use a per-component string. |
int |
getColumnGap()
Gets the horizontal gap between columns. |
PXElasticConstraints |
getConstraints(java.awt.Component comp)
Gets the constraints for the specified component. |
protected PXElasticConstraints |
getConstraintsImpl(java.awt.Component comp)
Retrieves the constraints for the specified component. |
float |
getLayoutAlignmentX(java.awt.Container target)
Returns the alignment along the x axis. |
float |
getLayoutAlignmentY(java.awt.Container target)
Returns the alignment along the y axis. |
int |
getOuterBottomGap()
Gets the vertical gap between the bottom-most component to the edge of the container. |
int |
getOuterLeftGap()
Gets the horizontal gap between the left-most component and the edge of the container. |
int |
getOuterRightGap()
Gets the horizontal gap between the right-most component and the edge of the container. |
int |
getOuterTopGap()
Gets the vertical gap between the top-most component and the edge of the container. |
int |
getRowGap()
Gets the vertical gap between rows. |
void |
invalidateLayout(java.awt.Container target)
Invalidates the layout, indicating that if the layout manager has cached information it should be discarded. |
protected void |
invalidateLayoutInfo()
Invalidates the layout, cached information of this layout manager is discarded. |
boolean |
isHeedingInvisibleComponents()
Gets whether or not invisible components are heeded in layout calculations. |
protected boolean |
isLayoutInfoValid()
Gets whether or not the layout information of this layout manager is valid. |
void |
layoutContainer(java.awt.Container parent)
Lays out the specified container using this grid bag layout. |
java.awt.Dimension |
maximumLayoutSize(java.awt.Container parent)
Returns the maximum dimensions for this layout given the components in the specified target container. |
java.awt.Dimension |
minimumLayoutSize(java.awt.Container parent)
Determines the minimum size of the parent container using
this PXElasticLayout . |
java.awt.Dimension |
preferredLayoutSize(java.awt.Container parent)
Determines the preferred size of the parent container using
this PXElasticLayout . |
void |
removeLayoutComponent(java.awt.Component comp)
Removes the specified component from this layout. |
void |
setColumnGap(int columnGap)
Sets the horizontal gap between columns. |
void |
setConstraints(java.awt.Component comp,
PXElasticConstraints constraints)
Sets the constraints for the specified component in this layout. |
protected void |
setConstraintsImpl(java.awt.Component comp,
PXElasticConstraints constraints)
Sets the constraints for the specified component in this layout. |
void |
setDebugMode(boolean enabled)
Sets the debug mode of this PXElasticLayout object. |
void |
setHeedingInvisibleComponents(boolean heedingInvisibleComp)
Sets whether or not invisible components are heeded in layout calculations. |
void |
setOuterBottomGap(int outerBottomGap)
Sets the vertical gap between the bottom-most component to the edge of the container. |
void |
setOuterLeftGap(int outerLeftGap)
Sets the horizontal gap between the left-most component and the edge of the container. |
void |
setOuterRightGap(int outerRightGap)
Sets the horizontal gap between the right-most component and the edge of the container. |
void |
setOuterTopGap(int outerTopGap)
Sets the vertical gap between the top-most component and the edge of the container. |
void |
setRowGap(int rowGap)
Sets the vertical gap between rows. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final java.util.Map constraintsMap
Map
maintains the association between a component and
its constraints. The Keys in the map are the components and the values are
the instances of PXElasticConstraints
.
protected de.pxclass.gui.PXElasticLayout.CellArea cellArea
Constructor Detail |
---|
public PXElasticLayout()
PXElasticLayout
layout manager.
public PXElasticLayout(int columnGap, int rowGap)
PXElasticLayout
layout manager.
columnGap
- the gap between columnsrowGap
- the gap between rowspublic PXElasticLayout(int columnGap, int rowGap, int outerHorizontalGap, int outerVerticalGap)
PXElasticLayout
layout manager.
columnGap
- the gap between columnsrowGap
- the gap between rowsouterHorizontalGap
- the gap between the parent container and the
first and the last rowouterVerticalGap
- the gap between the parent container and the first
and the last columnpublic PXElasticLayout(int columnGap, int rowGap, int outerTopGap, int outerLeftGap, int outerBottomGap, int outerRightGap)
PXElasticLayout
layout manager.
columnGap
- the gap between columnsrowGap
- the gap between rowsouterTopGap
- the gap between the parent container and the first rowouterLeftGap
- the gap between the parent container and the first
columnouterBottomGap
- the gap between the parent container and the last rowouterRightGap
- the gap between the parent container and the last
columnMethod Detail |
---|
public int getColumnGap()
setColumnGap(int)
public void setColumnGap(int columnGap)
columnGap
- the column gapgetColumnGap()
public int getRowGap()
setRowGap(int)
public void setRowGap(int rowGap)
rowGap
- the row gapgetRowGap()
public int getOuterTopGap()
setOuterTopGap(int)
public void setOuterTopGap(int outerTopGap)
outerTopGap
- the outer top gap to setgetOuterTopGap()
public int getOuterLeftGap()
setOuterLeftGap(int)
public void setOuterLeftGap(int outerLeftGap)
outerLeftGap
- the outer left gap to setgetOuterLeftGap()
public int getOuterBottomGap()
setOuterBottomGap(int)
public void setOuterBottomGap(int outerBottomGap)
outerBottomGap
- the outer bottom gap to setgetOuterBottomGap()
public int getOuterRightGap()
setOuterRightGap(int)
public void setOuterRightGap(int outerRightGap)
outerRightGap
- the outer right gap to setgetOuterRightGap()
public void setConstraints(java.awt.Component comp, PXElasticConstraints constraints)
comp
- the component to be modifiedconstraints
- the constraints to be appliedprotected void setConstraintsImpl(java.awt.Component comp, PXElasticConstraints constraints)
comp
- the component to be modifiedconstraints
- the constraints to be appliedpublic void setDebugMode(boolean enabled)
PXElasticLayout
object.
enabled
- true
enables the debug mode,
false
disables itpublic float getLayoutAlignmentX(java.awt.Container target)
getLayoutAlignmentX
in interface java.awt.LayoutManager2
0.5f
public float getLayoutAlignmentY(java.awt.Container target)
getLayoutAlignmentY
in interface java.awt.LayoutManager2
0.5f
public PXElasticConstraints getConstraints(java.awt.Component comp)
PXElasticConstraints
object is returned.
comp
- the component to be queried
PXElasticLayout
; a copy of the actual constraint object is
returned.public void addLayoutComponent(java.lang.String name, java.awt.Component comp)
addLayoutComponent
in interface java.awt.LayoutManager
name
- the string to be associated with the componentcomp
- the component to be addedpublic void addLayoutComponent(java.awt.Component comp, java.lang.Object constraints)
Please note:
Constraints are mutable and are, therefore, cloned when cached.
addLayoutComponent
in interface java.awt.LayoutManager2
comp
- the component to be addedconstraints
- an object that determines how the component is added to
the layout
java.lang.IllegalArgumentException
- if constraints is not a
PXElasticConstraints
public void removeLayoutComponent(java.awt.Component comp)
Most applications do not call this method directly.
removeLayoutComponent
in interface java.awt.LayoutManager
comp
- the component to be removedContainer.remove(Component)
,
Container.removeAll()
public void invalidateLayout(java.awt.Container target)
invalidateLayout
in interface java.awt.LayoutManager2
public java.awt.Dimension minimumLayoutSize(java.awt.Container parent)
parent
container using
this PXElasticLayout
.
Most applications do not call this method directly.
minimumLayoutSize
in interface java.awt.LayoutManager
parent
- the container in which to do the layout
parent
containerpublic java.awt.Dimension preferredLayoutSize(java.awt.Container parent)
parent
container using
this PXElasticLayout
.
Most applications do not call this method directly.
preferredLayoutSize
in interface java.awt.LayoutManager
parent
- the container in which to do the layout
parent
containerpublic java.awt.Dimension maximumLayoutSize(java.awt.Container parent)
maximumLayoutSize
in interface java.awt.LayoutManager2
parent
- the container in which to do the layout
parent
containerpublic void layoutContainer(java.awt.Container parent)
PXElasticLayout
.
Most applications do not call this method directly.
layoutContainer
in interface java.awt.LayoutManager
parent
- the container in which to do the layoutprotected boolean isLayoutInfoValid()
true
if the layout information of this layout
manager is valid, else false
protected PXElasticConstraints getConstraintsImpl(java.awt.Component comp)
GridBagConstraints
object used
by the layout mechanism.
comp
- the component to be queried
protected void invalidateLayoutInfo()
public void setHeedingInvisibleComponents(boolean heedingInvisibleComp)
heedingInvisibleComp
- true
, if invisible components
should be heeded when calculating the layout, else false
isHeedingInvisibleComponents()
public boolean isHeedingInvisibleComponents()
true
, if invisible components are heeded when
calculating the layout, else false
setHeedingInvisibleComponents(boolean)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |