/*
 * __NAME__.java
 *
 * Created on __DATE__
 */

package Templates.API_Support.Window_System_API;


import org.openide.WizardDescriptor;
import org.openide.util.NbBundle;

/** A wizard descriptor.
 *
 * @author __USER__
 */
public class __Sample_Wizard__Descriptor extends WizardDescriptor {

    private final __NAME$Descriptor$Iterator$MyIterator__ iterator;

    /** Make a descriptor suited to use __NAME$Descriptor$Iterator$your iterator__.
     * Sets up various wizard properties to follow recommended
     * style guidelines.
     */
    public __Sample_Wizard__Descriptor() {
        this(new __NAME$Descriptor$Iterator$MyIterator__());
    }
    private __Sample_Wizard__Descriptor(__NAME$Descriptor$Iterator$MyIterator__ iterator) {
        super(iterator);
        this.iterator = iterator;
        // Set title for the dialog:
        setTitle(NbBundle.getMessage(__NAME__.class, "TITLE_wizard"));
        // Make the left pane appear:
        putProperty("WizardPanel_autoWizardStyle", Boolean.TRUE); // NOI18N
        // Make the left pane show list of steps etc.:
        putProperty("WizardPanel_contentDisplayed", Boolean.TRUE); // NOI18N
        // Number the steps.
        putProperty("WizardPanel_contentNumbered", Boolean.TRUE); // NOI18N
        /*
        // Optional: make nonmodal.
        setModal(false);
        // (If you make the wizard nonmodal, you will call it differently;
        // see __NAME$Descriptor$Action$the wizard action portion of this template__ for instructions.)
        // Optional: show a help tab with special info about the pane:
        putProperty("WizardPanel_helpDisplayed", Boolean.TRUE); // NOI18N
        // Optional: set the size of the left pane explicitly:
        putProperty("WizardPanel_leftDimension", new Dimension(100, 400)); // NOI18N
        // Optional: if you want a special background image for the left pane:
        try {
            putProperty("WizardPanel_image", // NOI18N
                Toolkit.getDefaultToolkit().getImage
                (new URL("nbresloc:/__PACKAGE_AND_NAME_SLASHES$Descriptor$$somewhere/My__Image.gif"))); // NOI18N
        } catch (MalformedURLException mfue) {
            throw new IllegalStateException(mfue.toString());
        }
        */
    }

    // Called when user moves forward or backward etc.:
    protected void updateState() {
        super.updateState();
        putProperty("WizardPanel_contentData", iterator.getSteps()); // NOI18N
        putProperty("WizardPanel_contentSelectedIndex", new Integer(iterator.getIndex())); // NOI18N
    }

}
