org.openbp.jaspira.option.widget
Class SelectionWidget

java.lang.Object
  extended by org.openbp.jaspira.option.OptionWidget
      extended by org.openbp.jaspira.option.widget.SelectionWidget
All Implemented Interfaces:
java.awt.event.ActionListener, java.util.EventListener

public class SelectionWidget
extends OptionWidget
implements java.awt.event.ActionListener

Selection field widget. This widget displays a list of text selection values in a JSelectionField component.

Author:
Jens Ferchland

Field Summary
 
Fields inherited from class org.openbp.jaspira.option.OptionWidget
option
 
Constructor Summary
SelectionWidget(Option option, java.util.List values)
          Constructor.
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
           
 java.lang.Object getValue()
          Returns the value of the option widget.
 javax.swing.JComponent getWidgetComponent()
          Gets the widget component that visualizes the option.
 void setValue(java.lang.Object o)
          Sets the value that will be displayed in the option widget.
 
Methods inherited from class org.openbp.jaspira.option.OptionWidget
createHeading, getDescriptionComponent, getOption, notifyOptionMgrOfOptionChange
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SelectionWidget

public SelectionWidget(Option option,
                       java.util.List values)
Constructor.

Parameters:
option - Option the widget refers to
values - Values to display as radio buttons (arbitrary objects or LocalizableOptionString objects)
Method Detail

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)
Specified by:
actionPerformed in interface java.awt.event.ActionListener

getValue

public java.lang.Object getValue()
Description copied from class: OptionWidget
Returns the value of the option widget. This value might be different from the actual option value as long as the option has not been comitted.

Specified by:
getValue in class OptionWidget

setValue

public void setValue(java.lang.Object o)
Description copied from class: OptionWidget
Sets the value that will be displayed in the option widget.

Specified by:
setValue in class OptionWidget

getWidgetComponent

public javax.swing.JComponent getWidgetComponent()
Description copied from class: OptionWidget
Gets the widget component that visualizes the option.

Specified by:
getWidgetComponent in class OptionWidget


Copyright © 2011. All Rights Reserved.