Package jmri.util.swing.sdi
Class JmriJFrameInterface
- java.lang.Object
-
- jmri.util.swing.sdi.JmriJFrameInterface
-
- All Implemented Interfaces:
WindowInterface
public class JmriJFrameInterface extends java.lang.Object implements WindowInterface
Display a JmriPanel in a JFrame of its own. Dispose() of a multi-instance panel is invoked when the containing window is fully closed via a listener installed here. Single instance (non-multi-instance) panels are cached and never disposed.- Since:
- 2.9.4
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface jmri.util.swing.WindowInterface
WindowInterface.Hint
-
-
Field Summary
Fields Modifier and Type Field Description (package private) java.util.HashMap<JmriPanel,JmriJFrame>frames
-
Constructor Summary
Constructors Constructor Description JmriJFrameInterface()
-
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()Create new windows on each requestvoidshow(JmriPanel child, JmriAbstractAction act)Show, in whatever way is appropriate, a specific JmriPanelvoidshow(JmriPanel child, JmriAbstractAction act, WindowInterface.Hint hint)Show, in whatever way is appropriate, a specific JmriPanel, in a hinted location
-
-
-
Field Detail
-
frames
java.util.HashMap<JmriPanel,JmriJFrame> frames
-
-
Constructor Detail
-
JmriJFrameInterface
public JmriJFrameInterface()
-
-
Method Detail
-
show
public void show(JmriPanel child, JmriAbstractAction act, 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 showact- JmriAbstractAction making the requesthint- suggestion on where to put the content
-
show
public void show(JmriPanel child, JmriAbstractAction act)
Description copied from interface:WindowInterfaceShow, in whatever way is appropriate, a specific JmriPanel- Specified by:
showin interfaceWindowInterface- Parameters:
child- new JmriPanel to showact- JmriAbstractAction making the request
-
multipleInstances
public boolean multipleInstances()
Create new windows on each request- Specified by:
multipleInstancesin interfaceWindowInterface- Returns:
- true if multiple instances should be provided, false if only one should be provided
-
dispose
public void dispose()
- Specified by:
disposein interfaceWindowInterface
-
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
-
-