Package jmri.jmrix.tams.swing
Class TamsNamedPaneAction
- java.lang.Object
-
- javax.swing.AbstractAction
-
- jmri.util.swing.JmriAbstractAction
-
- jmri.util.swing.JmriNamedPaneAction
-
- jmri.jmrix.tams.swing.TamsNamedPaneAction
-
- All Implemented Interfaces:
java.awt.event.ActionListener,java.io.Serializable,java.lang.Cloneable,java.util.EventListener,javax.swing.Action,SystemConnectionAction<TamsSystemConnectionMemo>
- Direct Known Subclasses:
LocoDataPane.Default,StatusPanelAction,TamsMonPaneAction
public class TamsNamedPaneAction extends JmriNamedPaneAction implements SystemConnectionAction<TamsSystemConnectionMemo>
Action to create and load a JmriPanel from just its name. Based on work by Bob Jacobsen- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description (package private) TamsSystemConnectionMemomemo-
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 TamsNamedPaneAction(java.lang.String s, javax.swing.Icon i, WindowInterface wi, java.lang.String paneClass, TamsSystemConnectionMemo memo)Enhanced constructor for placing the pane in various GUIs.TamsNamedPaneAction(java.lang.String s, WindowInterface wi, java.lang.String paneClass, TamsSystemConnectionMemo memo)Enhanced constructor for placing the pane in various GUIs.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TamsSystemConnectionMemogetSystemConnectionMemo()Get theSystemConnectionMemothis action is bound to.java.util.Set<java.lang.Class<? extends SystemConnectionMemo>>getSystemConnectionMemoClasses()Get a list ofSystemConnectionMemosubclasses that the implementing class accepts.JmriPanelmakePanel()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.voidsetSystemConnectionMemo(TamsSystemConnectionMemo memo)Set theSystemConnectionMemothis 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
-
TamsNamedPaneAction
public TamsNamedPaneAction(java.lang.String s, WindowInterface wi, java.lang.String paneClass, TamsSystemConnectionMemo memo)
Enhanced constructor for placing the pane in various GUIs.- Parameters:
s- action name.wi- window interface in use.paneClass- pane class.memo- system connection.
-
TamsNamedPaneAction
public TamsNamedPaneAction(java.lang.String s, javax.swing.Icon i, WindowInterface wi, java.lang.String paneClass, TamsSystemConnectionMemo memo)
Enhanced constructor for placing the pane in various GUIs.- Parameters:
s- action name.i- icon to usewi- window interface in use.paneClass- pane class.memo- system connection.
-
-
Method Detail
-
makePanel
public JmriPanel makePanel()
Description copied from class:JmriNamedPaneActionInvoked 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
public TamsSystemConnectionMemo getSystemConnectionMemo()
Description copied from interface:SystemConnectionActionGet theSystemConnectionMemothis action is bound to.- Specified by:
getSystemConnectionMemoin interfaceSystemConnectionAction<TamsSystemConnectionMemo>- Returns:
- the SystemConnectionMemo or null if not bound.
-
setSystemConnectionMemo
public void setSystemConnectionMemo(TamsSystemConnectionMemo memo)
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<TamsSystemConnectionMemo>- Parameters:
memo- the SystemConnectionMemo
-
getSystemConnectionMemoClasses
public java.util.Set<java.lang.Class<? extends SystemConnectionMemo>> 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<TamsSystemConnectionMemo>- Returns:
- Set of SystemConnectionMemo subclasses or empty array.
-
-