src/Pure/System/gui_setup.scala
author wenzelm
Sun Jun 28 16:01:52 2009 +0200 (2009-06-28)
changeset 31827 b54362b9fbef
child 31828 31584cf201cc
permissions -rw-r--r--
minimal GUI_Setup, which is the main class of Pure.jar;
wenzelm@31827
     1
/*  Title:      Pure/System/gui_setup.scala
wenzelm@31827
     2
    Author:     Makarius
wenzelm@31827
     3
wenzelm@31827
     4
GUI for basic system setup.
wenzelm@31827
     5
*/
wenzelm@31827
     6
wenzelm@31827
     7
package isabelle
wenzelm@31827
     8
wenzelm@31827
     9
import scala.swing._
wenzelm@31827
    10
import scala.swing.event._
wenzelm@31827
    11
wenzelm@31827
    12
wenzelm@31827
    13
object GUI_Setup extends SimpleGUIApplication
wenzelm@31827
    14
{
wenzelm@31827
    15
  def top = new MainFrame {
wenzelm@31827
    16
    title = "Isabelle setup"
wenzelm@31827
    17
    val ok = new Button { text = "OK" }
wenzelm@31827
    18
wenzelm@31827
    19
    contents = new BoxPanel(Orientation.Vertical) {
wenzelm@31827
    20
      contents += ok
wenzelm@31827
    21
      border = scala.swing.Swing.EmptyBorder(20, 20, 20, 20)
wenzelm@31827
    22
    }
wenzelm@31827
    23
wenzelm@31827
    24
    listenTo(ok)
wenzelm@31827
    25
    reactions += {
wenzelm@31827
    26
      case ButtonClicked(`ok`) => System.exit(0)
wenzelm@31827
    27
    }
wenzelm@31827
    28
  }
wenzelm@31827
    29
}
wenzelm@31827
    30