+++ /dev/null
-/*\r
- * To change this template, choose Tools | Templates\r
- * and open the template in the editor.\r
- */\r
-package org.plant.creator;\r
-\r
-import javax.swing.event.ChangeListener;\r
-import org.openide.WizardDescriptor;\r
-import org.openide.util.HelpCtx;\r
-import org.openide.util.NbPreferences;\r
-\r
-public class GeneralWizardPanel implements WizardDescriptor.Panel {\r
-\r
- /**\r
- * The visual component that displays this panel. If you need to access the\r
- * component from this class, just use getComponent().\r
- */\r
- private GeneralWizardVisualPanel component;\r
-\r
- // Get the visual component for the panel. In this template, the component\r
- // is kept separate. This can be more efficient: if the wizard is created\r
- // but never displayed, or not all panels are displayed, it is better to\r
- // create only those which really need to be visible.\r
- public GeneralWizardVisualPanel getComponent() {\r
- if (component == null) {\r
- component = new GeneralWizardVisualPanel();\r
- }\r
- return component;\r
- }\r
-\r
- public HelpCtx getHelp() {\r
- // Show no Help button for this panel:\r
- return HelpCtx.DEFAULT_HELP;\r
- // If you have context help:\r
- // return new HelpCtx(SampleWizardPanel1.class);\r
- }\r
-\r
- public boolean isValid() {\r
- // If it is always OK to press Next or Finish, then:\r
- return true;\r
- // If it depends on some condition (form filled out...), then:\r
- // return someCondition();\r
- // and when this condition changes (last form field filled in...) then:\r
- // fireChangeEvent();\r
- // and uncomment the complicated stuff below.\r
- }\r
-\r
- public final void addChangeListener(ChangeListener l) {\r
- }\r
-\r
- public final void removeChangeListener(ChangeListener l) {\r
- }\r
- /*\r
- private final Set<ChangeListener> listeners = new HashSet<ChangeListener>(1); // or can use ChangeSupport in NB 6.0\r
- public final void addChangeListener(ChangeListener l) {\r
- synchronized (listeners) {\r
- listeners.add(l);\r
- }\r
- }\r
- public final void removeChangeListener(ChangeListener l) {\r
- synchronized (listeners) {\r
- listeners.remove(l);\r
- }\r
- }\r
- protected final void fireChangeEvent() {\r
- Iterator<ChangeListener> it;\r
- synchronized (listeners) {\r
- it = new HashSet<ChangeListener>(listeners).iterator();\r
- }\r
- ChangeEvent ev = new ChangeEvent(this);\r
- while (it.hasNext()) {\r
- it.next().stateChanged(ev);\r
- }\r
- }\r
- */\r
-\r
- // You can use a settings object to keep track of state. Normally the\r
- // settings object will be the WizardDescriptor, so you can use\r
- // WizardDescriptor.getProperty & putProperty to store information entered\r
- // by the user.\r
- public void readSettings(Object settings) {\r
- }\r
-\r
- @Override\r
- public void storeSettings(Object settings) {\r
- NbPreferences.forModule(PlantCreatorAction.class).putBoolean("health", getComponent().isHealthy());\r
- }\r
- \r
-}\r