@Override public void removeNotify() { super.removeNotify(); if (mouseListener != null) { this.removeMouseListener(mouseListener); mouseListener = null; } }
/** * Calling {@link GLCanvas#removeNotify()} destroys the GLContext. We could mess with that * internally, but this is slightly easier. * * <p>This method is particularly important for docking frameworks and moving the panel from one * window to another. This is simple for normal Swing components, but GL contexts are destroyed * when {@code removeNotify()} is called. * * <p>Our workaround is to use context sharing. The pbuffer is initialized and by drawing into it * at least once, we automatically share all textures, etc. with the new pbuffer. This pbuffer * holds the data until we can initialize our new JOGL canvas. We share the pbuffer canvas with * the new JOGL canvas and everything works nicely from then on. * * <p>This has the unfortunate side-effect of leaking memory. I'm not sure how to fix this yet. */ @Override public void removeNotify() { prepareSideContext(); remove((Component) canvas); super.removeNotify(); canvas = createGLComponent(chosenCapabilities, sideContext.getContext()); canvas.addGLEventListener(g2dglListener); add((Component) canvas, 0); }
/** * Called by the AWT when this component is removed from it's parent. This stops clears the * currently focused component. */ public void removeNotify() { super.removeNotify(); if (focusedComponent == this) focusedComponent = null; }
public void removeNotify() { super.removeNotify(); thread.kill(); }
public void removeNotify() { super.removeNotify(); uninstallListeners(); myWindow = null; }
public void removeNotify() { scene.getView().removeComponentListener(this); scene.removeSceneListener(this); super.removeNotify(); }
/* */ public void removeNotify() { /* 266 */ super.removeNotify(); /* */ /* 268 */ uninstallListeners(); /* 269 */ this.window = null; /* */ }