Home /
Development /
Documentation /
2.0.44 /
ScaleBarIntervalKeyListener
info.bioinfweb.treegraph.gui.dialogs.elementformats
Class ScaleBarIntervalKeyListener
java.lang.Object
java.awt.event.KeyAdapter
info.bioinfweb.treegraph.gui.dialogs.elementformats.ScaleBarIntervalKeyListener
- All Implemented Interfaces:
- KeyListener, EventListener
public class ScaleBarIntervalKeyListener
- extends KeyAdapter
Used in ScaleBarPanel
to display the length of the small and long interval in millimeters
and points while the user enters a value in branch length units. (See the
help system for details.)
- Since:
- 2.0.41
- Author:
- Ben Stöver
- See Also:
ScaleBarPanel
,
ScaleBarFormats
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LENGTH_FORMAT
public static final DecimalFormat LENGTH_FORMAT
owner
private ElementFormatsDialog owner
label
private JLabel label
smallIntervalInput
private info.webinsel.util.swing.DecimalInput smallIntervalInput
longIntervalInput
private info.webinsel.util.swing.DecimalInput longIntervalInput
ScaleBarIntervalKeyListener
public ScaleBarIntervalKeyListener(ElementFormatsDialog owner,
JLabel label,
info.webinsel.util.swing.DecimalInput smallIntervalInput,
info.webinsel.util.swing.DecimalInput longIntervalInput)
- Creates a
ScaleBarIntervalKeyListener
.
- Parameters:
owner
- the owner of the ScaleBarPanel
used to determine the branch length scale from
the currently associated documentlabel
- the output labelsmallIntervalInput
- the small interval input of the panellongIntervalInput
- the small interval input of the panel or null
of the length of
the small interval shall be specified
getIntervalLabelText
private String getIntervalLabelText(float brLenUnits)
keyReleased
public void keyReleased(KeyEvent e)
- Specified by:
keyReleased
in interface KeyListener
- Overrides:
keyReleased
in class KeyAdapter
refreshText
public void refreshText()
- Refreshes the label text depending of the value of the small and long interval decimal input.