qflib 0.98.1

de.qfs.lib.option
Class ChoiceOptionGroup

java.lang.Object
  |
  +--de.qfs.lib.option.OptionGroup
        |
        +--de.qfs.lib.option.ChoiceOptionGroup

Deprecated. Removed in version 0.98.0. This class was experimental and should never have made it into a release. Please use ChoiceOptions and ChoiceOptionEdits instead. ChoiceOptionGroup will be removed in the next version.

public class ChoiceOptionGroup
extends OptionGroup

A ChoiceOptionGroup is represented by a JComboBox representing one Option. The Option should be an IntegerOption, its value between 1 and [number of choices].

The labels of the choices are defined by the resources set with Option.setResources. See the package documentation for details about the necessary resources.

To build a ChoiceOptionGroup with a dynamic set of choices created at runtime, create a custom OptionGroup derived from ChoiceOptionGroup and override getChoices.

Version:
$Revision: 1.5 $
Author:
Gregor Schmid

Field Summary
protected  java.lang.Object[] choices
          Deprecated. The possible choices.
protected  javax.swing.JComboBox combo
          Deprecated. The JComboBox for the ChoiceOptionGroup.
protected  Option option
          Deprecated. The Option that holds the value for the selected choice.
 
Fields inherited from class de.qfs.lib.option.OptionGroup
disabled, enabled, members, name, options, parent, title, titleBorder
 
Constructor Summary
protected ChoiceOptionGroup()
          Deprecated. No arg constructor for specialized OptionGroups.
  ChoiceOptionGroup(java.lang.String name, OptionSet options)
          Deprecated. Create a new ChoiceOptionGroup.
 
Method Summary
 boolean checkValues()
          Deprecated. Check the values.
protected  void getChoices()
          Deprecated. Create the possible choices from the resources.
 java.awt.Component getComponent()
          Deprecated. Get the AWT Component for the OptionGroup.
 void notifyOptionObservers()
          Deprecated. Notify the option's Observers.
 void readValues()
          Deprecated. Store the value for the selected Choice in the Option.
 void setEnabled(boolean enabled)
          Deprecated. Set the enabled state for the buttons.
 void update(OptionSet options)
          Deprecated. Update display for possibly new Options.
 
Methods inherited from class de.qfs.lib.option.OptionGroup
createMembers, findEdit, findGroup, getBoolean, getGroup, getIndexOfMember, getInt, getMember, getMemberCount, getName, getParentGroup, getString, isDisabled, makeBorder, makeGroup, setDisabled, setParentGroup, setTitle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

choices

protected java.lang.Object[] choices
Deprecated. 
The possible choices.

combo

protected javax.swing.JComboBox combo
Deprecated. 
The JComboBox for the ChoiceOptionGroup.

option

protected Option option
Deprecated. 
The Option that holds the value for the selected choice.
Constructor Detail

ChoiceOptionGroup

protected ChoiceOptionGroup()
Deprecated. 
No arg constructor for specialized OptionGroups.

ChoiceOptionGroup

public ChoiceOptionGroup(java.lang.String name,
                         OptionSet options)
Deprecated. 
Create a new ChoiceOptionGroup.
Parameters:
name - The name of the group.
options - The Options to edit.
Method Detail

checkValues

public boolean checkValues()
Deprecated. 
Check the values.
Overrides:
checkValues in class OptionGroup
Returns:
True if the selected choice is accepted by the Option.

readValues

public void readValues()
Deprecated. 
Store the value for the selected Choice in the Option.
Overrides:
readValues in class OptionGroup

notifyOptionObservers

public void notifyOptionObservers()
Deprecated. 
Notify the option's Observers.
Overrides:
notifyOptionObservers in class OptionGroup

update

public void update(OptionSet options)
Deprecated. 
Update display for possibly new Options. The name and type of the Options in the OptionSet must be the same as before.
Overrides:
update in class OptionGroup
Parameters:
options - The new OptionSet.

setEnabled

public void setEnabled(boolean enabled)
Deprecated. 
Set the enabled state for the buttons.
Overrides:
setEnabled in class OptionGroup
Parameters:
enabled - The enabled state to set.

getComponent

public java.awt.Component getComponent()
Deprecated. 
Get the AWT Component for the OptionGroup.
Overrides:
getComponent in class OptionGroup
Returns:
The Component.

getChoices

protected void getChoices()
Deprecated. 
Create the possible choices from the resources. Also set the option according to the option.group.groupname.option resource.

qflib 0.98.1