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
Partial implementation of the EditorMenuItem interface. This implements setting and getting a
label, and setting the ScenarioTreeEvent. The user only needs to implement
actionPerformed(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:
-
Field Summary
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
ConstructorDescriptionAbstractEditorMenuItem
(String label) Creates an AbstractEditorMenuItem with the specified label. -
Method Summary
Modifier and TypeMethodDescriptionint
compareTo
(EditorMenuItem editorMenuItem) getLabel()
Gets the label for this menu item.void
init
(org.java.plugin.PluginManager manager) A null implementation of this method.void
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 Details
-
evt
-
-
Constructor Details
-
AbstractEditorMenuItem
Creates an AbstractEditorMenuItem with the specified label.- Parameters:
label
-
-
-
Method Details
-
setScenarioEvt
Sets the ScenarioTreeEvent that triggers this menu item.- Specified by:
setScenarioEvt
in interfaceEditorMenuItem
- Parameters:
evt
- the ScenarioTreeEvent that trigged this menu item.
-
getLabel
Gets the label for this menu item.- Specified by:
getLabel
in interfaceEditorMenuItem
- Returns:
- the label for this menu item.
-
compareTo
- 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.
-