src/share/classes/java/awt/Window.java

Print this page

        

*** 762,772 **** Dimension newSize = getPreferredSize(); if (peer != null) { setClientSize(newSize.width, newSize.height); } ! if(beforeFirstShow) { isPacked = true; } validate(); } --- 762,772 ---- Dimension newSize = getPreferredSize(); if (peer != null) { setClientSize(newSize.width, newSize.height); } ! if (beforeFirstShow) { isPacked = true; } validate(); }
*** 864,875 **** --- 864,880 ---- } if (height < minSize.height) { height = minSize.height; } } + synchronized (getTreeLock()) { + if (this.width != width || this.height != height) { + isPacked = false; + } super.reshape(x, y, width, height); } + } void setClientSize(int w, int h) { synchronized (getTreeLock()) { setBoundsOp(ComponentPeer.SET_CLIENT_SIZE); setBounds(x, y, w, h);
*** 1012,1022 **** --- 1017,1030 ---- * @see #dispose * @deprecated As of JDK version 1.5, replaced by * {@link #setVisible(boolean)}. */ @Deprecated + @Override public void hide() { + isPacked = false; + synchronized(ownedWindowList) { for (int i = 0; i < ownedWindowList.size(); i++) { Window child = ownedWindowList.elementAt(i).get(); if ((child != null) && child.visible) { child.hide();
*** 3795,3804 **** --- 3803,3816 ---- public Point2D calculateSecurityWarningPosition(Window window, double x, double y, double w, double h) { return window.calculateSecurityWarningPosition(x, y, w, h); } + + public boolean isPacked(Window window) { + return window.isPacked; + } }); // WindowAccessor } // static // a window doesn't need to be updated in the Z-order. @Override