2003/09/21 10:26:54
[org.ibex.core.git] / src / org / xwt / plat / Java2.java
index f855961..fac1213 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright 2002 Adam Megacz, see the COPYING file for licensing [GPL]
+// Copyright 2003 Adam Megacz, see the COPYING file for licensing [GPL]
 package org.xwt.plat;
 
 import java.awt.*;
@@ -49,11 +49,11 @@ public class Java2 extends AWT {
     }
 
     /** this is done with reflection in case a new version of the plugin comes out that doesn't let us pull the sun.plugin.* trick */
-    protected synchronized org.xwt.Proxy _detectProxy() {
-        return (org.xwt.Proxy)java.security.AccessController.doPrivileged(new java.security.PrivilegedAction() {
+    protected synchronized org.xwt.HTTP.Proxy _detectProxy() {
+        return (org.xwt.HTTP.Proxy)java.security.AccessController.doPrivileged(new java.security.PrivilegedAction() {
                 public Object run() {
                     try {
-                        org.xwt.Proxy pi = new org.xwt.Proxy();
+                        org.xwt.HTTP.Proxy pi = new org.xwt.HTTP.Proxy();
                         
                         Class PluginProxyHandler = Class.forName("sun.plugin.protocol.PluginProxyHandler");
                         Method getDefaultProxyHandler = PluginProxyHandler.getMethod("getDefaultProxyHandler", new Class[] { });
@@ -106,7 +106,7 @@ public class Java2 extends AWT {
             });
     }
     
-    protected DoubleBuffer _createDoubleBuffer(int w, int h, Surface owner) { return new Java2DoubleBuffer(w, h); }
+    protected PixelBuffer _createPixelBuffer(int w, int h, Surface owner) { return new Java2PixelBuffer(w, h); }
     protected Surface _createSurface(final Box root, final boolean framed) {
         return (Surface)java.security.AccessController.doPrivileged(new java.security.PrivilegedAction() {
                 public Object run() {
@@ -137,14 +137,14 @@ public class Java2 extends AWT {
         
         public Java2Surface(Box root, boolean framed) { super(root, framed); }
 
-        public void blit(DoubleBuffer s, int sx, int sy, int dx, int dy, int dx2, int dy2) {
+        public void blit(PixelBuffer s, int sx, int sy, int dx, int dy, int dx2, int dy2) {
             if (ourGraphics == null) {
                 ourGraphics = window.getGraphics();
                 
                 // sometimes jdk1.4 doesn't set the clip properly when we're in the middle of a resize
                 ourGraphics.setClip(insets.left, insets.top, root.width + insets.left, root.height + insets.top);
             }
-            _doDrawImage(window.getGraphics(), ((AWTDoubleBuffer)s).i, dx + insets.left, dy + insets.top, dx2 + insets.left, dy2 + insets.top,
+            _doDrawImage(window.getGraphics(), ((AWTPixelBuffer)s).i, dx + insets.left, dy + insets.top, dx2 + insets.left, dy2 + insets.top,
                          sx, sy, sx + (dx2 - dx), sy + (dy2 - dy), null);
         }
 
@@ -197,7 +197,7 @@ public class Java2 extends AWT {
         }
     }
 
-    protected static class Java2DoubleBuffer extends AWTDoubleBuffer {
+    protected static class Java2PixelBuffer extends AWTPixelBuffer {
         private static ColorModel cm = Toolkit.getDefaultToolkit().getColorModel();
         private static Hashtable emptyHashtable = new Hashtable();
         private static short[] sbank = null;
@@ -209,7 +209,7 @@ public class Java2 extends AWT {
             _doDrawImage(g, ((AWTPicture)source).i, dx1, dy1, dx2, dy2, sx1, sy1, sx2, sy2, null);
         }
         
-        public Java2DoubleBuffer(int w, int h) {
+        public Java2PixelBuffer(int w, int h) {
             SampleModel sm = cm.createCompatibleSampleModel(w, h);
             int numSamples = w * h * sm.getNumDataElements();
             DataBuffer buf = null;
@@ -260,11 +260,6 @@ public class Java2 extends AWT {
         g.drawImage(i, dx1, dy1, dx2, dy2, sx1, sy1, sx2, sy2, o);
     }
 
-    protected org.xwt.Weak _getWeak(Object o) { return new Java2Weak(o); }
-    private static class Java2Weak extends java.lang.ref.WeakReference implements org.xwt.Weak {
-        public Java2Weak(Object o) { super(o); }
-    }
-
     private String __getClipBoard() { return super._getClipBoard(); }
     protected String _getClipBoard() {
         return (String)java.security.AccessController.doPrivileged(new java.security.PrivilegedAction() {