src/Pure/GUI/gui.scala
changeset 73070 7ef8d77ee761
parent 73038 3b14f7315dd2
child 73072 7460f92d63fc
equal deleted inserted replaced
73069:8d9fb810462b 73070:7ef8d77ee761
   154   def isabelle_icons(): List[ImageIcon] =
   154   def isabelle_icons(): List[ImageIcon] =
   155     for (icon <- List("isabelle/isabelle_transparent-32.gif", "isabelle/isabelle_transparent.gif"))
   155     for (icon <- List("isabelle/isabelle_transparent-32.gif", "isabelle/isabelle_transparent.gif"))
   156       yield new ImageIcon(getClass.getClassLoader.getResource(icon))
   156       yield new ImageIcon(getClass.getClassLoader.getResource(icon))
   157 
   157 
   158   def isabelle_image(): Image = isabelle_icon().getImage
   158   def isabelle_image(): Image = isabelle_icon().getImage
       
   159 
       
   160   def isabelle_image_large(): Image =
       
   161     Toolkit.getDefaultToolkit.getImage(
       
   162       File.platform_path(Path.explode("~~/lib/logo/isabelle_transparent-128.png")))
       
   163 
       
   164   def set_application_icon()
       
   165   {
       
   166     if (Platform.is_macos) {
       
   167       val image = isabelle_image_large()
       
   168       val app =
       
   169         Class.forName("com.apple.eawt.Application")
       
   170           .getDeclaredMethod("getApplication").invoke(null)
       
   171       app.getClass.getDeclaredMethod("setDockIconImage", classOf[Image]).invoke(app, image)
       
   172     }
       
   173   }
   159 
   174 
   160 
   175 
   161   /* location within multi-screen environment */
   176   /* location within multi-screen environment */
   162 
   177 
   163   final case class Screen_Location(point: Point, bounds: Rectangle)
   178   final case class Screen_Location(point: Point, bounds: Rectangle)