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
Panels.-
Constructor Summary
ConstructorsConstructorDescriptionArrayIterator(List<WizardDescriptor.Panel<Data>> panels) Construct an iterator.ArrayIterator(WizardDescriptor.Panel<Data>[] array) Construct an iterator. -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd a listener to changes of the current panel.current()Get the current panel.booleanhasNext()Test whether there is a next panel.booleanTest 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.voidMove to the next panel.voidMove to the previous panel.voidRemove a listener to changes of the current panel.protected voidreset()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.IteratorGet the current panel.- Specified by:
currentin interfaceWizardDescriptor.Iterator<Data>- Returns:
- the panel
-
name
Description copied from interface:WizardDescriptor.IteratorGet the name of the current panel.- Specified by:
namein interfaceWizardDescriptor.Iterator<Data>- Returns:
- the name
-
hasNext
public boolean hasNext()Description copied from interface:WizardDescriptor.IteratorTest whether there is a next panel.- Specified by:
hasNextin interfaceWizardDescriptor.Iterator<Data>- Returns:
trueif so
-
hasPrevious
public boolean hasPrevious()Description copied from interface:WizardDescriptor.IteratorTest whether there is a previous panel.- Specified by:
hasPreviousin interfaceWizardDescriptor.Iterator<Data>- Returns:
trueif so
-
nextPanel
public void nextPanel()Description copied from interface:WizardDescriptor.IteratorMove to the next panel. I.e. increment its index, need not actually change any GUI itself.- Specified by:
nextPanelin interfaceWizardDescriptor.Iterator<Data>
-
previousPanel
public void previousPanel()Description copied from interface:WizardDescriptor.IteratorMove to the previous panel. I.e. decrement its index, need not actually change any GUI itself.- Specified by:
previousPanelin interfaceWizardDescriptor.Iterator<Data>
-
addChangeListener
Description copied from interface:WizardDescriptor.IteratorAdd a listener to changes of the current panel. The listener is notified when the possibility to move forward/backward changes.- Specified by:
addChangeListenerin interfaceWizardDescriptor.Iterator<Data>- Parameters:
l- the listener to add
-
removeChangeListener
Description copied from interface:WizardDescriptor.IteratorRemove a listener to changes of the current panel.- Specified by:
removeChangeListenerin 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.
-