+
+ 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();
+
+ // ugly hack for Java1.4 dynamicLayout on Win32 -- this catches expansions during smooth resize
+ int newwidth = Math.max(r.x - insets.left + r.width, root.width);
+ int newheight = Math.max(r.y - insets.top + r.height, root.height);
+ if (newwidth > root.width || newheight > root.height)
+ componentResized(window.getWidth() - insets.left - insets.right,
+ window.getHeight() - insets.top - insets.bottom);
+
+ Dirty(r.x - insets.left, r.y - insets.top, r.width, r.height);
+ }
+ }
+
+ 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();
+ Dirty(r.x - insets.left, r.y - insets.top, r.width, r.height);
+ }
+ }
+
+ 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 ?
+ Color.white :
+ new Color((root.fillcolor >> 16) & 0xff,
+ (root.fillcolor >> 8) & 0xff,
+ (root.fillcolor) & 0xff));
+ super.render();
+ }
+