jmri.util.swing
Class JmriAbstractAction

java.lang.Object
  extended by javax.swing.AbstractAction
      extended by jmri.util.swing.JmriAbstractAction
All Implemented Interfaces:
ActionListener, Serializable, Cloneable, EventListener, Action
Direct Known Subclasses:
AbstractRosterItemAction, ConsistToolAction, CreateRosterGroupAction, DecoderIndexCreateAction, DecoderPro3Action, DeleteRosterGroupAction, DeleteRosterItemAction, FullBackupExportAction, InstallDecoderURLAction, JmriNamedPaneAction, LicenseAction, MiniServerAction, PanelProAction, PaneProgDp3Action, PrintRosterAction, QuitAction, RecreateRosterAction, RosterGroupTableAction, RunJythonScript, SelectRosterGroupAction, SelectRosterGroupPanelAction, SimpleProgAction, SimpleTurnoutCtrlAction, SpeedometerAction, TabbedPreferencesAction, ThrottleCreationAction, WiThrottleCreationAction

public abstract class JmriAbstractAction
extends AbstractAction

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.

Author:
Bob Jacobsen Copyright (C) 2010
See Also:
Serialized Form

Field Summary
protected  Object context
           
protected  WindowInterface wi
           
 
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
JmriAbstractAction(String s)
          Original constructor for compatibility with older menus.
JmriAbstractAction(String s, Icon i, WindowInterface wi)
           
JmriAbstractAction(String s, WindowInterface wi)
          Enhanced constructor for placing the pane in various GUIs
 
Method Summary
 void actionPerformed(ActionEvent e)
           
 void dispose()
           
abstract  JmriPanel makePanel()
           
 void setContext(Object context)
           
 JmriAbstractAction setHint(WindowInterface.Hint hint)
           
 void setName(String name)
           
 void setParameter(String paramter, String value)
           
 void setWindowInterface(WindowInterface wi)
           
 String toString()
           
 
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, wait, wait, wait
 

Field Detail

context

protected Object context

wi

protected WindowInterface wi
Constructor Detail

JmriAbstractAction

public JmriAbstractAction(String s,
                          WindowInterface wi)
Enhanced constructor for placing the pane in various GUIs


JmriAbstractAction

public JmriAbstractAction(String s,
                          Icon i,
                          WindowInterface wi)

JmriAbstractAction

public JmriAbstractAction(String s)
Original constructor for compatibility with older menus. Assumes SDI GUI.

Method Detail

setContext

public void setContext(Object context)
Since:
2.9.4

setWindowInterface

public void setWindowInterface(WindowInterface wi)

setName

public void setName(String name)

toString

public String toString()
Overrides:
toString in class Object

setHint

public JmriAbstractAction setHint(WindowInterface.Hint hint)

actionPerformed

public void actionPerformed(ActionEvent e)

dispose

public void dispose()

setParameter

public void setParameter(String paramter,
                         String value)

makePanel

public abstract JmriPanel makePanel()


Copyright © 1997 - 2011 JMRI Community.
JMRI, DecoderPro, PanelPro, SoundPro, DispatcherPro and associated logos are our trademarks.

Additional information on copyright, trademarks and licenses is linked here.
Site hosted by: Get JMRI Model Railroad Interface at SourceForge.net. Fast, secure and Free Open Source software downloads