src/Pure/GUI/gui.scala
changeset 63874 e2393cfde472
parent 63420 b43a3f7d9935
child 65083 9a0e34edfad1
equal deleted inserted replaced
63873:228a85f1d6af 63874:e2393cfde472
   209       case Some(w: JFrame) => Some(w.getLayeredPane)
   209       case Some(w: JFrame) => Some(w.getLayeredPane)
   210       case Some(w: JDialog) => Some(w.getLayeredPane)
   210       case Some(w: JDialog) => Some(w.getLayeredPane)
   211       case _ => None
   211       case _ => None
   212     }
   212     }
   213 
   213 
       
   214   def traverse_components(component: Component, apply: Component => Unit)
       
   215   {
       
   216     def traverse(comp: Component)
       
   217     {
       
   218       apply(comp)
       
   219       comp match {
       
   220         case cont: Container =>
       
   221           for (i <- 0 until cont.getComponentCount)
       
   222             traverse(cont.getComponent(i))
       
   223         case _ =>
       
   224       }
       
   225     }
       
   226     traverse(component)
       
   227   }
       
   228 
   214 
   229 
   215   /* font operations */
   230   /* font operations */
   216 
   231 
   217   def copy_font(font: Font): Font =
   232   def copy_font(font: Font): Font =
   218     if (font == null) null
   233     if (font == null) null