Package repast.simphony.ui.plugin
Class AbstractEditorMenuItem
- java.lang.Object
-
- javax.swing.AbstractAction
-
- repast.simphony.ui.plugin.AbstractEditorMenuItem
-
- All Implemented Interfaces:
ActionListener
,Serializable
,Cloneable
,Comparable<EditorMenuItem>
,EventListener
,Action
,EditorMenuItem
- Direct Known Subclasses:
ConsoleSinkMenuItem
,DataSetMenuItem
,DefaultDataLoaderMenuItem
,DefaultDisplayMenuItem
,FileSinkMenuItem
,FreezerMenuItem
,HistogramMenuItem
,TimeSeriesChartMenuItem
,UserPanelMenuItem
public abstract class AbstractEditorMenuItem extends AbstractAction implements EditorMenuItem
Partial implementation of the EditorMenuItem interface. This implements setting and getting a label, and setting the ScenarioTreeEvent. The user only needs to implementactionPerformed(ActionEvent evt)
. This also implements Comparable by comparing on EditorMenuItem labels.- Version:
- $Revision: 1.1 $ $Date: 2006/01/09 15:55:03 $
- Author:
- Nick Collier
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected ScenarioTreeEvent
evt
-
Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
-
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON
-
-
Constructor Summary
Constructors Constructor Description AbstractEditorMenuItem(String label)
Creates an AbstractEditorMenuItem with the specified label.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareTo(EditorMenuItem editorMenuItem)
String
getLabel()
Gets the label for this menu item.void
init(org.java.plugin.PluginManager manager)
A null implementation of this method.void
setScenarioEvt(ScenarioTreeEvent evt)
Sets the ScenarioTreeEvent that triggers this menu item.-
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface javax.swing.Action
accept, addPropertyChangeListener, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
-
Methods inherited from interface java.awt.event.ActionListener
actionPerformed
-
-
-
-
Field Detail
-
evt
protected ScenarioTreeEvent evt
-
-
Constructor Detail
-
AbstractEditorMenuItem
public AbstractEditorMenuItem(String label)
Creates an AbstractEditorMenuItem with the specified label.- Parameters:
label
-
-
-
Method Detail
-
setScenarioEvt
public void setScenarioEvt(ScenarioTreeEvent evt)
Sets the ScenarioTreeEvent that triggers this menu item.- Specified by:
setScenarioEvt
in interfaceEditorMenuItem
- Parameters:
evt
- the ScenarioTreeEvent that trigged this menu item.
-
getLabel
public String getLabel()
Gets the label for this menu item.- Specified by:
getLabel
in interfaceEditorMenuItem
- Returns:
- the label for this menu item.
-
compareTo
public int compareTo(EditorMenuItem editorMenuItem)
- Specified by:
compareTo
in interfaceComparable<EditorMenuItem>
-
init
public void init(org.java.plugin.PluginManager manager)
A null implementation of this method.- Specified by:
init
in interfaceEditorMenuItem
- Parameters:
manager
- ignored.
-
-