summaryrefslogtreecommitdiff
path: root/src/swing
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2010-07-01 20:33:11 +0000
committerPaul Phillips <paulp@improving.org>2010-07-01 20:33:11 +0000
commitc2a3d50262a3e411f67297c5db5ad7e596b4c4f6 (patch)
treeef0ed771cabd3db5ddf1cdc3c685ec0618b19cb4 /src/swing
parenta0bacadc80bdf6adc8e0a31d64362082ffb3b142 (diff)
downloadscala-c2a3d50262a3e411f67297c5db5ad7e596b4c4f6.tar.gz
scala-c2a3d50262a3e411f67297c5db5ad7e596b4c4f6.tar.bz2
scala-c2a3d50262a3e411f67297c5db5ad7e596b4c4f6.zip
Renaming files and inserting dummies to please ...
Renaming files and inserting dummies to please ant. Note to committers: whenever there is a source file which does not generate a classfile whose name and path exactly match the name and path of the source file, then ant will recompile the file every time it compiles anything. In this batch there were 7 such files, so any 1-char change meant an 8-file recompile. Someday we'll be rid of ant, but until then... no review.
Diffstat (limited to 'src/swing')
-rw-r--r--src/swing/scala/swing/Font.scala.disabled (renamed from src/swing/scala/swing/Font.scala)30
1 files changed, 15 insertions, 15 deletions
diff --git a/src/swing/scala/swing/Font.scala b/src/swing/scala/swing/Font.scala.disabled
index a58c8967d7..6eebd667bd 100644
--- a/src/swing/scala/swing/Font.scala
+++ b/src/swing/scala/swing/Font.scala.disabled
@@ -1,36 +1,36 @@
package scala.swing
-/*object Font {
- def apply(fontFormat: Int, fontFile: java.io.File) = java.awt.Font.createFont(fontFormat, fontFile)
- def apply(fontFormat: Int, fontStream: java.io.InputStream) = java.awt.Font.createFont(fontFormat, fontStream)
+/*object Font {
+ def apply(fontFormat: Int, fontFile: java.io.File) = java.awt.Font.createFont(fontFormat, fontFile)
+ def apply(fontFormat: Int, fontStream: java.io.InputStream) = java.awt.Font.createFont(fontFormat, fontStream)
def decode(str: String) = java.awt.Font.decode(str)
-
+
/* TODO: finish implementation
/**
* See [java.awt.Font.getFont].
*/
- def get(attributes: Map[_ <: java.text.AttributedCharacterIterator.Attribute, _]) =
+ def get(attributes: Map[_ <: java.text.AttributedCharacterIterator.Attribute, _]) =
java.awt.Font.getFont(ImmutableMapWrapper(attributes))
-
+
import java.{util => ju}
private case class ImmutableMapWrapper[A, B](underlying : Map[A, B])(m : ClassManifest[A]) extends ju.AbstractMap[A, B] {
self =>
override def size = underlying.size
- override def put(k : A, v : B) =
+ override def put(k : A, v : B) =
throw new UnsupportedOperationException("This is a wrapper that does not support mutation")
- override def remove(k : AnyRef) =
+ override def remove(k : AnyRef) =
throw new UnsupportedOperationException("This is a wrapper that does not support mutation")
-
+
override def entrySet : ju.Set[ju.Map.Entry[A, B]] = new ju.AbstractSet[ju.Map.Entry[A, B]] {
def size = self.size
def iterator = new ju.Iterator[ju.Map.Entry[A, B]] {
val ui = underlying.iterator
var prev : Option[A] = None
-
+
def hasNext = ui.hasNext
-
+
def next = {
val (k, v) = ui.next
prev = Some(k)
@@ -44,7 +44,7 @@ package scala.swing
}
}
}
-
+
def remove = prev match {
case Some(k) => val v = self.remove(k.asInstanceOf[AnyRef]) ; prev = None ; v
case _ => throw new IllegalStateException("next must be called at least once before remove")
@@ -53,7 +53,7 @@ package scala.swing
}
}
*/
-
+
/**
* See [java.awt.Font.getFont].
*/
@@ -62,9 +62,9 @@ package scala.swing
* See [java.awt.Font.getFont].
*/
def get(nm: String, font: Font) = java.awt.Font.getFont(nm, font)
-
+
def Insets(x: Int, y: Int, width: Int, height: Int) = new Insets(x, y, width, height)
def Rectangle(x: Int, y: Int, width: Int, height: Int) = new Insets(x, y, width, height)
def Point(x: Int, y: Int) = new Point(x, y)
- def Dimension(x: Int, y: Int) = new Dimension(x, y)
+ def Dimension(x: Int, y: Int) = new Dimension(x, y)
}*/ \ No newline at end of file