edu.umd.cs.jazz.scenegraph
Class ZLayoutManagerPath

java.lang.Object
  |
  +--edu.umd.cs.jazz.scenegraph.ZLayoutManagerPath

public class ZLayoutManagerPath
extends java.lang.Object
implements ZLayoutManager

ZPathLayoutManager positions a set of nodes along a path.

See Also:
ZNode, ZLayout

Constructor Summary
ZLayoutManagerPath()
          Default Constructor - uses default values unless specifically set
 
Method Summary
 void doLayout(ZNode node)
          Apply this manager's layout algorithm to the specified node's children.
 boolean getClosed()
           
 boolean getExact()
           
 float getFlatness()
           
 java.awt.Shape getShape()
           
 float getSpace()
           
 float getTolerance()
           
 void setClosed(boolean closed)
          Sets whether the path is closed to closed
 void setExact(boolean exact)
          Sets whether the algorithm should iterate to get exact spacing or should run once
 void setFlatness(float flatness)
           
 void setShape(java.awt.Shape shape)
          Sets the shape that this layout manager will use.
 void setSpacing(float space)
           
 void setTolerance(float tolerance)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ZLayoutManagerPath

public ZLayoutManagerPath()
Default Constructor - uses default values unless specifically set
Method Detail

doLayout

public void doLayout(ZNode node)
Apply this manager's layout algorithm to the specified node's children.
Specified by:
doLayout in interface ZLayoutManager
Parameters:
node - The node to apply this layout algorithm to.

getClosed

public boolean getClosed()
Returns:
Is the path closed?

setClosed

public void setClosed(boolean closed)
Sets whether the path is closed to closed
Parameters:
closed - Is the path closed?

getFlatness

public float getFlatness()
Returns:
The current flatness of the FlatteningPathIterator used to convert the Shape to points

setFlatness

public void setFlatness(float flatness)
Parameters:
flatness - Sets the flatness of the FlatteninPathIterator used to convert the Shape to points

getExact

public boolean getExact()
Returns:
Is exact spacing specified

setExact

public void setExact(boolean exact)
Sets whether the algorithm should iterate to get exact spacing or should run once
Parameters:
exact - Whether exact spacing is specified.

getTolerance

public float getTolerance()
Returns:
The tolerance allowed if exact spacing is specified.

setTolerance

public void setTolerance(float tolerance)
Parameters:
tolerance - The tolerance allowed if exact spacing is specified.

getShape

public java.awt.Shape getShape()
Returns:
The shape currently in use by this object.

setShape

public void setShape(java.awt.Shape shape)
Sets the shape that this layout manager will use. Gets the points from this shape using a FlatteningPathIterator with flatness constant of 1.0 by default.
Parameters:
s - The desired layout shape

getSpace

public float getSpace()
Returns:
The current spacing used by the layout algorithm during its first iteration.

setSpacing

public void setSpacing(float space)
Parameters:
space - The spacing used by the layout algorithm during its first iteration.