Home / Development / Documentation / 2.0.44 / ScaleValueInput
TreeGraph 2
 


info.bioinfweb.treegraph.gui.dialogs.elementformats
Class ScaleValueInput

java.lang.Object
  extended by info.webinsel.util.swing.DecimalInput
      extended by info.bioinfweb.treegraph.gui.dialogs.DecimalUnitInput
          extended by info.bioinfweb.treegraph.gui.dialogs.elementformats.ScaleValueInput

public class ScaleValueInput
extends DecimalUnitInput

Used to edit distance values in millimeters, points or scale bar units.

Author:
Ben Stöver
See Also:
ElementFormatsDialog, ScaleBarPanel

Field Summary
private  float branchLengthScale
           
private  String previousUnit
           
static String UNIT_SCALE
           
 
Fields inherited from class info.webinsel.util.swing.DecimalInput
DOUBLE_FORMAT, FLOAT_FORMAT, INTEGER_FORMAT
 
Constructor Summary
ScaleValueInput(String labelText, JPanel panel, int y)
           
 
Method Summary
 void assignValueTo(ScaleValue target)
           
protected  void customizeComboBox(JComboBox comboBox)
           
 float getBranchLengthScale()
           
 ScaleValue getValue()
           
 void setBranchLengthScale(float branchLengthScale)
          The branch length scale is used to convert millimeters and points to scale values.
 void setValue(ScaleValue value)
           
 
Methods inherited from class info.bioinfweb.treegraph.gui.dialogs.DecimalUnitInput
getComboBox, setEnabled
 
Methods inherited from class info.webinsel.util.swing.DecimalInput
createLabelTable, getChangeMonitor, getDecimalFormat, getLabel, getTextField, parseDouble, parseFloat, parseInt, parseLong, setDecimalFormatStr, setValue, setValue, setValue, setValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

UNIT_SCALE

public static final String UNIT_SCALE
See Also:
Constant Field Values

previousUnit

private String previousUnit

branchLengthScale

private float branchLengthScale
Constructor Detail

ScaleValueInput

public ScaleValueInput(String labelText,
                       JPanel panel,
                       int y)
Method Detail

getBranchLengthScale

public float getBranchLengthScale()

setBranchLengthScale

public void setBranchLengthScale(float branchLengthScale)
The branch length scale is used to convert millimeters and points to scale values. It should be refreshed every time the dialog, that uses this input is displayed (and the apply document or the value itself might have changed).

Parameters:
branchLengthScale - the new value of the branch length scale

customizeComboBox

protected void customizeComboBox(JComboBox comboBox)
Specified by:
customizeComboBox in class DecimalUnitInput

setValue

public void setValue(ScaleValue value)

assignValueTo

public void assignValueTo(ScaleValue target)

getValue

public ScaleValue getValue()