// FEATURE: Java 1.4 allows undecorated frames and can maximize windows
/** Platform class for most reasonable Java1.2+ JVMs */
// FEATURE: Java 1.4 allows undecorated frames and can maximize windows
/** Platform class for most reasonable Java1.2+ JVMs */
protected Socket __getSocket(String host, int port, boolean ssl) throws IOException { return super._getSocket(host, port, ssl); }
protected Socket _getSocket(final String host, final int port, final boolean ssl) throws IOException {
protected Socket __getSocket(String host, int port, boolean ssl) throws IOException { return super._getSocket(host, port, ssl); }
protected Socket _getSocket(final String host, final int port, final boolean ssl) throws IOException {
- if (Log.on) Log.log(Java2.class, "Error attempting to create socket");
- if (Log.on) Log.log(Java2.class, e);
+ if (Log.on) Log.log(Java12.class, "Error attempting to create socket");
+ if (Log.on) Log.log(Java12.class, e);
- protected DoubleBuffer _createDoubleBuffer(int w, int h, Surface owner) { return new Java2DoubleBuffer(w, h); }
+ protected DoubleBuffer _createDoubleBuffer(int w, int h, Surface owner) { return new Java12DoubleBuffer(w, h); }
protected Surface _createSurface(final Box root, final boolean framed) {
return (Surface)java.security.AccessController.doPrivileged(new java.security.PrivilegedAction() {
protected Surface _createSurface(final Box root, final boolean framed) {
return (Surface)java.security.AccessController.doPrivileged(new java.security.PrivilegedAction() {
public void blit(DoubleBuffer s, int sx, int sy, int dx, int dy, int dx2, int dy2) {
public void blit(DoubleBuffer s, int sx, int sy, int dx, int dy, int dx2, int dy2) {
- if (ourGraphics == null) ourGraphics = window.getGraphics();
+ 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, width + insets.left, height + insets.top);
+ }
_doDrawImage(ourGraphics, ((AWTDoubleBuffer)s).i, dx + insets.left, dy + insets.top, dx2 + insets.left, dy2 + insets.top,
sx, sy, sx + (dx2 - dx), sy + (dy2 - dy), null);
}
_doDrawImage(ourGraphics, ((AWTDoubleBuffer)s).i, dx + insets.left, dy + insets.top, dx2 + insets.left, dy2 + insets.top,
sx, sy, sx + (dx2 - dx), sy + (dy2 - dy), null);
}
private static ColorModel cm = Toolkit.getDefaultToolkit().getColorModel();
private static Hashtable emptyHashtable = new Hashtable();
private static short[] sbank = null;
private static ColorModel cm = Toolkit.getDefaultToolkit().getColorModel();
private static Hashtable emptyHashtable = new Hashtable();
private static short[] sbank = null;
_doDrawImage(g, ((AWTPicture)source).i, dx1, dy1, dx2, dy2, sx1, sy1, sx2, sy2, null);
}
_doDrawImage(g, ((AWTPicture)source).i, dx1, dy1, dx2, dy2, sx1, sy1, sx2, sy2, null);
}
- buf = new DataBufferUShort(sbank, w * h, bank_start);
- bank_start += w * h;
+ buf = new DataBufferUShort(sbank, numSamples, bank_start);
+ bank_start += numSamples;
- buf = new DataBufferByte(bbank, w * h, bank_start);
- bank_start += w * h;
+ buf = new DataBufferByte(bbank, numSamples, bank_start);
+ bank_start += numSamples;
- buf = new DataBufferInt(ibank, w * h, bank_start);
- bank_start += w * h;
+ buf = new DataBufferInt(ibank, numSamples, bank_start);
+ bank_start += numSamples;
}
}
i = new BufferedImage(cm, Raster.createWritableRaster(sm, buf, null), false, emptyHashtable);
}
}
i = new BufferedImage(cm, Raster.createWritableRaster(sm, buf, null), false, emptyHashtable);
- 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); }
+ protected org.xwt.Weak _getWeak(Object o) { return new Java12Weak(o); }
+ private static class Java12Weak extends java.lang.ref.WeakReference implements org.xwt.Weak {
+ public Java12Weak(Object o) { super(o); }