Changeset 6923

Show
Ignore:
Timestamp:
02/19/08 17:57:17 (5 years ago)
Author:
kmizu
Message:
 
Files:
1 modified

Legend:

Unmodified
Added
Removed
  • lang/scala/sandbox/src/jp/gr/java_conf/mizu/gui/GUIBuilder.scala

    r6921 r6923  
    4545                params.foreach { 
    4646                case text:String => button.setText(text) 
     47    case handler:ActionListener => button.addActionListener(handler) 
    4748                case (property:Symbol, value:Any) => setProperty(button, property, value) 
    4849                } 
    4950                button 
    5051        } 
    51         def action(handler :ActionEvent => Unit) :Action = { 
    52           new AbstractAction { 
    53                   def actionPerformed(e :ActionEvent) = handler(e) 
    54                 } 
     52        def action(handler :ActionEvent => Unit) :ActionListener = { 
     53    new ActionListener { 
     54      def actionPerformed(e :ActionEvent) = handler(e) 
     55    } 
    5556        } 
    5657        def dimension(width :Int, height :Int) :Dimension = {