jebl.gui.trees.treeviewer.painters
Class BasicLabelPainter
java.lang.Object
jebl.gui.trees.treeviewer.painters.AbstractPainter<Node>
jebl.gui.trees.treeviewer.painters.BasicLabelPainter
- All Implemented Interfaces:
- Painter<Node>, ControlsProvider
public class BasicLabelPainter
- extends AbstractPainter<Node>
- Author:
- Andrew Rambaut
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TAXON_NAMES
public static final String TAXON_NAMES
- See Also:
- Constant Field Values
NODE_HEIGHTS
public static final String NODE_HEIGHTS
- See Also:
- Constant Field Values
BRANCH_LENGTHS
public static final String BRANCH_LENGTHS
- See Also:
- Constant Field Values
attribute
protected String attribute
attributes
protected String[] attributes
BasicLabelPainter
public BasicLabelPainter(String title,
RootedTree tree,
BasicLabelPainter.PainterIntent intent)
BasicLabelPainter
public BasicLabelPainter(String title,
RootedTree tree,
BasicLabelPainter.PainterIntent intent,
int defaultSize)
getLabel
protected String getLabel(Node node)
isVisible
public boolean isVisible()
setVisible
public void setVisible(boolean visible)
calibrate
public void calibrate(Graphics2D g2,
Node item)
getPreferredWidth
public double getPreferredWidth()
getPreferredHeight
public double getPreferredHeight()
getHeightBound
public double getHeightBound()
setFontSize
public void setFontSize(float size)
setForeground
public void setForeground(Paint foreground)
setBackground
public void setBackground(Paint background)
setBorder
public void setBorder(Paint borderPaint,
Stroke borderStroke)
paint
public void paint(Graphics2D g2,
Node item,
Painter.Justification justification,
Rectangle2D bounds)
getAttributes
public String[] getAttributes()
setAttribute
public void setAttribute(String attribute)
setControlPalette
public void setControlPalette(ControlPalette controlPalette)
- Description copied from interface:
ControlsProvider
- Give the controls provider with a handle for the controlPalette object.
getControls
public List<Controls> getControls(boolean detachPrimaryCheckbox)
- Description copied from interface:
ControlsProvider
- Get a list of Controls handled by this provider.
- Parameters:
detachPrimaryCheckbox
- When false, do nothing. When true, if controls have a "main" on/off switch
(implemented as a JCheckBox), that checkbox should not be included in the controls panel but returned in
- Returns:
- A list of Controls
- See Also:
Controls.getPrimaryCheckbox()
setSettings
public void setSettings(ControlsSettings settings)
- Description copied from interface:
ControlsProvider
- Give the provider some settings.
getSettings
public void getSettings(ControlsSettings settings)
- Description copied from interface:
ControlsProvider
- Get the settings for a given Controls object.
getTitle
public String getTitle()