jebl.gui.trees.treeviewer_dev.painters
Class NodeBarPainter
java.lang.Object
jebl.gui.trees.treeviewer_dev.painters.AbstractPainter<Node>
jebl.gui.trees.treeviewer_dev.painters.NodePainter
jebl.gui.trees.treeviewer_dev.painters.NodeBarPainter
- All Implemented Interfaces:
- Painter<Node>
public class NodeBarPainter
- extends NodePainter
- Author:
- Andrew Rambaut
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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NodeBarPainter
public NodeBarPainter()
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)