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:
java.awt.event.ActionListener,java.io.Serializable,java.lang.Cloneable,java.util.EventListener,javax.swing.Action,SystemConnectionAction<M>
- Direct Known Subclasses:
AcelaMonAction,CMRISystemConnectionAction,DCCppSystemConnectionAction,GrapevineSystemConnectionAction,PowerlineSystemConnectionAction,QsiSystemConnectionAction,SRCPSystemConnectionAction,XBeeSystemConnectionAction
public abstract class AbstractSystemConnectionAction<M extends SystemConnectionMemo> extends javax.swing.AbstractAction implements SystemConnectionAction<M>
Base forAbstractActions that need to be associated with a specific connection.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractSystemConnectionAction(java.lang.String name, M memo)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MgetSystemConnectionMemo()Get 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, setEnabled
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface jmri.jmrix.swing.SystemConnectionAction
getSystemConnectionMemoClasses
-
-
-
-
Constructor Detail
-
AbstractSystemConnectionAction
protected AbstractSystemConnectionAction(java.lang.String name, M memo)
-
-
Method Detail
-
getSystemConnectionMemo
public M getSystemConnectionMemo()
Get theSystemConnectionMemothis action is bound to.- Specified by:
getSystemConnectionMemoin interfaceSystemConnectionAction<M extends SystemConnectionMemo>- Returns:
- the SystemConnectionMemo or null if not bound.
-
setSystemConnectionMemo
public void setSystemConnectionMemo(M memo)
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:
java.lang.IllegalArgumentException- if the memo is not assignable from any class listed inSystemConnectionAction.getSystemConnectionMemoClasses()
-
-