X-Git-Url: http://git.megacz.com/?p=org.ibex.core.git;a=blobdiff_plain;f=src%2Forg%2Fibex%2Fplat%2FAWT.java;h=050f9e7ea5a15f657abb1c7bf8dd79bbfc764a5a;hp=e84f497368c16e98095e273d5e9eb99ec6692d7f;hb=0db1ff365b2acfa1be6420aca33a27dd01eb78f2;hpb=faa4ae356d464a80e08540d5eb8bbee6296c1dbc diff --git a/src/org/ibex/plat/AWT.java b/src/org/ibex/plat/AWT.java index e84f497..050f9e7 100644 --- a/src/org/ibex/plat/AWT.java +++ b/src/org/ibex/plat/AWT.java @@ -205,7 +205,10 @@ public class AWT extends JVM { g.fillPolygon(xpoints, ypoints, 3); } - public void drawPicture(Picture p, Affine a, Mesh h) { throw new Error("drawPicture() not implemented"); } + public void drawPicture(Picture p, Affine a, Mesh h) { + throw new Error("drawPicture() not implemented"); + } + protected Image i = null; protected Graphics g = null; protected AWTSurface surface = null; @@ -247,8 +250,8 @@ public class AWT extends JVM { g.drawLine(x1, y1, x2, y2); } - public void stroke(org.ibex.graphics.Mesh p, int color) { /*p.stroke(this, color);*/ } - public void fill(org.ibex.graphics.Mesh p, org.ibex.graphics.Paint paint) { /*p.fill(this, paint);*/ } + //public void stroke(org.ibex.graphics.Mesh p, int color) { /*p.stroke(this, color);*/ } + //public void fill(org.ibex.graphics.Mesh p, org.ibex.graphics.Paint paint) { /*p.fill(this, paint);*/ } private static int[] xa = new int[4]; private static int[] ya = new int[4]; @@ -268,7 +271,7 @@ public class AWT extends JVM { } // this doens't seem to work on Windows - public void drawGlyph(org.ibex.graphics.Font.Glyph source,Affine a,Mesh h,int rgb,int bg) { + public void drawGlyph(org.ibex.graphics.Font.Glyph source, Affine a, Mesh h, int argb, int bg) { //throw new Error("drawGlyph() not implemented"); /* Image i = ((AWTGlyph)source).getImage(); @@ -293,7 +296,7 @@ public class AWT extends JVM { } - protected static class AWTSurface extends Surface + protected static class AWTSurface extends Surface // extends Surface.DoubleBufferedSurface implements MouseListener, MouseMotionListener, KeyListener, ComponentListener, WindowListener { protected AWTPixelBuffer pb = null; @@ -356,13 +359,13 @@ public class AWT extends JVM { Dirty(r.x - insets.left, r.y - insets.top, r.width, r.height); } else { Dirty(0, 0, - Math.max(getWidth() - insets.left - insets.right, root.width), - Math.min(getHeight() - insets.top - insets.bottom, root.height)); + Math.max(getWidth() - insets.left - insets.right, root.getRootWidth()), + Math.min(getHeight() - insets.top - insets.bottom, root.getRootHeight())); } // ugly hack for Java1.4 dynamicLayout on Win32 -- this catches expansions during smooth resize - int newwidth = Math.max(getWidth() - insets.left - insets.right, root.width); - int newheight = Math.max(getHeight() - insets.top - insets.bottom, root.height); - if (newwidth != root.width || newheight != root.height) componentResized(newwidth, newheight); + int newwidth = Math.max(getWidth() - insets.left - insets.right, root.getRootWidth()); + int newheight = Math.max(getHeight() - insets.top - insets.bottom, root.getRootHeight()); + if (newwidth != root.getRootWidth() || newheight != root.getRootHeight()) componentResized(newwidth, newheight); } } @@ -470,7 +473,7 @@ public class AWT extends JVM { public void windowClosed(WindowEvent e) { } public void windowClosing(WindowEvent e) { Close(); } public void windowIconified(WindowEvent e) { Minimized(true); } - public void windowDeiconified(WindowEvent e) { dirty(0, 0, root.width, root.height); Minimized(false); } + public void windowDeiconified(WindowEvent e) { dirty(0, 0, root.getRootWidth(), root.getRootHeight()); Minimized(false); } public void windowActivated(WindowEvent e) { Focused(true); } public void windowDeactivated(WindowEvent e) { Focused(false); } public void componentMoved(ComponentEvent e) { PosChange(window.getLocation().x + insets.left, window.getLocation().y + insets.top); } @@ -483,8 +486,8 @@ public class AWT extends JVM { public void componentResized(int newwidth, int newheight) { SizeChange(newwidth, newheight); - if (newwidth > root.width) Dirty(root.width, 0, newwidth-root.width, newheight); - if (newheight > root.height) Dirty(0, root.height, newwidth, newheight-root.height); + if (newwidth > root.getRootWidth()) Dirty(root.getRootWidth(), 0, newwidth-root.getRootWidth(), newheight); + if (newheight > root.getRootHeight()) Dirty(0, root.getRootHeight(), newwidth, newheight-root.getRootHeight()); Refresh(); } @@ -499,7 +502,7 @@ public class AWT extends JVM { // ugly hack for Java1.4 dynamicLayout on Win32 -- this catches contractions during smooth resize int newwidth = window.getWidth() - insets.left - insets.right; int newheight = window.getHeight() - insets.top - insets.bottom; - if (newwidth != root.width || newheight != root.height) componentResized(newwidth, newheight); + if (newwidth != root.getRootWidth() || newheight != root.getRootHeight()) componentResized(newwidth, newheight); Move(m.getX() - insets.left, m.getY() - insets.top); }