Package repast.simphony.ui.plugin.editor
Class AbstractWizardActionUI<T extends ControllerAction>
java.lang.Object
repast.simphony.ui.plugin.editor.AbstractWizardActionUI<T>
- All Implemented Interfaces:
ActionUI
- Direct Known Subclasses:
AbstractDescriptorWizardActionUI
public abstract class AbstractWizardActionUI<T extends ControllerAction>
extends Object
implements ActionUI
This is a simple abstract
ActionUI
implementation that is to be used for ui's where the
editor is based on a set of PanelWizardStep
s. This uses a OptionsEditorDialog
for
its editor, and steps from implementations paths for the content.- Author:
- Jerry Vos
-
Field Summary
-
Constructor Summary
ConstructorDescriptionAbstractWizardActionUI
(T action, String title, String label) Constructs this with the specified action to work on, the title for any created editors and the label for displaying for actions. -
Method Summary
Modifier and TypeMethodDescriptionCreates and returns anOptionsEditorDialog
whose content is the steps fromgetPath()
whose model is fromgetWizardModel(SimplePath, repast.simphony.scenario.Scenario, Object, ScenarioTreeEvent)
, and whose title is this wizard's title.getLabel()
Returns the label specified in the construction.protected abstract org.pietschy.wizard.models.SimplePath
getPath()
Retrieves the path that contains steps that will be the content for the dialog.Always returns null.protected abstract org.pietschy.wizard.WizardModel
getWizardModel
(org.pietschy.wizard.models.SimplePath path, Scenario scenario, Object contextId, ScenarioTreeEvent evt) Retrieves theWizardModel
to be used when creating the wizard used when adding steps to the created dialog.
-
Field Details
-
action
-
title
-
label
-
-
Constructor Details
-
AbstractWizardActionUI
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 representstitle
- the title for any editorslabel
- the label for the action
-
-
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 thegetWizardModel(SimplePath, 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, ScenarioTreeEvent evt) Retrieves theWizardModel
to be used when creating the wizard used when adding steps to the created dialog.- Parameters:
path
- the path for the wizard (created withgetPath()
)scenario
- the scenario (retrieved from the passed in event)contextId
- the context id (retrieved from the passed in event)evt
- the event that initiated the editor request (passed in in case extra info is needed)- Returns:
- the model to be used when creating the editor
-
getEditor
Creates and returns anOptionsEditorDialog
whose content is the steps fromgetPath()
whose model is fromgetWizardModel(SimplePath, repast.simphony.scenario.Scenario, Object, ScenarioTreeEvent)
, and whose title is this wizard's title.- Specified by:
getEditor
in interfaceActionUI
- Parameters:
evt
- the ScenarioTreeEvent that triggered this method call.- Returns:
- a
OptionsEditorDialog
- See Also:
-
getLabel
Returns the label specified in the construction. -
getPopupMenu
Always returns null.- Specified by:
getPopupMenu
in interfaceActionUI
- Returns:
- JPopupMenu to attach to the tree entry for an action. This may return null for no popup.
-