jebl.gui.trees.treeviewer_dev.painters
Class NodeBarPainter

java.lang.Object
  extended by jebl.gui.trees.treeviewer_dev.painters.AbstractPainter<Node>
      extended by jebl.gui.trees.treeviewer_dev.painters.NodePainter
          extended by jebl.gui.trees.treeviewer_dev.painters.NodeBarPainter
All Implemented Interfaces:
Painter<Node>

public class NodeBarPainter
extends NodePainter

Author:
Andrew Rambaut

Nested Class Summary
 
Nested classes/interfaces inherited from interface jebl.gui.trees.treeviewer_dev.painters.Painter
Painter.Justification, Painter.Orientation
 
Constructor Summary
NodeBarPainter()
           
 
Method Summary
 Rectangle2D calibrate(Graphics2D g2, Node node)
          Called to calibrate the painters for a given graphics context.
 String[] getAttributeNames()
           
 String getDisplayAttributeName()
           
 double getHeightBound()
           
 Line2D getNodeBar()
           
 double getPreferredHeight()
           
 double getPreferredWidth()
           
 void paint(Graphics2D g2, Node node, Painter.Justification justification, Rectangle2D bounds)
          The bounds define the shape of the nodeBar so just draw it
 void paint(Graphics2D g2, Node node, Painter.Justification justification, Shape barShape)
          The bounds define the shape of the nodeBar so just draw it
 void setDisplayAttribute(String displayAttribute)
           
 void setTreePane(TreePane treePane)
          Called when the painter is installed in a TreePane.
 void setupAttributes(Tree tree)
           
 
Methods inherited from class jebl.gui.trees.treeviewer_dev.painters.NodePainter
getBackground, getBorderPaint, getBorderStroke, getForeground, getStroke, isVisible, setBackground, setBorder, setForeground, setStroke, setVisible
 
Methods inherited from class jebl.gui.trees.treeviewer_dev.painters.AbstractPainter
addPainterListener, firePainterChanged, firePainterSettingsChanged, removePainterListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NodeBarPainter

public NodeBarPainter()
Method Detail

setupAttributes

public void setupAttributes(Tree tree)

setTreePane

public void setTreePane(TreePane treePane)
Description copied from interface: Painter
Called when the painter is installed in a TreePane. Gives the painter a handle on the TreePane so that it get additional information.


getNodeBar

public Line2D getNodeBar()

calibrate

public Rectangle2D calibrate(Graphics2D g2,
                             Node node)
Description copied from interface: Painter
Called to calibrate the painters for a given graphics context. This should work out the preferred width and height (perhaps for the current font).


getPreferredWidth

public double getPreferredWidth()

getPreferredHeight

public double getPreferredHeight()

getHeightBound

public double getHeightBound()

paint

public void paint(Graphics2D g2,
                  Node node,
                  Painter.Justification justification,
                  Shape barShape)
The bounds define the shape of the nodeBar so just draw it

Parameters:
g2 -
node -
justification -
barShape -

paint

public void paint(Graphics2D g2,
                  Node node,
                  Painter.Justification justification,
                  Rectangle2D bounds)
The bounds define the shape of the nodeBar so just draw it

Parameters:
g2 -
node -
justification -
bounds -

getAttributeNames

public String[] getAttributeNames()

getDisplayAttributeName

public String getDisplayAttributeName()

setDisplayAttribute

public void setDisplayAttribute(String displayAttribute)