Stream->Fountain, move Scheduler to Platform, HashMap->Hash
[org.ibex.core.git] / src / org / ibex / graphics / Font.java
index 8b80439..99c9bdc 100644 (file)
@@ -7,7 +7,6 @@ import org.ibex.util.*;
 import java.io.*;
 import java.util.Hashtable;
 import org.ibex.js.*;
-import org.ibex.core.*;
 import org.ibex.nestedvm.*;
 import org.ibex.plat.*;
 import org.ibex.nestedvm.Runtime;
@@ -50,12 +49,12 @@ public class Font {
     static final Hashtable glyphsToBeCached = new Hashtable();
     static final Hashtable glyphsToBeDisplayed = new Hashtable();
     // HACK: replace with Cache<JS, int>
-    private static Basket.Map fonts = new Basket.HashMap();
+    private static Basket.Map fonts = new Basket.Hash();
     public static Font getFont(JS stream, int pointsize) {
         Basket.Map m = (Basket.Map)fonts.get(stream);
         Font ret = null;
         if (m != null) ret = (Font)m.get(new Integer(pointsize));
-        else fonts.put(stream, m = new Basket.HashMap());
+        else fonts.put(stream, m = new Basket.Hash());
         if (ret == null) m.put(new Integer(pointsize), ret = new Font(stream, pointsize));
         return ret;
     }
@@ -77,7 +76,7 @@ public class Font {
             for(int i=32; i<47; i++) if (glyphs[i]==null) glyphsToBeCached.put(glyphs[i]=Platform.createGlyph(this, (char)i),"");
             for(int i=57; i<128; i++) if (glyphs[i]==null) glyphsToBeCached.put(glyphs[i]=Platform.createGlyph(this, (char)i),"");
             if (!glyphRenderingTaskIsScheduled) {
-                Scheduler.add(glyphRenderingTask);
+                Platform.Scheduler.add(glyphRenderingTask);
                 glyphRenderingTaskIsScheduled = true;
             }
             latinCharsPreloaded = true;
@@ -131,7 +130,7 @@ public class Font {
         g.render();
         Log.debug(Glyph.class, "   done rendering glyph " + g.c);
         glyphRenderingTaskIsScheduled = true;
-        Scheduler.add(this);
+        Platform.Scheduler.add(this);
         return null;
     } };