qflib 0.99

de.qfs.lib.option
Class WizardOptionGroup

java.lang.Object
  extended byde.qfs.lib.option.OptionGroup
      extended byde.qfs.lib.option.WizardOptionGroup

public class WizardOptionGroup
extends OptionGroup

A WizardOptionGroup displays a sequence of option panes like they are typically used in wizard type dialogs. When switching to the next group, the current values are checked for validity and stored in the respective Options. The methods nextPane and previousPane are used to switch between panes. If you need to perform custom tasks when switching, either override these, or implement an OptionValidator or an Observer and register it with the relevant Option.

Resource name Usage
option.group.groupname.type A WizardOptionGroup is designated by the type wizard.
option.name.disabled If true, the group will be disabled and remain so even if setEnabled(true) is called (optional, default false).
option.group.groupname.numpanes The number of panes in the group.
option.group.groupname.panen.group The name of the OptionGroup to put on the nth pane, where n is between 1 and numpanes.
option.group.groupname.frame Whether the group should have a framed border (optional, default false).
option.group.groupname.title The title for a framed border of the group. Ignored if no frame is specified(optional, default empty).

Since:
0.99.0
Author:
Gregor Schmid

Field Summary
protected  int current
          The index of the current pane.
protected  java.awt.CardLayout layout
          The layout of the panel.
protected  int numpanes
          The number of panes.
protected  javax.swing.JPanel pane
          The JPanel Component.
 
Fields inherited from class de.qfs.lib.option.OptionGroup
disabled, enabled, members, name, options, parent, title, titleBorder, weight
 
Constructor Summary
WizardOptionGroup()
          Create a new WizardOptionGroup.
WizardOptionGroup(java.lang.String name, OptionSet options)
          Create a new WizardOptionGroup.
 
Method Summary
protected  void createMembers()
          Create the panes for the TabbedOptionGroup.
 java.awt.Component getComponent()
          Get the AWT Component for the OptionGroup.
 boolean isFirst()
          Test whether the first pane is showing.
 boolean isLast()
          Test whether the last pane is showing.
protected  void makePane()
          Create the JPanel for the pane members.
 boolean nextPane()
          Switch to the next pane (or finish) if possible.
 boolean previousPane()
          Switch to the previous pane if possible.
protected  void resetFocus()
          Reset the focus to the first component in the pane after switching panes.
 
Methods inherited from class de.qfs.lib.option.OptionGroup
checkValues, findEdit, findGroup, getBoolean, getGroup, getIndexOfMember, getInt, getMember, getMemberCount, getName, getParentGroup, getString, getWeight, isDisabled, isModified, makeBorder, makeGroup, notifyOptionObservers, readValues, setDisabled, setEnabled, setParentGroup, setTitle, setWeight, update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

pane

protected javax.swing.JPanel pane
The JPanel Component.


layout

protected java.awt.CardLayout layout
The layout of the panel.


numpanes

protected int numpanes
The number of panes.


current

protected int current
The index of the current pane.

Constructor Detail

WizardOptionGroup

public WizardOptionGroup()
Create a new WizardOptionGroup.


WizardOptionGroup

public WizardOptionGroup(java.lang.String name,
                         OptionSet options)
Create a new WizardOptionGroup.

Parameters:
name - The name of the group.
options - The Options to edit.
Method Detail

getComponent

public java.awt.Component getComponent()
Get the AWT Component for the OptionGroup.

Specified by:
getComponent in class OptionGroup
Returns:
The Component.

nextPane

public boolean nextPane()
Switch to the next pane (or finish) if possible.

Returns:
True if OK, false if aborted.

previousPane

public boolean previousPane()
Switch to the previous pane if possible.

Returns:
True if OK, false if aborted.

isFirst

public boolean isFirst()
Test whether the first pane is showing.

Returns:
True if the first pane is currently showing.

isLast

public boolean isLast()
Test whether the last pane is showing.

Returns:
True if the last pane is currently showing.

createMembers

protected void createMembers()
Create the panes for the TabbedOptionGroup.

Overrides:
createMembers in class OptionGroup

makePane

protected void makePane()
Create the JPanel for the pane members.


resetFocus

protected void resetFocus()
Reset the focus to the first component in the pane after switching panes.


qflib 0.99