X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;ds=sidebyside;f=src%2Forg%2Fxwt%2Fplat%2FAWT.java;h=6e013528ff0752dede0397e9456c0f24e4cad7b8;hb=c6069948906645d974f46bdb96617a9a6a504636;hp=b9e58c3e53156e966730536b2cee231205baa03a;hpb=b5fa5227a80e97611a8433a275c18a6f695bf32b;p=org.ibex.core.git diff --git a/src/org/xwt/plat/AWT.java b/src/org/xwt/plat/AWT.java index b9e58c3..6e01352 100644 --- a/src/org/xwt/plat/AWT.java +++ b/src/org/xwt/plat/AWT.java @@ -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 org.xwt.*; @@ -12,10 +12,10 @@ import java.awt.image.*; import java.awt.event.*; /** Platform subclass for all VM's providing AWT 1.1 functionality */ -public class AWT extends Platform { +public class AWT extends JVM { protected String getDescriptiveName() { return "Generic JDK 1.1+ with AWT"; } - protected DoubleBuffer _createDoubleBuffer(int w, int h, Surface owner) { return new AWTDoubleBuffer(w, h); } + protected PixelBuffer _createDoubleBuffer(int w, int h, Surface owner) { return new AWTDoubleBuffer(w, h); } protected Picture _createPicture(int[] b, int w, int h) { return new AWTPicture(b, w, h); } protected int _getScreenWidth() { return Toolkit.getDefaultToolkit().getScreenSize().width; } protected int _getScreenHeight() { return Toolkit.getDefaultToolkit().getScreenSize().height; } @@ -137,7 +137,7 @@ public class AWT extends Platform { } } - protected static class AWTDoubleBuffer extends DoubleBuffer { + protected static class AWTPixelBuffer extends DoubleBuffer { protected Image i = null; protected Graphics g = null; @@ -145,9 +145,9 @@ public class AWT extends Platform { /** JDK1.1 platforms require that a component be associated with each off-screen buffer */ static Component component = null; - protected AWTDoubleBuffer() { } - public AWTDoubleBuffer(int w, int h) { - synchronized(AWTDoubleBuffer.class) { + protected AWTPixelBuffer() { } + public AWTPixelBuffer(int w, int h) { + synchronized(AWTPixelBuffer.class) { if (component == null) { component = new Frame(); component.setVisible(false); @@ -189,9 +189,9 @@ public class AWT extends Platform { protected static class AWTSurface extends Surface implements MouseListener, MouseMotionListener, KeyListener, ComponentListener, WindowListener { - 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(); - ourGraphics.drawImage(((AWTDoubleBuffer)s).i, dx + insets.left, dy + insets.top, dx2 + insets.left, dy2 + insets.top, + ourGraphics.drawImage(((AWTPixelBuffer)s).i, dx + insets.left, dy + insets.top, dx2 + insets.left, dy2 + insets.top, sx, sy, sx + (dx2 - dx), sy + (dy2 - dy), null); }