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

Print this page




1079      * @see #show
1080      * @see #dispose
1081      * @deprecated As of JDK version 1.5, replaced by
1082      * {@link #setVisible(boolean)}.
1083      */
1084     @Deprecated
1085     public void hide() {
1086         synchronized(ownedWindowList) {
1087             for (int i = 0; i < ownedWindowList.size(); i++) {
1088                 Window child = ownedWindowList.elementAt(i).get();
1089                 if ((child != null) && child.visible) {
1090                     child.hide();
1091                     child.showWithParent = true;
1092                 }
1093             }
1094         }
1095         if (isModalBlocked()) {
1096             modalBlocker.unblockWindow(this);
1097         }
1098         super.hide();

1099     }
1100 
1101     final void clearMostRecentFocusOwnerOnHide() {
1102         /* do nothing */
1103     }
1104 
1105     /**
1106      * Releases all of the native screen resources used by this
1107      * {@code Window}, its subcomponents, and all of its owned
1108      * children. That is, the resources for these {@code Component}s
1109      * will be destroyed, any memory they consume will be returned to the
1110      * OS, and they will be marked as undisplayable.
1111      * <p>
1112      * The {@code Window} and its subcomponents can be made displayable
1113      * again by rebuilding the native resources with a subsequent call to
1114      * {@code pack} or {@code show}. The states of the recreated
1115      * {@code Window} and its subcomponents will be identical to the
1116      * states of these objects at the point where the {@code Window}
1117      * was disposed (not accounting for additional modifications between
1118      * those actions).




1079      * @see #show
1080      * @see #dispose
1081      * @deprecated As of JDK version 1.5, replaced by
1082      * {@link #setVisible(boolean)}.
1083      */
1084     @Deprecated
1085     public void hide() {
1086         synchronized(ownedWindowList) {
1087             for (int i = 0; i < ownedWindowList.size(); i++) {
1088                 Window child = ownedWindowList.elementAt(i).get();
1089                 if ((child != null) && child.visible) {
1090                     child.hide();
1091                     child.showWithParent = true;
1092                 }
1093             }
1094         }
1095         if (isModalBlocked()) {
1096             modalBlocker.unblockWindow(this);
1097         }
1098         super.hide();
1099         locationByPlatform = false;
1100     }
1101 
1102     final void clearMostRecentFocusOwnerOnHide() {
1103         /* do nothing */
1104     }
1105 
1106     /**
1107      * Releases all of the native screen resources used by this
1108      * {@code Window}, its subcomponents, and all of its owned
1109      * children. That is, the resources for these {@code Component}s
1110      * will be destroyed, any memory they consume will be returned to the
1111      * OS, and they will be marked as undisplayable.
1112      * <p>
1113      * The {@code Window} and its subcomponents can be made displayable
1114      * again by rebuilding the native resources with a subsequent call to
1115      * {@code pack} or {@code show}. The states of the recreated
1116      * {@code Window} and its subcomponents will be identical to the
1117      * states of these objects at the point where the {@code Window}
1118      * was disposed (not accounting for additional modifications between
1119      * those actions).