Package jmri.jmrix.swing
Class AbstractSystemConnectionAction<M extends SystemConnectionMemo>
java.lang.Object
javax.swing.AbstractAction
jmri.jmrix.swing.AbstractSystemConnectionAction<M>
- Type Parameters:
M- the specific type of SystemConnectionMemo supported by this action
- All Implemented Interfaces:
ActionListener,Serializable,Cloneable,EventListener,Action,SystemConnectionAction<M>
- Direct Known Subclasses:
AcelaMonAction,CMRISystemConnectionAction,DCCppSystemConnectionAction,GrapevineSystemConnectionAction,PowerlineSystemConnectionAction,QsiSystemConnectionAction,SRCPSystemConnectionAction,XBeeSystemConnectionAction
public abstract class AbstractSystemConnectionAction<M extends SystemConnectionMemo>
extends AbstractAction
implements SystemConnectionAction<M>
Base for
AbstractActions that need to be associated with a specific
connection.- See Also:
-
Field Summary
Fields 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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet theSystemConnectionMemothis action is bound to.voidsetSystemConnectionMemo(M memo) Set theSystemConnectionMemothis action is bound to.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 java.awt.event.ActionListener
actionPerformedMethods inherited from interface jmri.jmrix.swing.SystemConnectionAction
getSystemConnectionMemoClasses
-
Constructor Details
-
AbstractSystemConnectionAction
-
-
Method Details
-
getSystemConnectionMemo
Get theSystemConnectionMemothis action is bound to.- Specified by:
getSystemConnectionMemoin interfaceSystemConnectionAction<M extends SystemConnectionMemo>- Returns:
- the SystemConnectionMemo or null if not bound.
-
setSystemConnectionMemo
Set theSystemConnectionMemothis action is bound to.Implementing classes may throw an IllegalArgumentException if the implementing class requires a specific subclass of SystemConnectionMemo.
- Specified by:
setSystemConnectionMemoin interfaceSystemConnectionAction<M extends SystemConnectionMemo>- Parameters:
memo- the SystemConnectionMemo- Throws:
IllegalArgumentException- if the memo is not assignable from any class listed inSystemConnectionAction.getSystemConnectionMemoClasses()
-