src/Pure/GUI/gui.scala
changeset 81648 c98cfdcb2df0
parent 81382 5e8287d34295
child 81649 904b2144e9c5
equal deleted inserted replaced
81647:ae670d860912 81648:c98cfdcb2df0
    62     val dummy_button = new JButton
    62     val dummy_button = new JButton
    63     def apply(id: Int): Unit =
    63     def apply(id: Int): Unit =
    64       component.setFocusTraversalKeys(id, dummy_button.getFocusTraversalKeys(id))
    64       component.setFocusTraversalKeys(id, dummy_button.getFocusTraversalKeys(id))
    65     apply(KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS)
    65     apply(KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS)
    66     apply(KeyboardFocusManager.BACKWARD_TRAVERSAL_KEYS)
    66     apply(KeyboardFocusManager.BACKWARD_TRAVERSAL_KEYS)
       
    67   }
       
    68 
       
    69 
       
    70   /* named items */
       
    71 
       
    72   sealed case class Name(name: String, kind: String = "", prefix: String = "") {
       
    73     override def toString: String = {
       
    74       val a = kind.nonEmpty
       
    75       val b = name.nonEmpty
       
    76       prefix + if_proper(a || b,
       
    77         if_proper(prefix, ": ") + kind + if_proper(a && b, " ") + if_proper(b, quote(name)))
       
    78     }
    67   }
    79   }
    68 
    80 
    69 
    81 
    70   /* simple dialogs */
    82   /* simple dialogs */
    71 
    83