Package jmri.util.swing
Class JFrameInterface
- java.lang.Object
-
- jmri.util.swing.JFrameInterface
-
- All Implemented Interfaces:
WindowInterface
public class JFrameInterface extends java.lang.Object implements WindowInterface
A simple WindowInterface for a JFrame. This really does nothing but wrap the WindowInterface interface around a JFrame, so that menu items that expect the WindowInterface can rely on its presence.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface jmri.util.swing.WindowInterface
WindowInterface.Hint
-
-
Field Summary
Fields Modifier and Type Field Description protected javax.swing.JFrameframe
-
Constructor Summary
Constructors Constructor Description JFrameInterface(javax.swing.JFrame frame)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddispose()java.awt.FramegetFrame()Returns the WindowInterface as a Frame or null.booleanmultipleInstances()Should 2nd and subsequent requests for a panel create a new instance, or provide the 1st one for reuse?voidshow(JmriPanel child, JmriAbstractAction action)Show, in whatever way is appropriate, a specific JmriPanelvoidshow(JmriPanel child, JmriAbstractAction action, WindowInterface.Hint hint)Show, in whatever way is appropriate, a specific JmriPanel, in a hinted location
-
-
-
Field Detail
-
frame
protected javax.swing.JFrame frame
-
-
Constructor Detail
-
JFrameInterface
public JFrameInterface(javax.swing.JFrame frame)
-
-
Method Detail
-
show
public void show(JmriPanel child, JmriAbstractAction action)
Description copied from interface:WindowInterfaceShow, in whatever way is appropriate, a specific JmriPanel- Specified by:
showin interfaceWindowInterface- Parameters:
child- new JmriPanel to showaction- JmriAbstractAction making the request
-
show
public void show(JmriPanel child, JmriAbstractAction action, WindowInterface.Hint hint)
Description copied from interface:WindowInterfaceShow, in whatever way is appropriate, a specific JmriPanel, in a hinted location- Specified by:
showin interfaceWindowInterface- Parameters:
child- new JmriPanel to showaction- JmriAbstractAction making the requesthint- suggestion on where to put the content
-
multipleInstances
public boolean multipleInstances()
Description copied from interface:WindowInterfaceShould 2nd and subsequent requests for a panel create a new instance, or provide the 1st one for reuse?- Specified by:
multipleInstancesin interfaceWindowInterface- Returns:
- true if multiple instances should be provided, false if only one should be provided
-
getFrame
public java.awt.Frame getFrame()
Description copied from interface:WindowInterfaceReturns the WindowInterface as a Frame or null.- Specified by:
getFramein interfaceWindowInterface- Returns:
- a Frame or null
-
dispose
public void dispose()
- Specified by:
disposein interfaceWindowInterface
-
-