|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgov.nasa.gsfc.drl.rtstps.library.layout.WidthManager
final class WidthManager
This is a utility class that layout managers use. Its job is to determine the start pixels and widths of a row of components. You may add glue or horizontal glue.
Nested Class Summary | |
---|---|
(package private) class |
WidthManager.Item
|
Field Summary | |
---|---|
private boolean |
_distributeFatToGaps
|
private int |
_hgap
|
private java.util.LinkedList<WidthManager.Item> |
_itemList
|
private int |
_leftMargin
|
private int |
_minimumHeight
the min and preferred sizes minus the margins. |
private int |
_minimumWidth
|
private int |
_preferredHeight
|
private int |
_preferredWidth
|
private int |
_rightMargin
|
private float |
_totalWeight
|
private boolean |
_valid
|
Constructor Summary | |
---|---|
WidthManager(int gap)
Construct a WidthManager object. |
Method Summary | |
---|---|
(package private) void |
addComponent(java.awt.Component c,
float weight)
Add a component with a weight. |
(package private) void |
doLayout(java.awt.Container parent,
int ystart,
int yheight)
Lay out the container. |
(package private) int |
getMinimumHeight()
Get the minimum height for the row, which is the largest minimum height of all components in the row. |
(package private) int |
getMinimumWidth()
Get the minimum width of the row. |
(package private) int |
getPreferredHeight()
Get the preferred height for the row, which is the largest preferred height of all components in the row. |
(package private) int |
getPreferredWidth()
Get the preferred width of the row. |
private int |
giveFatToComponents(int fat)
|
(package private) void |
removeComponent(java.awt.Component c)
Remove a component. |
(package private) void |
setDistributeSpaceToGaps(boolean c)
Determines how to distribute extra space when all components have zero weight and there is no glue. |
(package private) void |
setGap(int gap)
Set a horizontal gap. |
(package private) void |
setMargins(int leftMargin,
int rightMargin)
Set the left and right margins in pixels. |
(package private) void |
validate()
Validate the layout. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private java.util.LinkedList<WidthManager.Item> _itemList
private boolean _valid
private int _hgap
private int _leftMargin
private int _rightMargin
private float _totalWeight
private boolean _distributeFatToGaps
private int _minimumHeight
private int _preferredHeight
private int _minimumWidth
private int _preferredWidth
Constructor Detail |
---|
WidthManager(int gap)
Method Detail |
---|
void addComponent(java.awt.Component c, float weight)
void removeComponent(java.awt.Component c)
void setDistributeSpaceToGaps(boolean c)
void setMargins(int leftMargin, int rightMargin)
void setGap(int gap)
int getPreferredHeight()
int getMinimumHeight()
int getPreferredWidth()
int getMinimumWidth()
void validate()
void doLayout(java.awt.Container parent, int ystart, int yheight)
parent
- The container.ystart
- The row's y pixel location.yheight
- The row's height.private int giveFatToComponents(int fat)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |