summaryrefslogtreecommitdiff
path: root/src/swing
diff options
context:
space:
mode:
authorAdriaan Moors <adriaan.moors@typesafe.com>2013-02-12 17:44:58 -0800
committerAdriaan Moors <adriaan.moors@typesafe.com>2013-02-12 17:47:25 -0800
commitdad8796bd08e6264870eeeb85d79149e77421121 (patch)
tree8259643156d9efe0f29c7b20b3de3bf1e0e8889e /src/swing
parentb4f277a847a9c29d3e0f7a90509c9e6a7c9fde17 (diff)
downloadscala-dad8796bd08e6264870eeeb85d79149e77421121.tar.gz
scala-dad8796bd08e6264870eeeb85d79149e77421121.tar.bz2
scala-dad8796bd08e6264870eeeb85d79149e77421121.zip
[nomaster] Revert "Added a Swing ColorChooser wrapper"
This reverts commit 08ab007c5c97f153902c4ac58f87e30fbf7cf99f. This is necessary to maintain binary compatibility with 2.10.0.
Diffstat (limited to 'src/swing')
-rw-r--r--src/swing/scala/swing/ColorChooser.scala45
-rw-r--r--src/swing/scala/swing/event/ColorChanged.scala14
2 files changed, 0 insertions, 59 deletions
diff --git a/src/swing/scala/swing/ColorChooser.scala b/src/swing/scala/swing/ColorChooser.scala
deleted file mode 100644
index 9bd71e1df0..0000000000
--- a/src/swing/scala/swing/ColorChooser.scala
+++ /dev/null
@@ -1,45 +0,0 @@
-/* __ *\
-** ________ ___ / / ___ Scala API **
-** / __/ __// _ | / / / _ | (c) 2007-2012, LAMP/EPFL **
-** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ **
-** /____/\___/_/ |_/____/_/ | | **
-** |/ **
-\* */
-
-
-
-package scala.swing
-
-import javax.swing.JColorChooser
-import event._
-
-/**
- * Wrapper for JColorChooser. Publishes `ColorChanged` events, when the color selection changes.
- *
- * @author andy@hicks.net
- * @author Ingo Maier
- * @see javax.swing.JColorChooser
- */
-object ColorChooser {
- def showDialog(parent: Component, title: String, color: Color): scala.Option[Color] = {
- toOption[Color](javax.swing.JColorChooser.showDialog(parent.peer, title, color))
- }
-}
-
-class ColorChooser(color0: Color) extends Component {
- def this() = this(java.awt.Color.white)
-
- override lazy val peer: JColorChooser = new JColorChooser(color0) with SuperMixin
-
- peer.getSelectionModel.addChangeListener(new javax.swing.event.ChangeListener {
- def stateChanged(e: javax.swing.event.ChangeEvent) {
- publish(ColorChanged(ColorChooser.this, peer.getColor))
- }
- })
-
- def color: Color = peer.getColor
- def color_=(c: Color) = peer.setColor(c)
-
- def dragEnabled: Boolean = peer.getDragEnabled
- def dragEnabled_=(b: Boolean) = peer.setDragEnabled(b)
-} \ No newline at end of file
diff --git a/src/swing/scala/swing/event/ColorChanged.scala b/src/swing/scala/swing/event/ColorChanged.scala
deleted file mode 100644
index 44387aa864..0000000000
--- a/src/swing/scala/swing/event/ColorChanged.scala
+++ /dev/null
@@ -1,14 +0,0 @@
-/* __ *\
-** ________ ___ / / ___ Scala API **
-** / __/ __// _ | / / / _ | (c) 2007-2011, LAMP/EPFL **
-** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ **
-** /____/\___/_/ |_/____/_/ | | **
-** |/ **
-\* */
-
-
-
-package scala.swing
-package event
-
-case class ColorChanged(source: Component, c: Color) extends ComponentEvent with SelectionEvent