summaryrefslogblamecommitdiff
path: root/src/graphyx/gui/Container.scala
blob: 80886f8dff1248eb38577cb382c66f56169c5cb6 (plain) (tree)
1
2
3
4
5
6
7
8
9







                                       
                      

                         


                                     

                                                          







                                     
                                             








                                             
                                   

   
/*
 * Graphyx
 * copyright (c) 2009 Jakob Odersky
 * made available under the MIT License
*/

package graphyx.gui

import sims.dynamics._
import graphyx.graphics._
import java.io._
class Container {
  val mainFrame = new MainFrame(this)
  
  //val plotFrames = new ArrayBuffer[plot.PlotFrame[Body]]
  
  var scene: Scene = Scene(new World)
  
  def show() = {
    mainFrame.visible = true
  }
  
  def update(s: Scene) = {
    scene = s
    mainFrame.mainPanel.controlPanel.update()
    mainFrame.mainPanel.worldPanel.update()
    mainFrame.mainPanel.infoPanel.update()
    mainFrame.mainPanel.optionsPanel.update()
    mainFrame.mainPanel.gravityPanel.update()
  }
  
  def exitGUI() = {
    mainFrame.dispose
    AboutHelpFrame.frame.dispose
    //plotFrames.foreach(_.dispose)
  }
}