Package jmri.jmrix.zimo.swing
Class Mx1NamedPaneAction
- java.lang.Object
-
- javax.swing.AbstractAction
-
- jmri.util.swing.JmriAbstractAction
-
- jmri.util.swing.JmriNamedPaneAction
-
- jmri.jmrix.zimo.swing.Mx1NamedPaneAction
-
- All Implemented Interfaces:
java.awt.event.ActionListener
,java.io.Serializable
,java.lang.Cloneable
,java.util.EventListener
,javax.swing.Action
,SystemConnectionAction<Mx1SystemConnectionMemo>
- Direct Known Subclasses:
Mx1MonPanelAction
,Mx1PacketGenPanel.Default
public class Mx1NamedPaneAction extends JmriNamedPaneAction implements SystemConnectionAction<Mx1SystemConnectionMemo>
Action to create and load a JmriPanel from just its name.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description (package private) Mx1SystemConnectionMemo
memo
-
Fields inherited from class jmri.util.swing.JmriNamedPaneAction
paneClass
-
Fields inherited from class jmri.util.swing.JmriAbstractAction
context, hint, wi
-
-
Constructor Summary
Constructors Constructor Description Mx1NamedPaneAction(java.lang.String s, javax.swing.Icon i, WindowInterface wi, java.lang.String paneClass, Mx1SystemConnectionMemo memo)
Mx1NamedPaneAction(java.lang.String s, WindowInterface wi, java.lang.String paneClass, Mx1SystemConnectionMemo memo)
Create a Mx1NamedPane associated with the given window.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Mx1SystemConnectionMemo
getSystemConnectionMemo()
Get theSystemConnectionMemo
this action is bound to.java.util.Set<java.lang.Class<? extends SystemConnectionMemo>>
getSystemConnectionMemoClasses()
Get a list ofSystemConnectionMemo
subclasses that the implementing class accepts.JmriPanel
makePanel()
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.void
setSystemConnectionMemo(Mx1SystemConnectionMemo memo)
Set theSystemConnectionMemo
this action is bound to.-
Methods inherited from class jmri.util.swing.JmriAbstractAction
actionPerformed, dispose, setContext, setHint, setName, setParameter, setParameter, setWindowInterface, toString
-
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
-
-
-
-
Constructor Detail
-
Mx1NamedPaneAction
public Mx1NamedPaneAction(java.lang.String s, WindowInterface wi, java.lang.String paneClass, Mx1SystemConnectionMemo memo)
Create a Mx1NamedPane associated with the given window.- Parameters:
s
- the name of the panelwi
- the window to associate the pane withpaneClass
- the class to use for the panelmemo
- the MX1 connection
-
Mx1NamedPaneAction
public Mx1NamedPaneAction(java.lang.String s, javax.swing.Icon i, WindowInterface wi, java.lang.String paneClass, Mx1SystemConnectionMemo memo)
-
-
Method Detail
-
makePanel
public JmriPanel makePanel()
Description copied from class:JmriNamedPaneAction
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:
makePanel
in classJmriNamedPaneAction
-
getSystemConnectionMemo
public Mx1SystemConnectionMemo getSystemConnectionMemo()
Description copied from interface:SystemConnectionAction
Get theSystemConnectionMemo
this action is bound to.- Specified by:
getSystemConnectionMemo
in interfaceSystemConnectionAction<Mx1SystemConnectionMemo>
- Returns:
- the SystemConnectionMemo or null if not bound.
-
setSystemConnectionMemo
public void setSystemConnectionMemo(Mx1SystemConnectionMemo memo)
Description copied from interface:SystemConnectionAction
Set theSystemConnectionMemo
this action is bound to.Implementing classes may throw an IllegalArgumentException if the implementing class requires a specific subclass of SystemConnectionMemo.
- Specified by:
setSystemConnectionMemo
in interfaceSystemConnectionAction<Mx1SystemConnectionMemo>
- Parameters:
memo
- the SystemConnectionMemo
-
getSystemConnectionMemoClasses
public java.util.Set<java.lang.Class<? extends SystemConnectionMemo>> getSystemConnectionMemoClasses()
Description copied from interface:SystemConnectionAction
Get a list ofSystemConnectionMemo
subclasses 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:
getSystemConnectionMemoClasses
in interfaceSystemConnectionAction<Mx1SystemConnectionMemo>
- Returns:
- Set of SystemConnectionMemo subclasses or empty array.
-
-