Package jmri.jmrix.lenz.swing
Class AbstractXPressNetAction
java.lang.Object
javax.swing.AbstractAction
jmri.jmrix.lenz.swing.AbstractXPressNetAction
- All Implemented Interfaces:
ActionListener,Serializable,Cloneable,EventListener,Action,SystemConnectionAction<XNetSystemConnectionMemo>
- Direct Known Subclasses:
LI101Action,LIUSBConfigAction,LZ100Action,LZV100Action,PacketGenAction,StackMonAction,SystemInfoAction
public abstract class AbstractXPressNetAction
extends AbstractAction
implements SystemConnectionAction<XNetSystemConnectionMemo>
Abstract action to create and register a swing object for XpressNet systems.
- 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
ConstructorsConstructorDescription -
Method Summary
Modifier and TypeMethodDescriptionGet theSystemConnectionMemothis action is bound to.Set<Class<? extends SystemConnectionMemo>>Get a list ofSystemConnectionMemosubclasses that the implementing class accepts.voidSet 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
actionPerformed
-
Field Details
-
_memo
-
-
Constructor Details
-
AbstractXPressNetAction
-
AbstractXPressNetAction
-
-
Method Details
-
getSystemConnectionMemo
Get theSystemConnectionMemothis action is bound to.- Specified by:
getSystemConnectionMemoin interfaceSystemConnectionAction<XNetSystemConnectionMemo>- 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<XNetSystemConnectionMemo>- Parameters:
memo- the SystemConnectionMemo- Throws:
IllegalArgumentException- if the SystemConnectionMemo is invalid
-
getSystemConnectionMemoClasses
Get a list ofSystemConnectionMemosubclasses that the implementing class accepts.If the implementing class is a subclass of a class that does accept SystemConnectionMemos, but the implementing class does not accept any, return an empty array instead of null.
- Specified by:
getSystemConnectionMemoClassesin interfaceSystemConnectionAction<XNetSystemConnectionMemo>- Returns:
- Set of SystemConnectionMemo subclasses or empty array.
-