--- a/src/Tools/jEdit/src/jedit/OutputDockable.scala Sat Dec 20 17:40:30 2008 +0100
+++ b/src/Tools/jEdit/src/jedit/OutputDockable.scala Sat Dec 20 17:41:57 2008 +0100
@@ -7,14 +7,19 @@
package isabelle.jedit
-import java.awt.GridLayout
-import javax.swing.{ JPanel, JTextArea, JScrollPane }
+import java.awt.{Dimension, GridLayout}
+import javax.swing.{JPanel, JTextArea, JScrollPane}
import org.gjt.sp.jedit.View
+import org.gjt.sp.jedit.gui.DockableWindowManager
+
class OutputDockable(view : View, position : String) extends JPanel {
+ if (position == DockableWindowManager.FLOATING)
+ setPreferredSize(new Dimension(500, 250))
+
setLayout(new GridLayout(1, 1))
- add(new JScrollPane(new JTextArea("No Prover running")))
+ add(new JScrollPane(new JTextArea))
}
--- a/src/Tools/jEdit/src/jedit/ScrollerDockable.scala Sat Dec 20 17:40:30 2008 +0100
+++ b/src/Tools/jEdit/src/jedit/ScrollerDockable.scala Sat Dec 20 17:41:57 2008 +0100
@@ -6,15 +6,16 @@
package isabelle.jedit
+
import isabelle.utils.EventSource
import isabelle.IsabelleProcess.Result
import isabelle.YXML.parse_failsafe
import scala.collection.mutable.{ArrayBuffer, HashMap}
-import java.awt.{ BorderLayout, Adjustable }
-import java.awt.event.{ ActionListener, ActionEvent, AdjustmentListener, AdjustmentEvent, ComponentListener, ComponentEvent }
-import javax.swing.{ JFrame, JPanel, JRadioButton, JScrollBar, JTextArea, Timer }
+import java.awt.{BorderLayout, Adjustable, Dimension}
+import java.awt.event.{ActionListener, ActionEvent, AdjustmentListener, AdjustmentEvent, ComponentListener, ComponentEvent}
+import javax.swing.{JFrame, JPanel, JRadioButton, JScrollBar, JTextArea, Timer}
import org.w3c.dom.Document
@@ -22,6 +23,8 @@
import org.xhtmlrenderer.context.AWTFontResolver
import org.gjt.sp.jedit.View
+import org.gjt.sp.jedit.gui.DockableWindowManager
+
trait Renderer[U, R] {
def render (u: U): R
@@ -100,9 +103,9 @@
def setText(s: String) {
message_ind.setText(s)
}
-
}
+
class ScrollerDockable(view : View, position : String) extends JPanel with AdjustmentListener {
val renderer:Renderer[Result, XHTMLPanel] = new ResultToPanelRenderer
@@ -117,7 +120,10 @@
vscroll.setUnitIncrement(subunits / 3)
vscroll.setBlockIncrement(subunits)
vscroll.addAdjustmentListener(this)
-
+
+ if (position == DockableWindowManager.FLOATING)
+ setPreferredSize(new Dimension(500, 250))
+
setLayout(new BorderLayout())
add (vscroll, BorderLayout.EAST)
add (message_panel, BorderLayout.CENTER)
@@ -238,7 +244,7 @@
panel.doDocumentLayout (panel.getGraphics) //lay out, preferred size is set then
// if there are thousands of empty panels, all have to be rendered -
// but this takes time (even for empty panels); therefore minimum size
- panel.setPreferredSize(new java.awt.Dimension(width,Math.max(25, panel.getPreferredSize.getHeight.toInt)))
+ panel.setPreferredSize(new java.awt.Dimension(width, Math.max(25, panel.getPreferredSize.getHeight.toInt)))
}
}
\ No newline at end of file
--- a/src/Tools/jEdit/src/jedit/StateViewDockable.scala Sat Dec 20 17:40:30 2008 +0100
+++ b/src/Tools/jEdit/src/jedit/StateViewDockable.scala Sat Dec 20 17:41:57 2008 +0100
@@ -8,8 +8,8 @@
package isabelle.jedit
-import java.awt.BorderLayout
-import javax.swing.{ JButton, JPanel, JScrollPane }
+import java.awt.{BorderLayout, Dimension}
+import javax.swing.{JButton, JPanel, JScrollPane}
import isabelle.IsabelleSystem.getenv
@@ -17,11 +17,18 @@
import org.xhtmlrenderer.context.AWTFontResolver
import org.gjt.sp.jedit.View
+import org.gjt.sp.jedit.gui.DockableWindowManager
+
class StateViewDockable(view : View, position : String) extends JPanel {
val panel = new XHTMLPanel(new UserAgent())
+
+ if (position == DockableWindowManager.FLOATING)
+ setPreferredSize(new Dimension(500, 250))
+
setLayout(new BorderLayout)
+
//Copy-paste-support
private val cp = new SelectionActions
cp.install(panel)