src/Pure/System/gui_setup.scala
author wenzelm
Sun, 28 Jun 2009 16:46:00 +0200
changeset 31837 31584cf201cc
parent 31836 b54362b9fbef
child 31843 f02c6a43f1b3
permissions -rw-r--r--
sane platform look-and-feel;
     1 /*  Title:      Pure/System/gui_setup.scala
     2     Author:     Makarius
     3 
     4 GUI for basic system setup.
     5 */
     6 
     7 package isabelle
     8 
     9 import javax.swing.UIManager
    10 
    11 import scala.swing._
    12 import scala.swing.event._
    13 
    14 
    15 object GUI_Setup extends GUIApplication
    16 {
    17   def main(args: Array[String]) =
    18   {
    19     Swing.later {
    20       UIManager.setLookAndFeel(Platform.look_and_feel)
    21       top.pack()
    22       top.visible = true
    23     }
    24   }
    25 
    26   def top = new MainFrame {
    27     title = "Isabelle setup"
    28     val ok = new Button { text = "OK" }
    29 
    30     contents = new BoxPanel(Orientation.Vertical) {
    31       contents += ok
    32       border = scala.swing.Swing.EmptyBorder(20, 20, 20, 20)
    33     }
    34 
    35     listenTo(ok)
    36     reactions += {
    37       case ButtonClicked(`ok`) => System.exit(0)
    38     }
    39   }
    40 }
    41