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
FieldsFields inherited from class javax.swing.AbstractAction
changeSupport, enabledFields 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
ConstructorsConstructorDescriptionAbstractEditorMenuItem(String label) Creates an AbstractEditorMenuItem with the specified label. -
Method Summary
Modifier and TypeMethodDescriptionintcompareTo(EditorMenuItem editorMenuItem) getLabel()Gets the label for this menu item.voidinit(org.java.plugin.PluginManager manager) A null implementation of this method.voidSets the ScenarioTreeEvent that triggers this menu item.Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabledMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface javax.swing.Action
accept, addPropertyChangeListener, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabledMethods 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:
setScenarioEvtin interfaceEditorMenuItem- Parameters:
evt- the ScenarioTreeEvent that trigged this menu item.
-
getLabel
Gets the label for this menu item.- Specified by:
getLabelin interfaceEditorMenuItem- Returns:
- the label for this menu item.
-
compareTo
- Specified by:
compareToin interfaceComparable<EditorMenuItem>
-
init
public void init(org.java.plugin.PluginManager manager) A null implementation of this method.- Specified by:
initin interfaceEditorMenuItem- Parameters:
manager- ignored.
-