summaryrefslogtreecommitdiff
path: root/src/graphyx/gui/Container.scala
diff options
context:
space:
mode:
Diffstat (limited to 'src/graphyx/gui/Container.scala')
-rw-r--r--src/graphyx/gui/Container.scala33
1 files changed, 33 insertions, 0 deletions
diff --git a/src/graphyx/gui/Container.scala b/src/graphyx/gui/Container.scala
new file mode 100644
index 0000000..5181df7
--- /dev/null
+++ b/src/graphyx/gui/Container.scala
@@ -0,0 +1,33 @@
+/*
+ * Graphyx
+ * copyright (c) 2009 Jakob Odersky
+ * made available under the MIT License
+*/
+
+package graphyx.gui
+
+import graphyx.graphics._
+import sims.dynamics._
+
+class Container {
+ val mainFrame = new MainFrame(this)
+
+ var scene: Scene = Scene(new World)
+
+ def show() = {
+ mainFrame.visible = true
+ }
+
+ def update(s: Scene) = {
+ scene = s
+ mainFrame.mainPanel.worldPanel.update()
+ mainFrame.mainPanel.infoPanel.update()
+ mainFrame.mainPanel.optionsPanel.update()
+ mainFrame.mainPanel.gravityPanel.update()
+ }
+
+ def exitGUI() = {
+ mainFrame.dispose
+ AboutHelpFrame.frame.dispose
+ }
+}