add icon for toplevel windows;
authorwenzelm
Sat, 12 Jan 2013 22:08:38 +0100
changeset 50854 2b15227b17e8
parent 50853 86389991636e
child 50855 3f9a24e7349e
add icon for toplevel windows;
src/Pure/ML/ml_statistics.scala
src/Pure/System/gui_setup.scala
src/Pure/System/isabelle_system.scala
src/Pure/Tools/build_dialog.scala
src/Tools/Graphview/src/graphview.scala
--- a/src/Pure/ML/ml_statistics.scala	Sat Jan 12 21:15:44 2013 +0100
+++ b/src/Pure/ML/ml_statistics.scala	Sat Jan 12 22:08:38 2013 +0100
@@ -107,7 +107,11 @@
   def standard_frames: Unit =
     ML_Statistics.standard_fields.map(chart(_)).foreach(c =>
       Swing_Thread.later {
-        new Frame { contents = Component.wrap(new ChartPanel(c)); visible = true }
+        new Frame {
+          iconImage = Isabelle_System.get_icon().getImage
+          contents = Component.wrap(new ChartPanel(c))
+          visible = true
+        }
       })
 }
 
--- a/src/Pure/System/gui_setup.scala	Sat Jan 12 21:15:44 2013 +0100
+++ b/src/Pure/System/gui_setup.scala	Sat Jan 12 22:08:38 2013 +0100
@@ -23,6 +23,8 @@
   }
 
   def top = new MainFrame {
+    iconImage = Isabelle_System.get_icon().getImage
+
     title = "Isabelle setup"
 
     // components
--- a/src/Pure/System/isabelle_system.scala	Sat Jan 12 21:15:44 2013 +0100
+++ b/src/Pure/System/isabelle_system.scala	Sat Jan 12 22:08:38 2013 +0100
@@ -13,6 +13,7 @@
   BufferedWriter, OutputStreamWriter, IOException, FileInputStream, BufferedInputStream}
 import java.awt.{GraphicsEnvironment, Font}
 import java.awt.font.TextAttribute
+import javax.swing.ImageIcon
 
 import scala.io.Source
 import scala.util.matching.Regex
@@ -433,4 +434,10 @@
       finally { stream.close }
     }
   }
+
+
+  /* icon */
+
+  def get_icon(): ImageIcon =
+    new ImageIcon(platform_path(Path.explode("~~/lib/logo/isabelle.gif")))
 }
--- a/src/Pure/Tools/build_dialog.scala	Sat Jan 12 21:15:44 2013 +0100
+++ b/src/Pure/Tools/build_dialog.scala	Sat Jan 12 22:08:38 2013 +0100
@@ -64,6 +64,9 @@
     more_dirs: List[(Boolean, Path)],
     session: String): MainFrame = new MainFrame
   {
+    iconImage = Isabelle_System.get_icon().getImage
+
+
     /* GUI state */
 
     private var is_stopped = false
--- a/src/Tools/Graphview/src/graphview.scala	Sat Jan 12 21:15:44 2013 +0100
+++ b/src/Tools/Graphview/src/graphview.scala	Sat Jan 12 22:08:38 2013 +0100
@@ -37,6 +37,8 @@
       catch { case exn: Throwable => println(Exn.message(exn)); sys.exit(1) }
 
     val top = new MainFrame {
+      iconImage = Isabelle_System.get_icon().getImage
+
       title = "Graphview"
       minimumSize = new Dimension(640, 480)
       preferredSize = new Dimension(800, 600)