jebl.gui.trees.treeviewer_dev.painters
Class NodeShapePainter
java.lang.Object
jebl.gui.trees.treeviewer_dev.painters.AbstractPainter<Node>
jebl.gui.trees.treeviewer_dev.painters.NodePainter
jebl.gui.trees.treeviewer_dev.painters.NodeShapePainter
- All Implemented Interfaces:
- Painter<Node>
public class NodeShapePainter
- 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 |
AREA_ATTRIBUTE
public static final String AREA_ATTRIBUTE
- See Also:
- Constant Field Values
RADIUS_ATTRIBUTE
public static final String RADIUS_ATTRIBUTE
- See Also:
- Constant Field Values
WIDTH_ATTRIBUTE
public static final String WIDTH_ATTRIBUTE
- See Also:
- Constant Field Values
HEIGHT_ATTRIBUTE
public static final String HEIGHT_ATTRIBUTE
- See Also:
- Constant Field Values
LOWER_ATTRIBUTE
public static final String LOWER_ATTRIBUTE
- See Also:
- Constant Field Values
UPPER_ATTRIBUTE
public static final String UPPER_ATTRIBUTE
- See Also:
- Constant Field Values
displayAttributes
protected Map<String,String> displayAttributes
displayValues
protected Map<String,Number> displayValues
attributes
protected String[] attributes
treePane
protected TreePane treePane
NodeShapePainter
public NodeShapePainter()
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.
calibrate
public Rectangle2D calibrate(Graphics2D g2,
Node item)
- 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 item,
Painter.Justification justification,
Rectangle2D bounds)
- The bounds define the shape of the bar so just draw it
- Parameters:
g2
- item
- justification
- bounds
-
getAttributeNames
public String[] getAttributeNames()
setDisplayAttribute
public void setDisplayAttribute(String display,
String attribute)
setDisplayValues
public void setDisplayValues(String display,
double value)