net.goui.awt
Class GoLayout.Row

java.lang.Object
  extended bynet.goui.util.GraphLayout.Path
      extended bynet.goui.awt.GoLayout.Row
All Implemented Interfaces:
GraphLayout.EdgeConstraint
Enclosing class:
GoLayout

public final class GoLayout.Row
extends GraphLayout.Path
implements GraphLayout.EdgeConstraint

Author:
David Beaumont, Copyright 2005

This class encapsulates a row within the layout structure. Instances of this class are obtained by using the getRow() method of GraphLayout. Primarily knowledge of this class will be required if you wish to modify the attributes of a Row or a Cell within it after the layout has been created.


Method Summary
 GoLayout.Cell getCell(int index)
          This method returns the Cell instance corresponding to the specified index within this Row.
 int getCellCount()
          This method returns the number of Cells in this Row.
 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 vertical layout weight for this Row.
 void invalidate()
          This method exists as part of the internal implementation of the GoLayout classes and should not be called directly.
 void setWeight(int weight)
          Set the weight of this Row instance.
 
Methods inherited from class net.goui.util.GraphLayout.Path
getEdge, getEdgeCount, layout, setBounds, setPath, setPath
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getCellCount

public int getCellCount()
This method returns the number of Cells in this Row. This can be used in conjunction with getCell() to enumerate the available Cells.

Returns:
The number of Cells in this Row

getCell

public GoLayout.Cell getCell(int index)
This method returns the Cell instance corresponding to the specified index within this Row.

Parameters:
index - The index of the Cell to be returned.
Returns:
The Cell corresponding to the given index.
Throws:
java.lang.IndexOutOfBoundsException - if no such Cell exists.

setWeight

public void setWeight(int weight)
Set the weight of this Row instance. This method modifies the existing weight of this Row and will affect the vertical layout of Components. Setting a value here has the same effect as specifying the same weight value for this Row in the original layout string with which the GraphLayout was constructed.

Parameters:
weight - The non-negative weight value for this Row.

getWeight

public int getWeight()
This method returns the vertical layout weight for this Row.

Specified by:
getWeight in interface GraphLayout.EdgeConstraint
Returns:
The non-negative weight of this Row.

getMinSize

public int getMinSize()
This method exists as part of the internal implementation of the GoLayout classes and should not be called directly.

Specified by:
getMinSize in interface GraphLayout.EdgeConstraint
Returns:
The non-negative minimum size for the associated edge.

getMaxSize

public int getMaxSize()
This method exists as part of the internal implementation of the GoLayout classes and should not be called directly.

Specified by:
getMaxSize in interface GraphLayout.EdgeConstraint

invalidate

public void invalidate()
This method exists as part of the internal implementation of the GoLayout classes and should not be called directly.

Specified by:
invalidate in interface GraphLayout.EdgeConstraint