jebl.gui.trees.treeviewer.painters
Class ScaleBarPainter

java.lang.Object
  extended by jebl.gui.trees.treeviewer.painters.AbstractPainter<TreePane>
      extended by jebl.gui.trees.treeviewer.painters.ScaleBarPainter
All Implemented Interfaces:
Painter<TreePane>, ControlsProvider

public class ScaleBarPainter
extends AbstractPainter<TreePane>

Author:
Andrew Rambaut, Alexei Drummond

Nested Class Summary
 
Nested classes/interfaces inherited from interface jebl.gui.trees.treeviewer.painters.Painter
Painter.Justification, Painter.Orientation
 
Constructor Summary
ScaleBarPainter()
           
ScaleBarPainter(double scaleRange)
           
ScaleBarPainter(double scaleRange, int defaultSize)
           
ScaleBarPainter(int defaultSize)
           
 
Method Summary
 void calibrate(Graphics2D g2, TreePane treePane)
           
 List<Controls> getControls(boolean detachPrimaryCheckbox)
          Get a list of Controls handled by this provider.
 double getHeightBound()
           
 double getPreferredHeight()
           
 double getPreferredWidth()
           
 void getSettings(ControlsSettings settings)
          Get the settings for a given Controls object.
 boolean isVisible()
           
 void paint(Graphics2D g2, TreePane treePane, Painter.Justification justification, Rectangle2D bounds)
           
 void setBackground(Paint background)
           
 void setBorder(Paint borderPaint, Stroke borderStroke)
           
 void setControlPalette(ControlPalette controlPalette)
          Give the controls provider with a handle for the controlPalette object.
 void setFontSize(float size)
           
 void setForeground(Paint foreground)
           
 void setLineWeight(float weight)
           
 void setScaleRange(double scaleRange)
           
 void setSettings(ControlsSettings settings)
          Give the provider some settings.
 void setVisible(boolean visible)
           
 
Methods inherited from class jebl.gui.trees.treeviewer.painters.AbstractPainter
addPainterListener, firePainterChanged, removePainterListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ScaleBarPainter

public ScaleBarPainter()

ScaleBarPainter

public ScaleBarPainter(double scaleRange)

ScaleBarPainter

public ScaleBarPainter(int defaultSize)

ScaleBarPainter

public ScaleBarPainter(double scaleRange,
                       int defaultSize)
Method Detail

isVisible

public boolean isVisible()

setVisible

public void setVisible(boolean visible)

calibrate

public void calibrate(Graphics2D g2,
                      TreePane treePane)

paint

public void paint(Graphics2D g2,
                  TreePane treePane,
                  Painter.Justification justification,
                  Rectangle2D bounds)

getPreferredWidth

public double getPreferredWidth()

getPreferredHeight

public double getPreferredHeight()

getHeightBound

public double getHeightBound()

setScaleRange

public void setScaleRange(double scaleRange)

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)

setLineWeight

public void setLineWeight(float weight)

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.