jmri.util.swing.sdi
Class JmriJFrameInterface

java.lang.Object
  extended by jmri.util.swing.sdi.JmriJFrameInterface
All Implemented Interfaces:
WindowInterface

public class JmriJFrameInterface
extends 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
Author:
Bob Jacobsen Copyright 2010

Nested Class Summary
 
Nested classes/interfaces inherited from interface jmri.util.swing.WindowInterface
WindowInterface.Hint
 
Constructor Summary
JmriJFrameInterface()
           
 
Method Summary
 void dispose()
           
 boolean multipleInstances()
          Create new windows on each request
 void show(JmriPanel child, JmriAbstractAction act)
          Show, in whatever way is appropriate, a specific JmriPanel
 void show(JmriPanel child, JmriAbstractAction act, WindowInterface.Hint hint)
          Show, in whatever way is appropriate, a specific JmriPanel
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JmriJFrameInterface

public JmriJFrameInterface()
Method Detail

show

public void show(JmriPanel child,
                 JmriAbstractAction act,
                 WindowInterface.Hint hint)
Description copied from interface: WindowInterface
Show, in whatever way is appropriate, a specific JmriPanel

Specified by:
show in interface WindowInterface
Parameters:
child - new JmriPanel to show
act - JmriAbstractAction making the request
hint - suggestion on where to put the content

show

public void show(JmriPanel child,
                 JmriAbstractAction act)
Description copied from interface: WindowInterface
Show, in whatever way is appropriate, a specific JmriPanel

Specified by:
show in interface WindowInterface
Parameters:
child - new JmriPanel to show
act - JmriAbstractAction making the request

multipleInstances

public boolean multipleInstances()
Create new windows on each request

Specified by:
multipleInstances in interface WindowInterface
Returns:
true if multiple instances should be provided, false if only one should be provided.

dispose

public void dispose()
Specified by:
dispose in interface WindowInterface


Copyright © 1997 - 2011 JMRI Community.
JMRI, DecoderPro, PanelPro, SoundPro, DispatcherPro and associated logos are our trademarks.

Additional information on copyright, trademarks and licenses is linked here.
Site hosted by: Get JMRI Model Railroad Interface at SourceForge.net. Fast, secure and Free Open Source software downloads