File tree Expand file tree Collapse file tree 1 file changed +17
-10
lines changed
src/main/scala/scala/swing Expand file tree Collapse file tree 1 file changed +17
-10
lines changed Original file line number Diff line number Diff line change @@ -39,26 +39,33 @@ class DesktopPane extends Component with SequentialContainer.Wrapper {
3939 /**
4040 * Specifies how dragged frames will be animated.
4141 *
42- * @param newMode either `LiveDragMode ` or `OutlineDragMode `.
42+ * @param newMode either `DragMode.Live ` or `DragMode.Outline `.
4343 */
44- def dragMode_= (newMode : DragMode ) : Unit = peer.setDragMode(newMode.intValue )
44+ def dragMode_= (newMode : DragMode ) : Unit = peer.setDragMode(newMode.id )
4545}
4646
4747
4848object DesktopPane {
4949
5050 /**
51- * Indicates how an internal frame will be animated as it is dragged .
51+ * Supported drag modes for internal frames .
5252 */
53- final case class DragMode (intValue : Int )
53+ // noinspection TypeAnnotation
54+ object DragMode extends Enumeration {
55+ /**
56+ * Renders the contents of the frame while dragging.
57+ */
58+ val Live = Value (JDesktopPane .LIVE_DRAG_MODE )
5459
55- /**
56- * Indicates that a dragged internal frame will be animated with its contents.
57- */
58- val LiveDragMode : DragMode = DragMode (JDesktopPane .LIVE_DRAG_MODE )
60+ /**
61+ * Renders only the outline of the frame while dragging.
62+ */
63+ val Outline = Value (JDesktopPane .OUTLINE_DRAG_MODE )
64+ }
5965
6066 /**
61- * Indicates that a dragged internal frame will only render as an outline .
67+ * Type indicating how an internal frame will be animated as it is dragged .
6268 */
63- val OutlineDragMode : DragMode = DragMode (JDesktopPane .OUTLINE_DRAG_MODE )
69+ type DragMode = DragMode .Value
70+
6471}
You can’t perform that action at this time.
0 commit comments