BioLegato 0.7.5 Core API

org.biolegato.menu
Class Chooser

java.lang.Object
  extended by org.biolegato.menu.ListWidget
      extended by org.biolegato.menu.Chooser
All Implemented Interfaces:
java.awt.event.ActionListener, java.util.EventListener, Widget

public class Chooser
extends ListWidget
implements java.awt.event.ActionListener

Wrapper class for a group of radiobuttons. NOTE: This can be added to any JContainer since it extends JPanel.

Author:
Graham Alvare, Brian Fristensky

Field Summary
 
Fields inherited from class org.biolegato.menu.ListWidget
index, label, names, values
 
Constructor Summary
Chooser(java.lang.String label, java.lang.String[] names, java.lang.String[] values, int index)
          Creates a new instance of EZChooser.
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
          Handles selection changes of the radio buttons.
 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 chooser widget
 java.lang.Object getValue()
          Returns the value of the variable.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Chooser

public Chooser(java.lang.String label,
               java.lang.String[] names,
               java.lang.String[] values,
               int index)
Creates a new instance of EZChooser.

Parameters:
data - The value/name list of each of the radiobuttons
Method Detail

display

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

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

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)
Handles selection changes of the radio buttons.

Specified by:
actionPerformed in interface java.awt.event.ActionListener
Parameters:
e - used to determine which button is selected (by use of getActionCommand()).

getValue

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

Specified by:
getValue in interface Widget
Returns:
the current value of the variable

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

BioLegato 0.7.5 Core API

Copyright © 2008-2011 University of Manitoba.