diff options
Diffstat (limited to 'src/swing')
-rw-r--r-- | src/swing/scala/swing/ButtonGroup.scala | 5 | ||||
-rw-r--r-- | src/swing/scala/swing/LayoutContainer.scala | 4 | ||||
-rw-r--r-- | src/swing/scala/swing/Publisher.scala | 12 | ||||
-rw-r--r-- | src/swing/scala/swing/UIElement.scala | 3 |
4 files changed, 8 insertions, 16 deletions
diff --git a/src/swing/scala/swing/ButtonGroup.scala b/src/swing/scala/swing/ButtonGroup.scala index bfecea0092..b2e37848cb 100644 --- a/src/swing/scala/swing/ButtonGroup.scala +++ b/src/swing/scala/swing/ButtonGroup.scala @@ -6,14 +6,11 @@ ** |/ ** \* */ - - package scala.swing import event._ import javax.swing.{AbstractButton => JAbstractButton,Icon} -import scala.collection._ -import scala.collection.mutable.Buffer +import scala.collection.{ mutable, immutable } /** * A button mutex. At most one of its associated buttons is selected diff --git a/src/swing/scala/swing/LayoutContainer.scala b/src/swing/scala/swing/LayoutContainer.scala index 0e4a1af41b..0865abf595 100644 --- a/src/swing/scala/swing/LayoutContainer.scala +++ b/src/swing/scala/swing/LayoutContainer.scala @@ -11,7 +11,7 @@ package scala.swing import javax.swing.JComponent -import scala.collection.mutable.Map +import scala.collection.mutable /** <p> * A container that associates layout constraints of member type @@ -57,7 +57,7 @@ trait LayoutContainer extends Container.Wrapper { * * also ensures that myComponent is properly added to this container. */ - def layout: Map[Component, Constraints] = new Map[Component, Constraints] { + def layout: mutable.Map[Component, Constraints] = new mutable.Map[Component, Constraints] { def -= (c: Component): this.type = { _contents -= c; this } def += (cl: (Component, Constraints)): this.type = { update(cl._1, cl._2); this } override def update (c: Component, l: Constraints) { diff --git a/src/swing/scala/swing/Publisher.scala b/src/swing/scala/swing/Publisher.scala index 3c3e99fc49..6ce38df0e9 100644 --- a/src/swing/scala/swing/Publisher.scala +++ b/src/swing/scala/swing/Publisher.scala @@ -6,12 +6,10 @@ ** |/ ** \* */ - - package scala.swing -import scala.collection._ -import scala.collection.mutable.{Buffer, HashSet, Set} +import scala.collection.mutable +import mutable.Buffer import event.Event /** <p> @@ -33,7 +31,7 @@ trait Publisher extends Reactor { protected val listeners = new RefSet[Reaction] { import scala.ref._ - val underlying = new HashSet[Reference[Reaction]] + val underlying = new mutable.HashSet[Reference[Reaction]] protected def Ref(a: Reaction) = a match { case a: StronglyReferenced => new StrongReference[Reaction](a) with super.Ref[Reaction] case _ => new WeakReference[Reaction](a, referenceQueue) with super.Ref[Reaction] @@ -164,8 +162,8 @@ abstract class RefBuffer[A <: AnyRef] extends Buffer[A] with SingleRefCollection protected[this] def removeReference(ref: Reference[A]) { underlying -= ref } } -private[swing] abstract class RefSet[A <: AnyRef] extends Set[A] with SingleRefCollection[A] { self => - protected val underlying: Set[Reference[A]] +private[swing] abstract class RefSet[A <: AnyRef] extends mutable.Set[A] with SingleRefCollection[A] { self => + protected val underlying: mutable.Set[Reference[A]] def -=(el: A): this.type = { underlying -= Ref(el); purgeReferences(); this } def +=(el: A): this.type = { purgeReferences(); underlying += Ref(el); this } diff --git a/src/swing/scala/swing/UIElement.scala b/src/swing/scala/swing/UIElement.scala index 9c5120a342..048568dda2 100644 --- a/src/swing/scala/swing/UIElement.scala +++ b/src/swing/scala/swing/UIElement.scala @@ -6,13 +6,10 @@ ** |/ ** \* */ - - package scala.swing import java.awt.Cursor import event._ -import scala.collection.mutable.HashMap import scala.ref._ import java.util.WeakHashMap |