org.opensourcephysics.controls
Interface MainFrame

All Known Implementing Classes:
AnimationControl, CalculationControl, EjsCalculationControl, EjsControlFrame, EjsSimulationControl, OSPControl, SimulationControl

public interface MainFrame

A MainFrame contains the primary user interface for a program. The main frame closes all child windows when closed and will usually exit when it is closed. An OSP program should have only one main frame.

Version:
1.0
Author:
W. Christian

Method Summary
 void addChildFrame(javax.swing.JFrame frame)
          Adds a child frame that depends on the main frame.
 void clearChildFrames()
          Clears the child frames from the main frame.
 java.util.Collection<javax.swing.JFrame> getChildFrames()
          Gets a copy of the ChildFrames collection.
 OSPFrame getMainFrame()
          Gets the main OSPFrame.
 OSPApplication getOSPApp()
          Gets the OSP Application that is controlled by this frame.
 

Method Detail

getMainFrame

OSPFrame getMainFrame()
Gets the main OSPFrame. The main frame will usually exit program when it is closed.

Returns:
OSPFrame

getOSPApp

OSPApplication getOSPApp()
Gets the OSP Application that is controlled by this frame.

Returns:

addChildFrame

void addChildFrame(javax.swing.JFrame frame)
Adds a child frame that depends on the main frame. Child frames are closed when this frame is closed.

Parameters:
frame - JFrame

clearChildFrames

void clearChildFrames()
Clears the child frames from the main frame.


getChildFrames

java.util.Collection<javax.swing.JFrame> getChildFrames()
Gets a copy of the ChildFrames collection.

Returns:
Collection