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.JFrame
frame
-
Constructor Summary
Constructors Constructor Description JFrameInterface(javax.swing.JFrame frame)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
dispose()
java.awt.Frame
getFrame()
Returns the WindowInterface as a Frame or null.boolean
multipleInstances()
Should 2nd and subsequent requests for a panel create a new instance, or provide the 1st one for reuse?void
show(JmriPanel child, JmriAbstractAction action)
Show, in whatever way is appropriate, a specific JmriPanelvoid
show(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:WindowInterface
Show, in whatever way is appropriate, a specific JmriPanel- Specified by:
show
in 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:WindowInterface
Show, in whatever way is appropriate, a specific JmriPanel, in a hinted location- Specified by:
show
in 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:WindowInterface
Should 2nd and subsequent requests for a panel create a new instance, or provide the 1st one for reuse?- Specified by:
multipleInstances
in 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:WindowInterface
Returns the WindowInterface as a Frame or null.- Specified by:
getFrame
in interfaceWindowInterface
- Returns:
- a Frame or null
-
dispose
public void dispose()
- Specified by:
dispose
in interfaceWindowInterface
-
-