Class FWSingleCheckboxChoiceSubComponent

All Implemented Interfaces:
ItemListener, ImageObserver, MenuContainer, Serializable, EventListener, Accessible

public class FWSingleCheckboxChoiceSubComponent extends FWAbstractFormSubComponent implements ItemListener
This class is used by FWChoiceFormComponent, to display a single choice.
Author:
Andreas Enders
See Also:
  • Constructor Details

    • FWSingleCheckboxChoiceSubComponent

      public FWSingleCheckboxChoiceSubComponent(Vector<FWFormOption> aOptions, boolean aEnabled, FWObservable aObservable, Map<String,Object> aFormComponentParameterMap)
      Parameters:
      aOptions - List of options to be displayed to the user.
      aEnabled -
      aObservable -
      aFormComponentParameterMap -
    • FWSingleCheckboxChoiceSubComponent

      public FWSingleCheckboxChoiceSubComponent(Vector<FWFormOption> aOptions, boolean aEnabled, FWObservable aObservable, Map<String,Object> aFormComponentParameterMap, String aDefaultValue)
      Parameters:
      aOptions - List of options to be displayed to the user.
      aEnabled -
      aObservable -
      aFormComponentParameterMap -
      aDefaultValue - Comma-separated list of the ids of the checkboxes that should initially be selected.
  • Method Details

    • getValue

      public String getValue()
      Specified by:
      getValue in class FWAbstractFormSubComponent
      Returns:
      comma-separated list of the id-attributes of the currently selected checkboxes
    • getSelectedValueList

      public List<Object> getSelectedValueList()
      Specified by:
      getSelectedValueList in class FWAbstractFormSubComponent
      Returns:
      value of the implemented subcomponent
    • setValue

      public void setValue(String aValue)
      Description copied from class: FWAbstractFormSubComponent
      Allows to set the value of the implemented subcomponent
      Specified by:
      setValue in class FWAbstractFormSubComponent
      Parameters:
      aValue - comma-separated list of the id-attributes of the values to be selected
    • setSelectedIDs

      public void setSelectedIDs(String aIDs)
      Parameters:
      aIDs -
      aValue - comma-separated list of the id-attributes of the values to be selected
    • updateCheckBox

      public void updateCheckBox(Vector<FWFormOption> aFormOptionVector)
      Updates the choice list
      Parameters:
      aFormOptionVector -
      Vector - of niew FormOptions
    • setEnabled

      public void setEnabled(boolean aIsEnabled)
      Allows to set the value of the implemented subcomponent
      Overrides:
      setEnabled in class FWAbstractFormSubComponent
      Parameters:
      aValue - String representation of the value to be set
    • itemStateChanged

      public void itemStateChanged(ItemEvent e)
      Notifies the parent component if the value of this component has changed
      Specified by:
      itemStateChanged in interface ItemListener