Class WizardDescriptor.ArrayIterator<Data>
java.lang.Object
org.openide.WizardDescriptor.ArrayIterator<Data>
- All Implemented Interfaces:
WizardDescriptor.Iterator<Data>
- Enclosing class:
WizardDescriptor
public static class WizardDescriptor.ArrayIterator<Data>
extends Object
implements WizardDescriptor.Iterator<Data>
Special iterator that works on an array of
Panel
s.-
Constructor Summary
ConstructorsConstructorDescriptionArrayIterator
(List<WizardDescriptor.Panel<Data>> panels) Construct an iterator.ArrayIterator
(WizardDescriptor.Panel<Data>[] array) Construct an iterator. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Add a listener to changes of the current panel.current()
Get the current panel.boolean
hasNext()
Test whether there is a next panel.boolean
Test whether there is a previous panel.protected WizardDescriptor.Panel<Data>[]
Allows subclasses to initialize their arrays of panels when constructed using default constructor.name()
Get the name of the current panel.void
Move to the next panel.void
Move to the previous panel.void
Remove a listener to changes of the current panel.protected void
reset()
Resets this iterator to initial state.
-
Constructor Details
-
ArrayIterator
public ArrayIterator() -
ArrayIterator
Construct an iterator.- Parameters:
array
- the list of panels to use
-
ArrayIterator
Construct an iterator.- Parameters:
panels
- the list of panels to use- Since:
- org.openide.dialogs 7.5
-
-
Method Details
-
initializePanels
Allows subclasses to initialize their arrays of panels when constructed using default constructor. (for example during deserialization. Default implementation returns empty array. -
current
Description copied from interface:WizardDescriptor.Iterator
Get the current panel.- Specified by:
current
in interfaceWizardDescriptor.Iterator<Data>
- Returns:
- the panel
-
name
Description copied from interface:WizardDescriptor.Iterator
Get the name of the current panel.- Specified by:
name
in interfaceWizardDescriptor.Iterator<Data>
- Returns:
- the name
-
hasNext
public boolean hasNext()Description copied from interface:WizardDescriptor.Iterator
Test whether there is a next panel.- Specified by:
hasNext
in interfaceWizardDescriptor.Iterator<Data>
- Returns:
true
if so
-
hasPrevious
public boolean hasPrevious()Description copied from interface:WizardDescriptor.Iterator
Test whether there is a previous panel.- Specified by:
hasPrevious
in interfaceWizardDescriptor.Iterator<Data>
- Returns:
true
if so
-
nextPanel
public void nextPanel()Description copied from interface:WizardDescriptor.Iterator
Move to the next panel. I.e. increment its index, need not actually change any GUI itself.- Specified by:
nextPanel
in interfaceWizardDescriptor.Iterator<Data>
-
previousPanel
public void previousPanel()Description copied from interface:WizardDescriptor.Iterator
Move to the previous panel. I.e. decrement its index, need not actually change any GUI itself.- Specified by:
previousPanel
in interfaceWizardDescriptor.Iterator<Data>
-
addChangeListener
Description copied from interface:WizardDescriptor.Iterator
Add a listener to changes of the current panel. The listener is notified when the possibility to move forward/backward changes.- Specified by:
addChangeListener
in interfaceWizardDescriptor.Iterator<Data>
- Parameters:
l
- the listener to add
-
removeChangeListener
Description copied from interface:WizardDescriptor.Iterator
Remove a listener to changes of the current panel.- Specified by:
removeChangeListener
in interfaceWizardDescriptor.Iterator<Data>
- Parameters:
l
- the listener to remove
-
reset
protected void reset()Resets this iterator to initial state. Called by subclasses when they need re-initialization of the iterator.
-