jebl.gui.trees.treeviewer_dev.painters
Class ScaleBarPainter
java.lang.Object
jebl.gui.trees.treeviewer_dev.painters.AbstractPainter<T>
jebl.gui.trees.treeviewer_dev.painters.LabelPainter<TreePane>
jebl.gui.trees.treeviewer_dev.painters.ScaleBarPainter
- All Implemented Interfaces:
- Painter<TreePane>
public class ScaleBarPainter
- extends LabelPainter<TreePane>
- Author:
- Andrew Rambaut, Alexei Drummond
Methods inherited from class jebl.gui.trees.treeviewer_dev.painters.LabelPainter |
getBackground, getBorderPaint, getBorderStroke, getFont, getForeground, getNumberFormat, isVisible, setBackground, setBorder, setFont, setForeground, setNumberFormat, setVisible |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
treePane
protected TreePane treePane
ScaleBarPainter
public ScaleBarPainter()
ScaleBarPainter
public ScaleBarPainter(double scaleRange)
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,
TreePane treePane)
- 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).
paint
public void paint(Graphics2D g2,
TreePane treePane,
Painter.Justification justification,
Rectangle2D bounds)
- Description copied from interface:
Painter
- Called to actually paint into the current graphics context. The painter should
respect the bounds.
getPreferredWidth
public double getPreferredWidth()
getPreferredHeight
public double getPreferredHeight()
getHeightBound
public double getHeightBound()
getScaleBarStroke
public BasicStroke getScaleBarStroke()
setScaleBarStroke
public void setScaleBarStroke(BasicStroke scaleBarStroke)
getScaleRange
public double getScaleRange()
setScaleRange
public void setScaleRange(double scaleRange)
setAutomaticScale
public void setAutomaticScale(boolean automaticScale)
setControlPalette
public void setControlPalette(ControlPalette controlPalette)
calculateScaleRange
public void calculateScaleRange()
getAttributes
public String[] getAttributes()
- Specified by:
getAttributes
in class LabelPainter<TreePane>
setupAttributes
public void setupAttributes(Tree tree)
- Specified by:
setupAttributes
in class LabelPainter<TreePane>
setDisplayAttribute
public void setDisplayAttribute(String displayAttribute)
- Specified by:
setDisplayAttribute
in class LabelPainter<TreePane>