X-Git-Url: http://git.megacz.com/?p=org.ibex.core.git;a=blobdiff_plain;f=src%2Forg%2Fxwt%2Fplat%2FAWT.java;h=6e013528ff0752dede0397e9456c0f24e4cad7b8;hp=760c47487f5c5aee0e9bbbc6092ccb9299667960;hb=c6069948906645d974f46bdb96617a9a6a504636;hpb=cf3587e2fd5966b7ebfd721d9413674224d1ad2a diff --git a/src/org/xwt/plat/AWT.java b/src/org/xwt/plat/AWT.java index 760c474..6e01352 100644 --- a/src/org/xwt/plat/AWT.java +++ b/src/org/xwt/plat/AWT.java @@ -15,7 +15,7 @@ import java.awt.event.*; 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 JVM { } } - 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 JVM { /** 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 JVM { 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); }