Class OptionsEditorDialog

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, EventListener, Accessible, ChangeListener, Editor
Direct Known Subclasses:
AbstractWizardEditor, DisplayOptionsDialog

public class OptionsEditorDialog extends OptionsDialog implements Editor
An extension of OptionsDialog that adapts it to a Editor and adds some helper methods for using wizard steps in the editor.
Author:
Jerry Vos
See Also:
  • Field Details

    • defaultTitle

      protected String defaultTitle
    • wizards

      protected HashSet<org.pietschy.wizard.Wizard> wizards
  • Constructor Details

    • OptionsEditorDialog

      public OptionsEditorDialog()
    • OptionsEditorDialog

      public OptionsEditorDialog(String title)
  • Method Details

    • display

      public void display(JDialog parent)
      Display this Editor with the specified component as a parent. The resulting display should be modal.
      Specified by:
      display in interface Editor
      Parameters:
      parent - the parent of the dialog
    • display

      public void display(JFrame parent)
      Display this Editor with the specified component as a parent. The resulting display should be modal.
      Specified by:
      display in interface Editor
      Parameters:
      parent - the parent of the dialog
    • wasCanceled

      public boolean wasCanceled()
      Specified by:
      wasCanceled in interface Editor
      Returns:
      true if the editing was canceled, otherwise false.
    • addContent

      public void addContent(String name, Icon icon, org.pietschy.wizard.PanelWizardStep step, org.pietschy.wizard.Wizard wizard)
      Adds a wizard step as content for this wizard. This is the same as step.init(wizard.getModel()); addContent(name, icon, new OptionsContentWizardStepAdapter(wizard, step));
      Parameters:
      name - the name of the content
      icon - the icon for the content
      step - the step for the options
      wizard - the wizard the step is in
    • addContent

      public void addContent(Icon icon, org.pietschy.wizard.PanelWizardStep step, org.pietschy.wizard.Wizard wizard)
      Adds a wizard step as content for this wizard. This is the same as addContent(step.getName(), icon, new OptionsContentWizardStepAdapter(wizard, step));
      Parameters:
      icon - the icon for the content
      step - the step for the options
      wizard - the wizard the step is in
    • ok

      protected void ok()
      Overrides:
      ok in class OptionsDialog
    • cancel

      protected void cancel()
      Overrides:
      cancel in class OptionsDialog
    • create

      public static OptionsEditorDialog create(org.pietschy.wizard.WizardModel model, org.pietschy.wizard.models.Path steps, String title)
      Creates a dialog whose content is specified by the steps in the given path. The path must only contain PanelWizardSteps, otherwise a ClassCastException will be thrown.
      Parameters:
      model - the model for the wizard and steps
      steps - the steps that will be the content
      title - the title of the dialog
      Returns:
      a new editor dialog