BioLegato 0.7.3 Core API

org.biolegato.core.pcdmenu.widgets
Class DecimalWidget

java.lang.Object
  extended by org.biolegato.core.pcdmenu.widgets.DecimalWidget
All Implemented Interfaces:
java.util.EventListener, javax.swing.event.ChangeListener, Widget

public class DecimalWidget
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
DecimalWidget(java.lang.String label, double min, double max, double value)
          Creates a new instance of DecimalWidget
 
Method Summary
 void close()
          Notifies the variable that the program has now completed successfully, and it can perform any closing operations
 java.awt.Component display()
          Displays the current object
static java.lang.String getType()
          Returns the name of this type of variable.
 java.lang.Object getValue()
          Returns the current value of the variable.
 void stateChanged(javax.swing.event.ChangeEvent e)
          Receives the new value on spinner changes
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DecimalWidget

public DecimalWidget(java.lang.String label,
                     double min,
                     double max,
                     double value)
Creates a new instance of DecimalWidget

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)
Receives the new value on spinner changes

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

getType

public static java.lang.String getType()
Returns the name of this type of variable.

Returns:
the name of the variable type -- "slider".

display

public java.awt.Component display()
Description copied from interface: Widget
Displays the current object

Specified by:
display in interface 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 spinner.

BioLegato 0.7.3 Core API

Copyright © 2008-2010 University of Manitoba.