Package jmri.util.swing
Class JmriAbstractAction
java.lang.Object
javax.swing.AbstractAction
jmri.util.swing.JmriAbstractAction
- All Implemented Interfaces:
ActionListener,Serializable,Cloneable,EventListener,Action
- Direct Known Subclasses:
AboutAction,AbstractRosterItemAction,AnalogClockAction,CabSignalAction,ChangePasswordAction,CheckForUpdateAction,ConsistToolAction,CopyRosterGroupAction,CreateRosterGroupAction,CtcEditorAction,CtcRunAction,DecoderIndexCreateAction,DecoderPro3Action,DecoderProAction,DeleteRosterGroupAction,DeleteRosterItemAction,DemoSerialPortAction,DualDecoderToolAction,EditErrorHandlingModuleAction,FirstTimeStartUpWizardAction,FullBackupExportAction,InstallDecoderURLAction,InstallFromURL,JmriNamedPaneAction,JmriUsersAction,LccProAction,LccProFrameAction,LcdClockAction,LicenseAction,LoadDefaultXmlThrottlesLayoutAction,LoginAction,LogoutAction,NixieClockAction,PanelProAction,PanelProAction,PaneProgDp3Action,PragotronClockAction,PrintListAction,PrintRosterAction,QuitAction,RecreateRosterAction,RefreshAction,RenameRosterGroupAction,ReportContextAction,RestartAction,RosterFrameAction,RosterGroupTableAction,RunJythonScript,SampleToolsMenuItem,SimpleClockAction,SimpleProgAction,SimpleTurnoutCtrlAction,SpeedometerAction,SpeedProfileAction,SystemConsoleAction,TabbedPreferencesAction,ThrottleCreationAction,ThrottlesListAction,TimeTableAction,UpdateDecoderDefinitionAction,WebServerAction,WhereUsedAction,WhereUsedAction,WiThrottleCreationAction,XmlFileCheckAction,XmlFileValidateAction,Z21serverCreationAction
Abstract base for actions that will work with multiple JMRI GUIs.
An opaque Object can be passed as a context, but null is also possible.
NOTE Either
actionPerformed(java.awt.event.ActionEvent)
or makePanel() must be overridden
by extending classes.- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) JmriPanelprotected Objectprotected WindowInterface.Hintprotected WindowInterfaceFields 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
ConstructorsConstructorDescriptionJmriAbstractAction(String name) Original constructor for compatibility with older menus.JmriAbstractAction(String s, Icon i, WindowInterface wi) JmriAbstractAction(String name, WindowInterface wi) Enhanced constructor for placing the pane in various GUIs. -
Method Summary
Modifier and TypeMethodDescriptionvoidvoiddispose()abstract JmriPanelvoidsetContext(Object context) Set the context for this action.setHint(WindowInterface.Hint hint) voidvoidsetParameter(String parameter, Object value) voidsetParameter(String parameter, String value) voidtoString()Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
-
Field Details
-
hint
-
wi
-
context
-
cache
-
-
Constructor Details
-
JmriAbstractAction
Enhanced constructor for placing the pane in various GUIs.- Parameters:
name- the name for the action; a value of null is ignoredwi- the window interface controlling how this action is displayed
-
JmriAbstractAction
-
JmriAbstractAction
Original constructor for compatibility with older menus. Assumes SDI GUI.- Parameters:
name- the name for the action; a value of null is ignored
-
-
Method Details
-
setContext
Set the context for this action. The context can be any object that an overriding class may need to complete an action. It is defined here to provide a common API for passing these objects in.- Parameters:
context- the context object- Since:
- 2.9.4
-
setWindowInterface
-
setName
-
toString
-
setHint
-
actionPerformed
-
dispose
-
setParameter
-
setParameter
-
makePanel
-