Home / Development / Documentation / 2.0.44 / ScaleBarIntervalKeyListener
TreeGraph 2
 


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

java.lang.Object
  extended by java.awt.event.KeyAdapter
      extended by 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

Field Summary
private  JLabel label
           
static DecimalFormat LENGTH_FORMAT
           
private  info.webinsel.util.swing.DecimalInput longIntervalInput
           
private  ElementFormatsDialog owner
           
private  info.webinsel.util.swing.DecimalInput smallIntervalInput
           
 
Constructor Summary
ScaleBarIntervalKeyListener(ElementFormatsDialog owner, JLabel label, info.webinsel.util.swing.DecimalInput smallIntervalInput, info.webinsel.util.swing.DecimalInput longIntervalInput)
          Creates a ScaleBarIntervalKeyListener.
 
Method Summary
private  String getIntervalLabelText(float brLenUnits)
           
 void keyReleased(KeyEvent e)
           
 void refreshText()
          Refreshes the label text depending of the value of the small and long interval decimal input.
 
Methods inherited from class java.awt.event.KeyAdapter
keyPressed, keyTyped
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

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
Constructor Detail

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 document
label - the output label
smallIntervalInput - the small interval input of the panel
longIntervalInput - the small interval input of the panel or null of the length of the small interval shall be specified
Method Detail

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.