src/Tools/jEdit/src/jedit/isabelle_options.scala
author wenzelm
Tue Dec 08 16:30:20 2009 +0100 (2009-12-08)
changeset 34760 dc7f5e0d9d27
parent 34759 src/Tools/jEdit/src/jedit/option_pane.scala@bfea7839d9e1
child 34781 6c2372c4aefb
permissions -rw-r--r--
misc modernization of names;
     1 /*
     2  * Editor pane for plugin options
     3  *
     4  * @author Johannes Hölzl, TU Munich
     5  */
     6 
     7 package isabelle.jedit
     8 
     9 
    10 import javax.swing.{JComboBox, JSpinner}
    11 
    12 import org.gjt.sp.jedit.AbstractOptionPane
    13 
    14 
    15 class Isabelle_Options extends AbstractOptionPane("isabelle")
    16 {
    17   private val logic_name = new JComboBox()
    18   private val font_size = new JSpinner()
    19 
    20   override def _init()
    21   {
    22     addComponent(Isabelle.Property("logic.title"), {
    23       for (name <- Isabelle.system.find_logics()) {
    24         logic_name.addItem(name)
    25         if (name == Isabelle.Property("logic"))
    26           logic_name.setSelectedItem(name)
    27       }
    28       logic_name
    29     })
    30     addComponent(Isabelle.Property("font-size.title"), {
    31       font_size.setValue(Isabelle.Int_Property("font-size"))
    32       font_size
    33     })
    34   }
    35 
    36   override def _save()
    37   {
    38     val logic = logic_name.getSelectedItem.asInstanceOf[String]
    39     Isabelle.Property("logic") = logic
    40 
    41     val size = font_size.getValue().asInstanceOf[Int]
    42     Isabelle.Int_Property("font-size") = size
    43   }
    44 }