Changeset 6931 for lang/scala/sandbox
- Timestamp:
- 02/19/08 18:59:24 (9 months ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
lang/scala/sandbox/src/jp/gr/java_conf/mizu/gui/GUIBuilder.scala
r6924 r6931 9 9 import javax.swing.JFrame 10 10 import javax.swing.JButton 11 import javax.swing.JTextField 11 12 import javax.swing.Action 12 13 import javax.swing.AbstractAction … … 47 48 case text:String => button.setText(text) 48 49 case handler:ActionListener => button.addActionListener(handler) 49 case (property:Symbol, value :Any) => setProperty(button, property, value)50 case (property:Symbol, value) => setProperty(button, property, value) 50 51 } 51 52 button 52 53 } 54 def textField(params :Any*) :JTextField = { 55 val widget = new JTextField 56 asContainer.add(widget) 57 params.foreach { 58 case text:String => widget.setText(text) 59 case (property:Symbol, value) => setProperty(widget, property, value) 60 } 61 widget 62 } 53 63 def action(handler :ActionEvent => Unit) :ActionListener = { 54 64 new ActionListener {
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)