public void setIcon(Picture i) { if (frame != null) frame.setIconImage(((AWTPicture)i).i); }
public void _setSize(int width, int height) {
g = null;
- //window.setSize(width + (insets.left + insets.right), height + (insets.top + insets.bottom));
+ window.setSize(width + (insets.left + insets.right), height + (insets.top + insets.bottom));
}
public void setInvisible(boolean b) { window.setVisible(!b); }
protected void _setMinimized(boolean b) { if (Log.on) Log.info(this, "JDK 1.1 platforms cannot minimize or unminimize windows"); }
super.render();
}
+ Insets getInsets() {
+ Insets ret = window.getInsets();
+ if (System.getProperty("os.name", "").equals("Mac OS X")) ret.bottom = -1 * ret.top;
+ return ret;
+ }
+
AWTSurface(Box root, boolean framed) {
super(root);
try {
if (Log.on) Log.info(this, e);
}
- insets = window.getInsets();
+ insets = getInsets();
window.addMouseListener(this);
window.addKeyListener(this);
public void componentResized(ComponentEvent e) {
// we have to periodically do this; I don't know why
- insets = window.getInsets();
+ insets = getInsets();
componentResized(window.getWidth() - insets.left - insets.right, window.getHeight() - insets.top - insets.bottom);
}
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.width) Dirty(root.width, 0, newwidth-root.width, newheight);
+ if (newheight > root.height) Dirty(0, root.height, newwidth, newheight-root.height);
Refresh();
}