jInfer

cz.cuni.mff.ksi.jinfer.basicruledisplayer.logic
Class NodePainter

java.lang.Object
  extended by cz.cuni.mff.ksi.jinfer.basicruledisplayer.logic.NodePainter

public class NodePainter
extends Object

Class for painting XML nodes.


Constructor Summary
NodePainter(Graphics2D graphics)
          Full constructor.
 
Method Summary
 Image drawNode(Regexp<AbstractStructuralNode> r, int level)
          Renders an abstract node and returns its image representation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NodePainter

public NodePainter(Graphics2D graphics)
Full constructor.

Parameters:
graphics - Graphics object used to get font metrics.
Method Detail

drawNode

public Image drawNode(Regexp<AbstractStructuralNode> r,
                      int level)
Renders an abstract node and returns its image representation.

Parameters:
r - Node to be rendered. Must not be null.
level - Level of recursion - how deep in the tree are we.
Returns:
Image representation of this node. If the level is higher that the threshold from configuration, an image of three dots is returned.

jInfer

Generated on Fri Dec 9 00:01:25 CET 2011