< prev index next >

src/java.desktop/share/classes/java/awt/Component.java

Print this page




7135                 if (visible) {
7136                     p.setVisible(false);
7137                 }
7138 
7139                 peer = null; // Stop peer updates.
7140                 peerFont = null;
7141 
7142                 Toolkit.getEventQueue().removeSourceEvents(this, false);
7143                 KeyboardFocusManager.getCurrentKeyboardFocusManager().
7144                     discardKeyEvents(this);
7145 
7146                 p.dispose();
7147 
7148                 mixOnHiding(isLightweight);
7149 
7150                 isAddNotifyComplete = false;
7151                 // Nullifying compoundShape means that the component has normal shape
7152                 // (or has no shape at all).
7153                 this.compoundShape = null;
7154             }
7155 



7156             if (hierarchyListener != null ||
7157                 (eventMask & AWTEvent.HIERARCHY_EVENT_MASK) != 0 ||
7158                 Toolkit.enabledOnToolkit(AWTEvent.HIERARCHY_EVENT_MASK)) {
7159                 HierarchyEvent e =
7160                     new HierarchyEvent(this, HierarchyEvent.HIERARCHY_CHANGED,
7161                                        this, parent,
7162                                        HierarchyEvent.DISPLAYABILITY_CHANGED |
7163                                        ((isRecursivelyVisible())
7164                                         ? HierarchyEvent.SHOWING_CHANGED
7165                                         : 0));
7166                 dispatchEvent(e);
7167             }
7168         }
7169     }
7170 
7171     /**
7172      * @param  evt the event to handle
7173      * @param  what the object focused
7174      * @return  {@code false}
7175      * @deprecated As of JDK version 1.1,




7135                 if (visible) {
7136                     p.setVisible(false);
7137                 }
7138 
7139                 peer = null; // Stop peer updates.
7140                 peerFont = null;
7141 
7142                 Toolkit.getEventQueue().removeSourceEvents(this, false);
7143                 KeyboardFocusManager.getCurrentKeyboardFocusManager().
7144                     discardKeyEvents(this);
7145 
7146                 p.dispose();
7147 
7148                 mixOnHiding(isLightweight);
7149 
7150                 isAddNotifyComplete = false;
7151                 // Nullifying compoundShape means that the component has normal shape
7152                 // (or has no shape at all).
7153                 this.compoundShape = null;
7154             }
7155             AccessibleContext ac = getAccessibleContext();
7156             if (ac != null) {
7157                 AWTAccessor.getAccessibleContextAccessor().dispose(ac);
7158             }
7159             if (hierarchyListener != null ||
7160                 (eventMask & AWTEvent.HIERARCHY_EVENT_MASK) != 0 ||
7161                 Toolkit.enabledOnToolkit(AWTEvent.HIERARCHY_EVENT_MASK)) {
7162                 HierarchyEvent e =
7163                     new HierarchyEvent(this, HierarchyEvent.HIERARCHY_CHANGED,
7164                                        this, parent,
7165                                        HierarchyEvent.DISPLAYABILITY_CHANGED |
7166                                        ((isRecursivelyVisible())
7167                                         ? HierarchyEvent.SHOWING_CHANGED
7168                                         : 0));
7169                 dispatchEvent(e);
7170             }
7171         }
7172     }
7173 
7174     /**
7175      * @param  evt the event to handle
7176      * @param  what the object focused
7177      * @return  {@code false}
7178      * @deprecated As of JDK version 1.1,


< prev index next >