BioLegato 0.7.5 Core API

org.biolegato.menu
Class NumberWidget

java.lang.Object
  extended by org.biolegato.menu.NumberWidget
All Implemented Interfaces:
java.util.EventListener, javax.swing.event.ChangeListener, Widget

public class NumberWidget
extends java.lang.Object
implements Widget, javax.swing.event.ChangeListener

Wraps a widget(s) for selecting numeric values.

Author:
Graham Alvare, Brian Fristensky

Constructor Summary
NumberWidget(java.lang.String label, int min, int max, int value)
          Creates a new instance of EZSlider
 
Method Summary
 void close()
          Notifies the variable that the program has now completed successfully, and it can perform any closing operations
 void display(java.awt.Container dest)
          Displays the number widget
 java.lang.Object getValue()
          Returns the current value of the variable.
 void stateChanged(javax.swing.event.ChangeEvent e)
          Handles synchronization between the slider and the spinner.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NumberWidget

public NumberWidget(java.lang.String label,
                    int min,
                    int max,
                    int value)
Creates a new instance of EZSlider

Parameters:
data - the map containing all of the information required to make the number selector.
Method Detail

stateChanged

public void stateChanged(javax.swing.event.ChangeEvent e)
Handles synchronization between the slider and the spinner.

Specified by:
stateChanged in interface javax.swing.event.ChangeListener
Parameters:
e - used to determine which widget was changed.

display

public void display(java.awt.Container dest)
Displays the number widget

Specified by:
display in interface Widget
Parameters:
dest - the destination to display the number widget

close

public void close()
Description copied from interface: Widget
Notifies the variable that the program has now completed successfully, and it can perform any closing operations

Specified by:
close in interface Widget

getValue

public java.lang.Object getValue()
Returns the current value of the variable.

Specified by:
getValue in interface Widget
Returns:
the value selected by the slider/spinner.

BioLegato 0.7.5 Core API

Copyright © 2008-2011 University of Manitoba.