Package jmri.jmrix.can.swing
Class CanNamedPaneAction
java.lang.Object
javax.swing.AbstractAction
jmri.util.swing.JmriAbstractAction
jmri.util.swing.JmriNamedPaneAction
jmri.jmrix.can.swing.CanNamedPaneAction
- All Implemented Interfaces:
ActionListener,Serializable,Cloneable,EventListener,Action,SystemConnectionAction<CanSystemConnectionMemo>
- Direct Known Subclasses:
CanSendPane.Default,CbusBootloaderPane.Default,CbusConsolePane.Default,CbusEventRequestTablePane.Default,CbusEventTablePane.Default,CbusHubAction,CbusSlotMonitorPane.Default,ConfigToolPane.Default,EventTablePane.Default,HubAction,IdToolPane.Default,LoaderPane.Default,MemoryToolPane.Default,MonitorAction,MonitorPane.Default,NetworkTreeAction,NodeConfigToolPane.Default,OpenLcbCanSendAction,SimulatorPane.Default,StlEditorPane.Default
public class CanNamedPaneAction
extends JmriNamedPaneAction
implements SystemConnectionAction<CanSystemConnectionMemo>
Action to create and load a CAN-specific JmriPanel
- See Also:
-
Field Summary
FieldsFields inherited from class jmri.util.swing.JmriNamedPaneAction
paneClassFields inherited from class jmri.util.swing.JmriAbstractAction
context, hint, wiFields 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
ConstructorsConstructorDescriptionCanNamedPaneAction(String s, Icon i, WindowInterface wi, String paneClass, CanSystemConnectionMemo memo) Enhanced constructor for placing the pane in various GUIs.CanNamedPaneAction(String s, WindowInterface wi, String paneClass, CanSystemConnectionMemo memo) Enhanced constructor for placing the pane in various GUIs. -
Method Summary
Modifier and TypeMethodDescriptionGet theSystemConnectionMemothis action is bound to.Set<Class<? extends SystemConnectionMemo>>Get a list ofSystemConnectionMemosubclasses that the implementing class accepts.Makes Panel and calls initComponents Invoked as part of the action being invoked, e.g. when button pressed or menu item selected, this runs the panel through the initial part of its life cycle and installs in the given window interface.voidSet theSystemConnectionMemothis action is bound to.Methods inherited from class jmri.util.swing.JmriAbstractAction
actionPerformed, dispose, setContext, setHint, setName, setParameter, setParameter, setWindowInterface, toStringMethods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
-
Field Details
-
memo
-
-
Constructor Details
-
CanNamedPaneAction
public CanNamedPaneAction(String s, WindowInterface wi, String paneClass, CanSystemConnectionMemo memo) Enhanced constructor for placing the pane in various GUIs.- Parameters:
s- Window Namewi- JmriJFrameInterfacepaneClass- Name of class to openmemo- System Connection
-
CanNamedPaneAction
public CanNamedPaneAction(String s, Icon i, WindowInterface wi, String paneClass, CanSystemConnectionMemo memo) Enhanced constructor for placing the pane in various GUIs.- Parameters:
s- Window Namei- Icon to displaywi- JmriJFrameInterfacepaneClass- Name of class to openmemo- System Connection
-
-
Method Details
-
makePanel
Makes Panel and calls initComponents Invoked as part of the action being invoked, e.g. when button pressed or menu item selected, this runs the panel through the initial part of its life cycle and installs in the given window interface.If different or additional initialization is needed, inherit from this class and override this method to do it.
- Overrides:
makePanelin classJmriNamedPaneAction
-
getSystemConnectionMemo
Description copied from interface:SystemConnectionActionGet theSystemConnectionMemothis action is bound to.- Specified by:
getSystemConnectionMemoin interfaceSystemConnectionAction<CanSystemConnectionMemo>- Returns:
- the SystemConnectionMemo or null if not bound.
-
setSystemConnectionMemo
Description copied from interface:SystemConnectionActionSet 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<CanSystemConnectionMemo>- Parameters:
memo- the SystemConnectionMemo- Throws:
IllegalArgumentException- if the SystemConnectionMemo is invalid
-
getSystemConnectionMemoClasses
Description copied from interface:SystemConnectionActionGet 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<CanSystemConnectionMemo>- Returns:
- Set of SystemConnectionMemo subclasses or empty array.
-