|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectnet.goui.util.GraphLayout.Edge
net.goui.awt.GoLayout.Cell
This class encapsulates a cell within the layout structure. Instances of this class are obtained by using the getCell() method of Row. Primarily knowledge of this class will be required if you wish to modify the attributes of a Cell after the layout has been created.
| Method Summary | |
boolean |
getActive()
Return the active status of this Cell. |
int |
getAlignment()
This method returns the vertical alignment constant for this Cell. |
java.awt.Dimension |
getCellSize()
Returns the current explicitly set size for this Cell. |
int |
getComponentIndex()
This method returns the Component index for this Cell. |
int |
getMaxSize()
This method exists as part of the internal implementation of the GoLayout classes and should not be called directly. |
int |
getMinSize()
This method exists as part of the internal implementation of the GoLayout classes and should not be called directly. |
int |
getWeight()
This method returns the horizontal layout weight for this Cell. |
void |
invalidate()
This method exists as part of the internal implementation of the GoLayout classes and should not be called directly. |
void |
setActive(boolean flag)
This methods controls whether the Cell is active or not. |
void |
setAlignment(int align)
This method sets the vertical alignment for this Cell. |
void |
setCellSize(int width,
int height)
This method is used to override the minimum and preferred size of the Component with which this Cell is associated or to explicitly set a size for an empty Cell. |
void |
setComponentIndex(int index)
This method sets the Component index for this Cell. |
void |
setWeight(int weight)
Set the weight of this Cell instance. |
| Methods inherited from class net.goui.util.GraphLayout.Edge |
getSize, getVertexNeg, getVertexPos, remove |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
public void setActive(boolean flag)
Note that if the active status of a Cell is changed then any Containers using the associated layout will need to be laid out again before the changes will take effect.
flag - The boolean which controls if the Cell is active.public boolean getActive()
public void setAlignment(int align)
align - The vertical alignment constant.public int getAlignment()
public void setComponentIndex(int index)
Note that if during the layout of a Container, a Cell's index does not correspond to a Component within the Container then an exception will be thrown and it is up to the user of this class to ensure that any explicitly set indices on Cells correspond to valid Components.
index - The index of the Component for this Cell or -1.public int getComponentIndex()
public void setCellSize(int width,
int height)
Note that this method is the only way in which a Component can be laid out below its minimum size and care should be taken when using it to ensure that any sizes used are always sufficient to ensure that the Components will always be rendered correctly.
Also because this method is not advocated for normal use, the layout string syntax does not support the declaration of an explicit size for a Cell so this method is the only means by which this behaviour can be controlled.
width - The forced width for this Cell or -1.height - The forced width for this Cell or -1.public java.awt.Dimension getCellSize()
public void setWeight(int weight)
weight - The non-negative weight value for this Cell.public int getWeight()
getWeight in interface GraphLayout.EdgeConstraintgetWeight in class GraphLayout.EdgeGraphLayout.EdgeConstraintpublic int getMinSize()
getMinSize in interface GraphLayout.EdgeConstraintgetMinSize in class GraphLayout.EdgeGraphLayout.EdgeConstraintpublic int getMaxSize()
getMaxSize in interface GraphLayout.EdgeConstraintgetMaxSize in class GraphLayout.EdgeGraphLayout.EdgeConstraintpublic void invalidate()
invalidate in interface GraphLayout.EdgeConstraintinvalidate in class GraphLayout.EdgeGraphLayout.EdgeConstraint
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||