src/Tools/jEdit/src/jedit/StateViewDockable.scala
changeset 34406 f81cd75ae331
parent 34397 86daaf5db016
child 34408 ad7b6c4813c8
--- a/src/Tools/jEdit/src/jedit/StateViewDockable.scala	Mon Dec 15 16:34:19 2008 +0100
+++ b/src/Tools/jEdit/src/jedit/StateViewDockable.scala	Thu Dec 18 01:10:20 2008 +0100
@@ -6,41 +6,31 @@
 
 import isabelle.IsabelleSystem.getenv
 
-import org.w3c.dom.Document
-
 import org.xhtmlrenderer.simple.XHTMLPanel
 import org.xhtmlrenderer.context.AWTFontResolver
 
 import org.gjt.sp.jedit.View
 
 class StateViewDockable(view : View, position : String) extends JPanel {
-  {
-    val panel = new XHTMLPanel(new UserAgent())
-    setLayout(new BorderLayout)
+  val panel = new XHTMLPanel(new UserAgent())
+  setLayout(new BorderLayout)
+
+  //Copy-paste-support
+  private val cp = new SelectionActions
+  cp.install(panel)
 
-    //Copy-paste-support
-    val cp = new SelectionActions
-    cp.install(panel)
+  add(new JScrollPane(panel), BorderLayout.CENTER)
 
-    add(new JScrollPane(panel), BorderLayout.CENTER)
-    
-    val fontResolver =
-      panel.getSharedContext.getFontResolver.asInstanceOf[AWTFontResolver]
+  private val fontResolver =
+    panel.getSharedContext.getFontResolver.asInstanceOf[AWTFontResolver]
+  if (Plugin.plugin.viewFont != null)
+    fontResolver.setFontMapping("Isabelle", Plugin.plugin.viewFont)
+
+  Plugin.plugin.viewFontChanged.add(font => {
     if (Plugin.plugin.viewFont != null)
       fontResolver.setFontMapping("Isabelle", Plugin.plugin.viewFont)
 
-    Plugin.plugin.viewFontChanged.add(font => {
-      if (Plugin.plugin.viewFont != null)
-        fontResolver.setFontMapping("Isabelle", Plugin.plugin.viewFont)
-      
-      panel.relayout()
-    })
-    
-    Plugin.plugin.stateUpdate.add(state => {
-      if (state == null)
-        panel.setDocument(null : Document)
-      else
-        panel.setDocument(state.results_xml, UserAgent.baseURL)
-    })
-  }
+    panel.relayout()
+  })
+
 }