diff options
Diffstat (limited to 'src')
21 files changed, 29 insertions, 24 deletions
diff --git a/src/swing/scala/swing/EditorPane.scala b/src/swing/scala/swing/EditorPane.scala index d90615299d..884da6a371 100644 --- a/src/swing/scala/swing/EditorPane.scala +++ b/src/swing/scala/swing/EditorPane.scala @@ -21,7 +21,7 @@ import java.awt.event._ * @see javax.swing.JEditorPane */ class EditorPane(contentType0: String, text0: String) extends TextComponent { - override lazy val peer: JEditorPane = new JEditorPane(contentType0, text0) with SuperMixin {} + override lazy val peer: JEditorPane = new JEditorPane(contentType0, text0) with SuperMixin def this() = this("text/plain", "") def contentType: String = peer.getContentType diff --git a/src/swing/scala/swing/FlowPanel.scala b/src/swing/scala/swing/FlowPanel.scala index 5b2d1950a4..65833940f5 100644 --- a/src/swing/scala/swing/FlowPanel.scala +++ b/src/swing/scala/swing/FlowPanel.scala @@ -12,6 +12,7 @@ package scala.swing import java.awt.FlowLayout +import javax.swing.JPanel object FlowPanel { object Alignment extends Enumeration { @@ -30,7 +31,8 @@ object FlowPanel { * @see java.awt.FlowLayout */ class FlowPanel(alignment: FlowPanel.Alignment.Value)(contents0: Component*) extends Panel with SequentialContainer.Wrapper { - override lazy val peer: javax.swing.JPanel = new javax.swing.JPanel(new java.awt.FlowLayout(alignment.id)) + override lazy val peer: JPanel = + new JPanel(new java.awt.FlowLayout(alignment.id)) with SuperMixin def this(contents0: Component*) = this(FlowPanel.Alignment.Center)(contents0: _*) def this() = this(FlowPanel.Alignment.Center)() diff --git a/src/swing/scala/swing/FormattedTextField.scala b/src/swing/scala/swing/FormattedTextField.scala index c82c0fe45f..1a2d1dacb4 100644 --- a/src/swing/scala/swing/FormattedTextField.scala +++ b/src/swing/scala/swing/FormattedTextField.scala @@ -33,7 +33,7 @@ object FormattedTextField { * @see javax.swing.JFormattedTextField */ class FormattedTextField(format: java.text.Format) extends TextComponent { - override lazy val peer: JFormattedTextField = new JFormattedTextField(format) + override lazy val peer: JFormattedTextField = new JFormattedTextField(format) with SuperMixin import FormattedTextField._ diff --git a/src/swing/scala/swing/GridBagPanel.scala b/src/swing/scala/swing/GridBagPanel.scala index 5402d1f686..412ec3f4f5 100644 --- a/src/swing/scala/swing/GridBagPanel.scala +++ b/src/swing/scala/swing/GridBagPanel.scala @@ -11,7 +11,7 @@ package scala.swing -import java.awt.{GridBagConstraints} +import java.awt.{GridBagConstraints, GridBagLayout} object GridBagPanel { @@ -50,10 +50,10 @@ object GridBagPanel { * @see java.awt.GridBagLayout */ class GridBagPanel extends Panel with LayoutContainer { - override lazy val peer = new javax.swing.JPanel(new java.awt.GridBagLayout) + override lazy val peer = new javax.swing.JPanel(new GridBagLayout) with SuperMixin import GridBagPanel._ - private def layoutManager = peer.getLayout.asInstanceOf[java.awt.GridBagLayout] + private def layoutManager = peer.getLayout.asInstanceOf[GridBagLayout] /** * Convenient conversion from xy-coords given as pairs to diff --git a/src/swing/scala/swing/GridPanel.scala b/src/swing/scala/swing/GridPanel.scala index b37f26221d..608b8810a2 100644 --- a/src/swing/scala/swing/GridPanel.scala +++ b/src/swing/scala/swing/GridPanel.scala @@ -21,7 +21,8 @@ object GridPanel { * @see java.awt.GridLayout */ class GridPanel(rows0: Int, cols0: Int) extends Panel with SequentialContainer.Wrapper { - override lazy val peer = new javax.swing.JPanel(new java.awt.GridLayout(rows0, cols0)) + override lazy val peer = + new javax.swing.JPanel(new java.awt.GridLayout(rows0, cols0)) with SuperMixin /*type Constraints = (Int, Int) diff --git a/src/swing/scala/swing/Label.scala b/src/swing/scala/swing/Label.scala index 2a24e8cd02..31b2b0c87c 100644 --- a/src/swing/scala/swing/Label.scala +++ b/src/swing/scala/swing/Label.scala @@ -20,7 +20,8 @@ import scala.swing.Swing._ * @see javax.swing.JLabel */ class Label(text0: String, icon0: Icon, align: Alignment.Value) extends Component { - override lazy val peer: JLabel = new JLabel(text0, toNullIcon(icon0), align.id) with SuperMixin + override lazy val peer: JLabel = + new JLabel(text0, toNullIcon(icon0), align.id) with SuperMixin def this() = this("", EmptyIcon, Alignment.Center) def this(s: String) = this(s, EmptyIcon, Alignment.Center) diff --git a/src/swing/scala/swing/ListView.scala b/src/swing/scala/swing/ListView.scala index a15471796c..9c7b7d6d19 100644 --- a/src/swing/scala/swing/ListView.scala +++ b/src/swing/scala/swing/ListView.scala @@ -143,7 +143,7 @@ object ListView { */ class ListView[A] extends Component { import ListView._ - override lazy val peer: JList = new JList + override lazy val peer: JList = new JList with SuperMixin def this(items: Seq[A]) = { this() diff --git a/src/swing/scala/swing/MainFrame.scala b/src/swing/scala/swing/MainFrame.scala index 361da6233b..ec4e74958b 100644 --- a/src/swing/scala/swing/MainFrame.scala +++ b/src/swing/scala/swing/MainFrame.scala @@ -18,5 +18,5 @@ import event._ * framework and quits the application when closed. */ class MainFrame extends Frame { - override def closeOperation { System.exit(0); } + override def closeOperation { System.exit(0) } } diff --git a/src/swing/scala/swing/Menu.scala b/src/swing/scala/swing/Menu.scala index 14855fd51f..55773320c6 100644 --- a/src/swing/scala/swing/Menu.scala +++ b/src/swing/scala/swing/Menu.scala @@ -24,7 +24,7 @@ object MenuBar { * @see javax.swing.JMenuBar */ class MenuBar extends Component with SequentialContainer.Wrapper { - override lazy val peer: JMenuBar = new JMenuBar + override lazy val peer: JMenuBar = new JMenuBar with SuperMixin def menus: Seq[Menu] = contents.filter(_.isInstanceOf[Menu]).map(_.asInstanceOf[Menu]) diff --git a/src/swing/scala/swing/PasswordField.scala b/src/swing/scala/swing/PasswordField.scala index 4b07969612..568cc3b927 100644 --- a/src/swing/scala/swing/PasswordField.scala +++ b/src/swing/scala/swing/PasswordField.scala @@ -21,7 +21,7 @@ import java.awt.event._ * @see javax.swing.JPasswordField */ class PasswordField(text0: String, columns0: Int) extends TextField(text0, columns0) { - override lazy val peer: JPasswordField = new JPasswordField(text0, columns0) + override lazy val peer: JPasswordField = new JPasswordField(text0, columns0) with SuperMixin def this(text: String) = this(text, 0) def this(columns: Int) = this("", columns) def this() = this("") diff --git a/src/swing/scala/swing/ProgressBar.scala b/src/swing/scala/swing/ProgressBar.scala index d43ddd5717..c6c2ae25d3 100644 --- a/src/swing/scala/swing/ProgressBar.scala +++ b/src/swing/scala/swing/ProgressBar.scala @@ -22,7 +22,7 @@ import event._ */ class ProgressBar extends Component with Orientable.Wrapper { override lazy val peer: javax.swing.JProgressBar = - new javax.swing.JProgressBar + new javax.swing.JProgressBar with SuperMixin def min: Int = peer.getMinimum def min_=(v: Int) { peer.setMinimum(v) } diff --git a/src/swing/scala/swing/RadioButton.scala b/src/swing/scala/swing/RadioButton.scala index ae789b077c..3b3e60816b 100644 --- a/src/swing/scala/swing/RadioButton.scala +++ b/src/swing/scala/swing/RadioButton.scala @@ -21,6 +21,6 @@ import javax.swing._ * @see javax.swing.JRadioButton */ class RadioButton(text0: String) extends ToggleButton { - override lazy val peer: JRadioButton = new JRadioButton(text0) + override lazy val peer: JRadioButton = new JRadioButton(text0) with SuperMixin def this() = this("") } diff --git a/src/swing/scala/swing/ScrollBar.scala b/src/swing/scala/swing/ScrollBar.scala index 2ae8cd5c4e..28245edda7 100644 --- a/src/swing/scala/swing/ScrollBar.scala +++ b/src/swing/scala/swing/ScrollBar.scala @@ -23,7 +23,7 @@ object ScrollBar { } class ScrollBar extends Component with Orientable.Wrapper with Adjustable.Wrapper { - override lazy val peer = new JScrollBar + override lazy val peer: JScrollBar = new JScrollBar with SuperMixin def valueIsAjusting = peer.getValueIsAdjusting def valueIsAjusting_=(b : Boolean) = peer.setValueIsAdjusting(b) diff --git a/src/swing/scala/swing/ScrollPane.scala b/src/swing/scala/swing/ScrollPane.scala index fc2e96e67a..16c4130671 100644 --- a/src/swing/scala/swing/ScrollPane.scala +++ b/src/swing/scala/swing/ScrollPane.scala @@ -43,7 +43,7 @@ object ScrollPane { class ScrollPane extends Component with Container { import ScrollPane._ - override lazy val peer: JScrollPane = new JScrollPane + override lazy val peer: JScrollPane = new JScrollPane with SuperMixin def this(c: Component) = { this() contents = c diff --git a/src/swing/scala/swing/Separator.scala b/src/swing/scala/swing/Separator.scala index cf2bfd75d0..4fdf0edb70 100644 --- a/src/swing/scala/swing/Separator.scala +++ b/src/swing/scala/swing/Separator.scala @@ -19,6 +19,6 @@ import javax.swing._ * @see javax.swing.JSeparator */ class Separator(o: Orientation.Value) extends Component with Oriented.Wrapper { - override lazy val peer: JSeparator = new JSeparator(o.id) + override lazy val peer: JSeparator = new JSeparator(o.id) with SuperMixin def this() = this(Orientation.Horizontal) } diff --git a/src/swing/scala/swing/Slider.scala b/src/swing/scala/swing/Slider.scala index 793f5eb5bb..10b79f37cc 100644 --- a/src/swing/scala/swing/Slider.scala +++ b/src/swing/scala/swing/Slider.scala @@ -24,7 +24,7 @@ import event._ * @see javax.swing.JSlider */ class Slider extends Component with Orientable.Wrapper with Publisher { - override lazy val peer: JSlider = new JSlider + override lazy val peer: JSlider = new JSlider with SuperMixin def min: Int = peer.getMinimum def min_=(v: Int) { peer.setMinimum(v) } diff --git a/src/swing/scala/swing/SplitPane.scala b/src/swing/scala/swing/SplitPane.scala index c9f1641ef7..bad3f32bed 100644 --- a/src/swing/scala/swing/SplitPane.scala +++ b/src/swing/scala/swing/SplitPane.scala @@ -23,7 +23,7 @@ import Swing._ */ class SplitPane(o: Orientation.Value, left: Component, right: Component) extends Component with Container with Orientable.Wrapper { override lazy val peer: javax.swing.JSplitPane = - new javax.swing.JSplitPane(o.id, left.peer, right.peer) + new javax.swing.JSplitPane(o.id, left.peer, right.peer) with SuperMixin def this(o: Orientation.Value) = this(o, new Component {}, new Component {}) def this() = this(Orientation.Horizontal) diff --git a/src/swing/scala/swing/TabbedPane.scala b/src/swing/scala/swing/TabbedPane.scala index b8fb1472fb..ec688a0cf0 100644 --- a/src/swing/scala/swing/TabbedPane.scala +++ b/src/swing/scala/swing/TabbedPane.scala @@ -77,7 +77,7 @@ object TabbedPane { * @see javax.swing.JTabbedPane */ class TabbedPane extends Component with Publisher { - override lazy val peer: JTabbedPane = new JTabbedPane + override lazy val peer: JTabbedPane = new JTabbedPane with SuperMixin import TabbedPane._ object pages extends BufferWrapper[Page] { diff --git a/src/swing/scala/swing/Table.scala b/src/swing/scala/swing/Table.scala index 9370ea7eb1..2993f1d84e 100644 --- a/src/swing/scala/swing/Table.scala +++ b/src/swing/scala/swing/Table.scala @@ -110,7 +110,7 @@ object Table { * @see javax.swing.JTable */ class Table extends Component with Scrollable.Wrapper { - override lazy val peer: JTable = new JTable with Table.JTableMixin { + override lazy val peer: JTable = new JTable with Table.JTableMixin with SuperMixin { def tableWrapper = Table.this override def getCellRenderer(r: Int, c: Int) = new TableCellRenderer { def getTableCellRendererComponent(table: JTable, value: AnyRef, isSelected: Boolean, hasFocus: Boolean, row: Int, column: Int) = diff --git a/src/swing/scala/swing/TextArea.scala b/src/swing/scala/swing/TextArea.scala index d491b0b0c6..201e4ab674 100644 --- a/src/swing/scala/swing/TextArea.scala +++ b/src/swing/scala/swing/TextArea.scala @@ -20,8 +20,9 @@ import java.awt.event._ * * @see javax.swing.JTextArea */ -class TextArea(text0: String, rows0: Int, columns0: Int) extends TextComponent with TextComponent.HasColumns with TextComponent.HasRows { - override lazy val peer: JTextArea = new JTextArea(text0, rows0, columns0) +class TextArea(text0: String, rows0: Int, columns0: Int) extends TextComponent + with TextComponent.HasColumns with TextComponent.HasRows { + override lazy val peer: JTextArea = new JTextArea(text0, rows0, columns0) with SuperMixin def this(text: String) = this(text, 0, 0) def this(rows: Int, columns: Int) = this("", rows, columns) def this() = this("", 0, 0) diff --git a/src/swing/scala/swing/ToggleButton.scala b/src/swing/scala/swing/ToggleButton.scala index 506f611c95..59f310dc23 100644 --- a/src/swing/scala/swing/ToggleButton.scala +++ b/src/swing/scala/swing/ToggleButton.scala @@ -21,6 +21,6 @@ import javax.swing._ * @see javax.swing.JToggleButton */ class ToggleButton(text0: String) extends AbstractButton { - override lazy val peer: JToggleButton = new JToggleButton(text0) + override lazy val peer: JToggleButton = new JToggleButton(text0) with SuperMixin def this() = this("") } |