net.hydromatic.clapham.graph
Class Node

java.lang.Object
  extended by net.hydromatic.clapham.graph.Node
Direct Known Subclasses:
AltNode

public class Node
extends Object

TODO:

Since:
Jul 30, 2008
Author:
jhyde
 

Field Summary
 Node down
           
 Node itergraph
           
 int n
           
 Node next
           
 Point2D.Float posLine
           
 Node sub
           
 Symbol sym
           
 NodeType typ
           
 boolean up
           
 
Constructor Summary
Node(Grammar grammar, NodeType typ, Node sub)
           
Node(Grammar grammar, Symbol sym)
           
 
Method Summary
 void accept(net.hydromatic.clapham.graph.Chart.NodeVisitor nodeVisitor)
           
 void calcPos(Chart chart, float posBegin)
          Calculates the horizontal position of the symbols.
 Size calcSize(Chart chart)
          Calculates the size of each symbol.
 void drawComponents(Chart chart, Point2D.Float p, Size s)
          Draws the components from left to right.
 void setWrapSize(Chart chart)
           
 void unparse(StringBuffer buf)
           
 void visitChildren(net.hydromatic.clapham.graph.Chart.NodeVisitor visitor)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

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
Constructor Detail

Node

public Node(Grammar grammar,
            Symbol sym)

Node

public Node(Grammar grammar,
            NodeType typ,
            Node sub)
Method Detail

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)

SourceForge.net_Logo