/** * Uninstalls the necessary state. */ public void uninstall() { this.uninstallListeners(); this.window = null; HeapStatusThread.unregisterPanel(this.heapStatusPanel); // Swing bug (?) - the updateComponentTree never gets to the // system menu (and in our case we have radio menu items with // rollover listeners). Fix for defect 109 - memory leak on skin // switch if ((this.menuBar != null) && (this.menuBar.getMenuCount() > 0)) { this.menuBar.getUI().uninstallUI(this.menuBar); SubstanceCoreUtilities.uninstallMenu(this.menuBar.getMenu(0)); } if (this.heapStatusPanel != null) { for (MouseListener listener : this.heapStatusPanel .getMouseListeners()) this.heapStatusPanel.removeMouseListener(listener); HeapStatusThread.unregisterPanel(this.heapStatusPanel); this.remove(this.heapStatusPanel); } if (this.menuBar != null) this.menuBar.removeAll(); this.removeAll(); }
this.restoreAction.setEnabled(false); if (this.toggleButton.getParent() != null) { this.remove(this.toggleButton); this.revalidate(); this.repaint(); this.restoreAction.setEnabled(false); this.iconifyAction.setEnabled(false); this.remove(this.toggleButton); this.remove(this.minimizeButton); this.revalidate(); this.repaint();
/** * Uninstalls the necessary state. */ public void uninstall() { this.uninstallListeners(); this.window = null; HeapStatusThread.unregisterPanel(this.heapStatusPanel); // Swing bug (?) - the updateComponentTree never gets to the // system menu (and in our case we have radio menu items with // rollover listeners). Fix for defect 109 - memory leak on skin // switch if ((this.menuBar != null) && (this.menuBar.getMenuCount() > 0)) { this.menuBar.getUI().uninstallUI(this.menuBar); SubstanceCoreUtilities.uninstallMenu(this.menuBar.getMenu(0)); } if (this.heapStatusPanel != null) { for (MouseListener listener : this.heapStatusPanel .getMouseListeners()) this.heapStatusPanel.removeMouseListener(listener); HeapStatusThread.unregisterPanel(this.heapStatusPanel); this.remove(this.heapStatusPanel); } if (this.menuBar != null) this.menuBar.removeAll(); this.removeAll(); }
this.restoreAction.setEnabled(false); if (this.toggleButton.getParent() != null) { this.remove(this.toggleButton); this.revalidate(); this.repaint(); this.restoreAction.setEnabled(false); this.iconifyAction.setEnabled(false); this.remove(this.toggleButton); this.remove(this.minimizeButton); this.revalidate(); this.repaint();