private void clear() { // Fix - remove the existing tabbedPane, otherwise when // we bring the Tweeker back up we will have 2 tabbed panes // which sit on top of one another one with the old GC slider panel in // and the new one with both panels in. This lead to some interesting // drawing effects if (tabbedPane != null) { getContentPane().remove(tabbedPane); } tabbedPane = null; // I hope it won't be a big memory leak not to null this out, but it's a problem // when user kills the tweeker window with the X and then tries to reinvoke it // using the Analysis window. // rootPane = null; if (resEnzSel != null) resEnzSel.clear(); resEnzSel = null; Tweeker.this.hide(); Tweeker.this.dispose(); controller.removeListener(this); }
/** Sets the Controller for the object - ControlledObjectI interface */ public void setController(Controller controller) { this.controller = controller; controller.addListener(this); }