import org.xwt.util.*;
import java.net.*;
import java.io.*;
+import org.xwt.js.*;
import java.util.*;
import java.awt.*;
import java.awt.datatransfer.*;
protected String getDescriptiveName() { return "Generic JDK 1.1+ with AWT"; }
protected PixelBuffer _createPixelBuffer(int w, int h, Surface owner) { return new AWTPixelBuffer(w, h); }
- protected Picture _createPicture(Stream r) { return new AWTPicture(r); }
+ protected Picture _createPicture(JS r) { return new AWTPicture(r); }
protected int _getScreenWidth() { return Toolkit.getDefaultToolkit().getScreenSize().width; }
protected int _getScreenHeight() { return Toolkit.getDefaultToolkit().getScreenSize().height; }
protected Surface _createSurface(Box b, boolean framed) { return new AWTSurface(b, framed); }
private static ColorModel cmodel = new DirectColorModel(32, 0x00FF0000, 0x0000FF00, 0x000000FF, 0xFF000000);
boolean initialized = false;
- public AWTPicture(Stream r) { super(r); }
+ public AWTPicture(JS r) { super(r); }
public void init() {
if (initialized) return;
initialized = true;
class InnerFrame extends Frame {
public InnerFrame() throws java.lang.UnsupportedOperationException { }
+ public Dimension getMinimumSize() {
+ return new Dimension(root == null ? 0 : root.minwidth, root == null ? 0 : root.minheight); }
public void update(Graphics gr) { paint(gr); }
public void paint(Graphics gr) {
Rectangle r = gr.getClipBounds();
class InnerWindow extends Window {
public InnerWindow() throws java.lang.UnsupportedOperationException { super(new Frame()); }
+ public Dimension getMinimumSize() {
+ return new Dimension(root == null ? 0 : root.minwidth, root == null ? 0 : root.minheight); }
public void update(Graphics gr) { paint(gr); }
public void paint(Graphics gr) {
Rectangle r = gr.getClipBounds();
}
}
+ public void setMinimumSize(int minx, int miny, boolean resizable) { if (frame != null) frame.setResizable(resizable); }
+
public void render() {
// useful optimizatin;
window.setBackground((root.fillcolor & 0xFF000000) == 0 ?