changeset 45445 | 51f8895b9ad9 |
parent 45037 | fe6d1ae7a065 |
child 45500 | 6ec4a5eb2fc0 |
45444:63d460db4919 | 45445:51f8895b9ad9 |
---|---|
140 |
140 |
141 def dialog = simple_dialog(JOptionPane.PLAIN_MESSAGE, null) _ |
141 def dialog = simple_dialog(JOptionPane.PLAIN_MESSAGE, null) _ |
142 def warning_dialog = simple_dialog(JOptionPane.WARNING_MESSAGE, "Warning") _ |
142 def warning_dialog = simple_dialog(JOptionPane.WARNING_MESSAGE, "Warning") _ |
143 def error_dialog = simple_dialog(JOptionPane.ERROR_MESSAGE, "Error") _ |
143 def error_dialog = simple_dialog(JOptionPane.ERROR_MESSAGE, "Error") _ |
144 |
144 |
145 def confirm_dialog(parent: Component, title: String, option_type: Int, message: Any*): Int = |
|
146 Swing_Thread.now { |
|
147 val java_message = message map { case x: scala.swing.Component => x.peer case x => x } |
|
148 JOptionPane.showConfirmDialog(parent, |
|
149 java_message.toArray.asInstanceOf[Array[AnyRef]], title, |
|
150 option_type, JOptionPane.QUESTION_MESSAGE) |
|
151 } |
|
152 |
|
145 |
153 |
146 /* zoom box */ |
154 /* zoom box */ |
147 |
155 |
148 class Zoom_Box(apply_factor: Int => Unit) extends ComboBox[String]( |
156 class Zoom_Box(apply_factor: Int => Unit) extends ComboBox[String]( |
149 List("50%", "70%", "85%", "100%", "125%", "150%", "175%", "200%", "300%", "400%")) |
157 List("50%", "70%", "85%", "100%", "125%", "150%", "175%", "200%", "300%", "400%")) |