diff options
author | michelou <michelou@epfl.ch> | 2011-07-15 20:20:47 +0000 |
---|---|---|
committer | michelou <michelou@epfl.ch> | 2011-07-15 20:20:47 +0000 |
commit | a4fb15861b271c41fba8382f3b55024b5fdc8155 (patch) | |
tree | 30e406cf90ed5c2fb6e87d1f72e300c1749d4452 /src/swing | |
parent | a0476af6bce252a7e724e6e99e50a80f0021ce78 (diff) | |
download | scala-a4fb15861b271c41fba8382f3b55024b5fdc8155.tar.gz scala-a4fb15861b271c41fba8382f3b55024b5fdc8155.tar.bz2 scala-a4fb15861b271c41fba8382f3b55024b5fdc8155.zip |
3rd round of clean ups (see r25285, r25292)
Diffstat (limited to 'src/swing')
-rw-r--r-- | src/swing/scala/swing/FileChooser.scala | 12 | ||||
-rw-r--r-- | src/swing/scala/swing/LayoutContainer.scala | 15 | ||||
-rw-r--r-- | src/swing/scala/swing/SimpleGUIApplication.scala | 15 | ||||
-rw-r--r-- | src/swing/scala/swing/UIElement.scala | 18 | ||||
-rw-r--r-- | src/swing/scala/swing/event/AdjustingEvent.scala | 13 |
5 files changed, 33 insertions, 40 deletions
diff --git a/src/swing/scala/swing/FileChooser.scala b/src/swing/scala/swing/FileChooser.scala index 0459af3ddb..fef99c5d82 100644 --- a/src/swing/scala/swing/FileChooser.scala +++ b/src/swing/scala/swing/FileChooser.scala @@ -6,8 +6,6 @@ ** |/ ** \* */ - - package scala.swing import java.io.File @@ -16,9 +14,9 @@ import javax.swing.filechooser._ object FileChooser { /** - * The result of a file dialog. The precise meaning of the <code>Approve</code> - * result depends on the specific dialog type. Could be "save" or "open" for - * example. + * The result of a file dialog. The precise meaning of the `Approve` + * result depends on the specific dialog type. Could be `"save"` or + * `"open"` for instance. */ object Result extends Enumeration { val Cancel = Value(JFileChooser.CANCEL_OPTION) @@ -39,7 +37,7 @@ object FileChooser { /** * Used to open file dialogs. * - * @see javax.swing.JFileChooser + * @see [[javax.swing.JFileChooser]] */ class FileChooser(dir: File) { import FileChooser._ @@ -66,7 +64,7 @@ class FileChooser(dir: File) { def fileSelectionMode: SelectionMode.Value = SelectionMode(peer.getFileSelectionMode) def fileSelectionMode_=(s: SelectionMode.Value) { peer.setFileSelectionMode(s.id) } def fileFilter: FileFilter = peer.getFileFilter - def fileFilter_=(f: FileFilter) { peer.setFileFilter(f) } + def fileFilter_=(f: FileFilter) { peer setFileFilter f } def selectedFile: File = peer.getSelectedFile def selectedFile_=(file: File) { peer.setSelectedFile(file) } diff --git a/src/swing/scala/swing/LayoutContainer.scala b/src/swing/scala/swing/LayoutContainer.scala index 0865abf595..da1c766437 100644 --- a/src/swing/scala/swing/LayoutContainer.scala +++ b/src/swing/scala/swing/LayoutContainer.scala @@ -6,22 +6,19 @@ ** |/ ** \* */ - - package scala.swing import javax.swing.JComponent import scala.collection.mutable -/** <p> - * A container that associates layout constraints of member type - * <code>Constraints</code> with its children. See <code>GridBagPanel</code> - * for an example container with custom constraints. - * </p> +/** A container that associates layout constraints of member type + * `Constraints` with its children. + * + * See `GridBagPanel` for an example container with custom constraints. * * @note [Java Swing] In scala.swing, panels and layout managers are - * combined into subclasses of this base class. This approach allows for typed - * component constraints. + * combined into subclasses of this base class. This approach allows for + * typed component constraints. */ trait LayoutContainer extends Container.Wrapper { /** diff --git a/src/swing/scala/swing/SimpleGUIApplication.scala b/src/swing/scala/swing/SimpleGUIApplication.scala index 74d5d5ee04..f12e43ff5f 100644 --- a/src/swing/scala/swing/SimpleGUIApplication.scala +++ b/src/swing/scala/swing/SimpleGUIApplication.scala @@ -6,20 +6,19 @@ ** |/ ** \* */ - - package scala.swing import javax.swing._ /** - * Extend this class for most simple UI applications. Clients need to implement the - * <code>top</code> method. Framework initialization is done by this class. + * Extend this class for most simple UI applications. Clients need to + * implement the `top` method. Framework initialization is done by this class. * - * In order to conform to Swing's threading policy, never implement top or any additional - * member that created Swing components as a value unless component creation happens on - * the EDT (see Swing.onEDT and Swing.onEDTWait). Lazy values are okay for the same reason - * if they are initialized on the EDT always. + * In order to conform to Swing's threading policy, never implement top or any + * additional member that created Swing components as a value unless component + * creation happens on the EDT (see `Swing.onEDT` and `Swing.onEDTWait`). + * Lazy values are okay for the same reason if they are initialized on the EDT + * always. */ @deprecated("Use SimpleSwingApplication instead", "2.8.0") abstract class SimpleGUIApplication extends GUIApplication { diff --git a/src/swing/scala/swing/UIElement.scala b/src/swing/scala/swing/UIElement.scala index 048568dda2..9e505ea9a6 100644 --- a/src/swing/scala/swing/UIElement.scala +++ b/src/swing/scala/swing/UIElement.scala @@ -44,8 +44,8 @@ object UIElement { * Returns a wrapper for a given Java Swing peer. If there is a * compatible wrapper in use, this method will return it. * - * `wrap` methods in companion objects of subclasses of UIElement have the - * same behavior, except that they return more specific wrappers. + * `wrap` methods in companion objects of subclasses of `UIElement` have + * the same behavior, except that they return more specific wrappers. */ def wrap(c: java.awt.Component): UIElement = { val w = cachedWrapper[UIElement](c) @@ -57,7 +57,7 @@ object UIElement { /** * The base trait of all user interface elements. Subclasses belong to one * of two groups: top-level elements such as windows and dialogs, or - * <code>Component</code>s. + * `Component`s. * * @note [Java Swing] This trait does not have an exact counterpart in * Java Swing. The peer is of type java.awt.Component since this is the @@ -78,19 +78,19 @@ trait UIElement extends Proxy with LazyPublisher { UIElement.cache(this) def foreground: Color = peer.getForeground - def foreground_=(c: Color) = peer.setForeground(c) + def foreground_=(c: Color) = peer setForeground c def background: Color = peer.getBackground - def background_=(c: Color) = peer.setBackground(c) + def background_=(c: Color) = peer setBackground c def minimumSize = peer.getMinimumSize - def minimumSize_=(x: Dimension) = peer.setMinimumSize(x) + def minimumSize_=(x: Dimension) = peer setMinimumSize x def maximumSize = peer.getMaximumSize - def maximumSize_=(x: Dimension) = peer.setMaximumSize(x) + def maximumSize_=(x: Dimension) = peer setMaximumSize x def preferredSize = peer.getPreferredSize - def preferredSize_=(x: Dimension) = peer.setPreferredSize(x) + def preferredSize_=(x: Dimension) = peer setPreferredSize x def font: Font = peer.getFont - def font_=(f: Font) = peer.setFont(f) + def font_=(f: Font) = peer setFont f def locationOnScreen = peer.getLocationOnScreen def location = peer.getLocation diff --git a/src/swing/scala/swing/event/AdjustingEvent.scala b/src/swing/scala/swing/event/AdjustingEvent.scala index b9469bc588..26815595eb 100644 --- a/src/swing/scala/swing/event/AdjustingEvent.scala +++ b/src/swing/scala/swing/event/AdjustingEvent.scala @@ -11,13 +11,12 @@ package scala.swing package event -/** <p> - * An event that indicates some editing operation that can be still in - * progress.<br/> - * Example: dragging a slider creates a number of <code>AdjustmentEvents</code> - * with <code>adjusting == true</code> until the user finally releases the - * mouse button. - * </p> +/** An event that indicates some editing operation that can be still + * in progress. + * + * Example: dragging a slider creates a number of `AdjustmentEvents` + * with `adjusting == '''true'''` until the user finally releases the + * mouse button. */ trait AdjustingEvent extends ComponentEvent { def adjusting: Boolean |