Class AbstractWizardEditor<T extends ControllerAction>

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, EventListener, Accessible, ChangeListener, Editor
Direct Known Subclasses:
DataLoaderEditor, FreezerEditor

public abstract class AbstractWizardEditor<T extends ControllerAction> extends OptionsEditorDialog
This is an abstract Editor implementation that is to be used for ui's where the editor is based on a set of PanelWizardSteps. This uses a OptionsEditorDialog for its editor, and steps from implementations paths for the content.
Author:
Jerry Vos
See Also:
  • Field Details

  • Constructor Details

    • AbstractWizardEditor

      public AbstractWizardEditor(T action, Scenario scenario, Object contextId, String title)
      Constructs this with the specified action to work on, the title for any created editors and the label for displaying for actions.
      Parameters:
      action - the action this UI represents
      title - the title for any editors
      scenario - the scenario being worked on
      contextId - the id of the context the action is in
  • Method Details

    • getPath

      protected abstract org.pietschy.wizard.models.SimplePath getPath()
      Retrieves the path that contains steps that will be the content for the dialog. This path will be the one passed to the #getWizardModel(SimplePath, repast.simphony.scenario.Scenario, Object, ScenarioTreeEvent) method.
      Returns:
      a path of PanelWizardSteps
    • getWizardModel

      protected abstract org.pietschy.wizard.WizardModel getWizardModel(org.pietschy.wizard.models.SimplePath path, Scenario scenario, Object contextId)
      Retrieves the WizardModel to be used when creating the wizard used when adding steps to the created dialog.
      Parameters:
      path - the path for the wizard (created with getPath())
      scenario - the scenario
      contextId - the context id
      Returns:
      the model to be used when creating the editor
    • display

      public void display(JDialog parent)
      Display this Editor with the specified component as a parent. The resulting display should be modal.

      If this editor's steps have not yet been added they will be added at this time.

      Specified by:
      display in interface Editor
      Overrides:
      display in class OptionsEditorDialog
      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.

      If this editor's steps have not yet been added they will be added at this time.

      Specified by:
      display in interface Editor
      Overrides:
      display in class OptionsEditorDialog
      Parameters:
      parent - the parent of the dialog
    • buildEditor

      protected void buildEditor(Scenario scenario, Object contextId)
      Creates and returns an OptionsEditorDialog whose content is the steps from getPath() whose model is from #getWizardModel(SimplePath, Scenario, Object, ScenarioTreeEvent), and whose title is this wizard's title.
      See Also:
    • ok

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

      protected void cancel()
      Overrides:
      cancel in class OptionsEditorDialog