X-Git-Url: http://git.megacz.com/?p=org.ibex.core.git;a=blobdiff_plain;f=src%2Forg%2Fibex%2Fplat%2FJava2.java;h=5129f6427d58873262455d4828a04fd912670e94;hp=7a1909bb1650dec74ce47e5c5b506ceac404bfec;hb=76b21655a0710caf4f972c107a3ab991032d7e10;hpb=82817d828b14b3ff025b0b1e0bbbd3ea9c35c5f1 diff --git a/src/org/ibex/plat/Java2.java b/src/org/ibex/plat/Java2.java index 7a1909b..5129f64 100644 --- a/src/org/ibex/plat/Java2.java +++ b/src/org/ibex/plat/Java2.java @@ -1,4 +1,7 @@ -// Copyright 2004 Adam Megacz, see the COPYING file for licensing [GPL] +// Copyright 2000-2005 the Contributors, as shown in the revision logs. +// Licensed under the GNU General Public License version 2 ("the License"). +// You may not use this file except in compliance with the License. + package org.ibex.plat; import java.awt.*; @@ -7,9 +10,10 @@ import java.awt.image.*; import java.net.*; import java.util.*; import org.ibex.util.*; -import org.ibex.*; import java.lang.reflect.*; - +import org.ibex.graphics.*; +import org.ibex.core.*; +import org.ibex.net.*; /** Platform class for most reasonable Java1.2+ Java2s */ public class Java2 extends AWT { @@ -41,11 +45,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.ibex.HTTP.Proxy _detectProxy() { - return (org.ibex.HTTP.Proxy)java.security.AccessController.doPrivileged(new java.security.PrivilegedAction() { + protected synchronized org.ibex.net.HTTP.Proxy _detectProxy() { + return (org.ibex.net.HTTP.Proxy)java.security.AccessController.doPrivileged(new java.security.PrivilegedAction() { public Object run() { try { - org.ibex.HTTP.Proxy pi = new org.ibex.HTTP.Proxy(); + org.ibex.net.HTTP.Proxy pi = new org.ibex.net.HTTP.Proxy(); Class PluginProxyHandler = Class.forName("sun.plugin.protocol.PluginProxyHandler"); Method getDefaultProxyHandler = PluginProxyHandler.getMethod("getDefaultProxyHandler", new Class[] { }); @@ -176,14 +180,14 @@ public class Java2 extends AWT { private DataBuffer buf = null; // this doens't seem to work on Windows - public void drawGlyph(org.ibex.Font.Glyph source, int dx, int dy, int cx1, int cy1, int cx2, int cy2, int rgb) { + public void drawGlyph(org.ibex.graphics.Font.Glyph source, int dx, int dy, int cx1, int cy1, int cx2, int cy2, int rgb) { Image i2 = ((AWTGlyph)source).getImage(); Graphics2D g2 = (Graphics2D)i.getGraphics(); g2.setComposite(AlphaComposite.DstOut); g2.setClip(cx1, cy1, cx2 - cx1, cy2 - cy1); g2.drawImage(i2, dx, dy, null); g2.setComposite(AlphaComposite.DstOver); - g2.setColor(new Color((rgb & 0x00FF0000) >> 16, (rgb & 0x0000FF00) >> 8, (rgb & 0x000000FF))); + g2.setColor(new java.awt.Color((rgb & 0x00FF0000) >> 16, (rgb & 0x0000FF00) >> 8, (rgb & 0x000000FF))); g2.fillRect(dx, dy, cx2 - dx, cy2 - dy); g2.drawImage(i2, 0, 0, null); g2.setClip(0, 0, i.getWidth(null), i.getHeight(null));