net.hydromatic.clapham.graph
Class Node
java.lang.Object
net.hydromatic.clapham.graph.Node
- Direct Known Subclasses:
- AltNode
public class Node
- extends Object
TODO:
- Since:
- Jul 30, 2008
- Author:
- jhyde
-
-
n
public final int n
typ
public NodeType typ
next
public Node next
down
public Node down
sub
public Node sub
up
public boolean up
sym
public Symbol sym
itergraph
public Node itergraph
posLine
public final Point2D.Float posLine
Node
public Node(Grammar grammar,
Symbol sym)
Node
public Node(Grammar grammar,
NodeType typ,
Node sub)
unparse
public void unparse(StringBuffer buf)
setWrapSize
public void setWrapSize(Chart chart)
calcSize
public Size calcSize(Chart chart)
- Calculates the size of each symbol.
calcPos
public void calcPos(Chart chart,
float posBegin)
- Calculates the horizontal position of the symbols.
drawComponents
public void drawComponents(Chart chart,
Point2D.Float p,
Size s)
- Draws the components from left to right.
Each component paints itself and then give its coordinates to its
sub-components for a recursive call, or if applicable, a call to
the drawComponentsInverse(net.hydromatic.clapham.graph.Chart, java.awt.geom.Point2D.Float, net.hydromatic.clapham.graph.Size)
method.
accept
public void accept(net.hydromatic.clapham.graph.Chart.NodeVisitor nodeVisitor)
visitChildren
public void visitChildren(net.hydromatic.clapham.graph.Chart.NodeVisitor visitor)