add icon for toplevel windows;
authorwenzelm
Sat, 12 Jan 2013 22:08:38 +0100
changeset 518692b15227b17e8
parent 51868 86389991636e
child 51870 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
     1.1 --- a/src/Pure/ML/ml_statistics.scala	Sat Jan 12 21:15:44 2013 +0100
     1.2 +++ b/src/Pure/ML/ml_statistics.scala	Sat Jan 12 22:08:38 2013 +0100
     1.3 @@ -107,7 +107,11 @@
     1.4    def standard_frames: Unit =
     1.5      ML_Statistics.standard_fields.map(chart(_)).foreach(c =>
     1.6        Swing_Thread.later {
     1.7 -        new Frame { contents = Component.wrap(new ChartPanel(c)); visible = true }
     1.8 +        new Frame {
     1.9 +          iconImage = Isabelle_System.get_icon().getImage
    1.10 +          contents = Component.wrap(new ChartPanel(c))
    1.11 +          visible = true
    1.12 +        }
    1.13        })
    1.14  }
    1.15  
     2.1 --- a/src/Pure/System/gui_setup.scala	Sat Jan 12 21:15:44 2013 +0100
     2.2 +++ b/src/Pure/System/gui_setup.scala	Sat Jan 12 22:08:38 2013 +0100
     2.3 @@ -23,6 +23,8 @@
     2.4    }
     2.5  
     2.6    def top = new MainFrame {
     2.7 +    iconImage = Isabelle_System.get_icon().getImage
     2.8 +
     2.9      title = "Isabelle setup"
    2.10  
    2.11      // components
     3.1 --- a/src/Pure/System/isabelle_system.scala	Sat Jan 12 21:15:44 2013 +0100
     3.2 +++ b/src/Pure/System/isabelle_system.scala	Sat Jan 12 22:08:38 2013 +0100
     3.3 @@ -13,6 +13,7 @@
     3.4    BufferedWriter, OutputStreamWriter, IOException, FileInputStream, BufferedInputStream}
     3.5  import java.awt.{GraphicsEnvironment, Font}
     3.6  import java.awt.font.TextAttribute
     3.7 +import javax.swing.ImageIcon
     3.8  
     3.9  import scala.io.Source
    3.10  import scala.util.matching.Regex
    3.11 @@ -433,4 +434,10 @@
    3.12        finally { stream.close }
    3.13      }
    3.14    }
    3.15 +
    3.16 +
    3.17 +  /* icon */
    3.18 +
    3.19 +  def get_icon(): ImageIcon =
    3.20 +    new ImageIcon(platform_path(Path.explode("~~/lib/logo/isabelle.gif")))
    3.21  }
     4.1 --- a/src/Pure/Tools/build_dialog.scala	Sat Jan 12 21:15:44 2013 +0100
     4.2 +++ b/src/Pure/Tools/build_dialog.scala	Sat Jan 12 22:08:38 2013 +0100
     4.3 @@ -64,6 +64,9 @@
     4.4      more_dirs: List[(Boolean, Path)],
     4.5      session: String): MainFrame = new MainFrame
     4.6    {
     4.7 +    iconImage = Isabelle_System.get_icon().getImage
     4.8 +
     4.9 +
    4.10      /* GUI state */
    4.11  
    4.12      private var is_stopped = false
     5.1 --- a/src/Tools/Graphview/src/graphview.scala	Sat Jan 12 21:15:44 2013 +0100
     5.2 +++ b/src/Tools/Graphview/src/graphview.scala	Sat Jan 12 22:08:38 2013 +0100
     5.3 @@ -37,6 +37,8 @@
     5.4        catch { case exn: Throwable => println(Exn.message(exn)); sys.exit(1) }
     5.5  
     5.6      val top = new MainFrame {
     5.7 +      iconImage = Isabelle_System.get_icon().getImage
     5.8 +
     5.9        title = "Graphview"
    5.10        minimumSize = new Dimension(640, 480)
    5.11        preferredSize = new Dimension(800, 600)