/** * Overridden in order to process {@link PanelEvent}s. * * @deprecated See {@link PanelEvent}. */ @Override @Deprecated protected void processEvent(final AWTEvent event) { if (event instanceof PanelEvent) { //assert false : "This is dead code since the refactoring for TrueZIP 6.4!"; processPanelEvent((PanelEvent) event); } else { super.processEvent(event); } }
@Override public void hierarchyChanged(final HierarchyEvent e) { if ((e.getChangeFlags() & HierarchyEvent.SHOWING_CHANGED) != HierarchyEvent.SHOWING_CHANGED) return; final Window window = getAncestorWindow(); assert null != window : "A showing panel must have a containing window!"; final boolean windowShown = window.isShowing(); if (windowShown != isShowing()) return; processPanelEvent(new PanelEvent(EnhancedPanel.this, windowShown ? PanelEvent.ANCESTOR_WINDOW_SHOWN : PanelEvent.ANCESTOR_WINDOW_HIDDEN)); } } // class EnhancedPanelHierarchyListener