@Override
 public void removeNotify() {
   super.removeNotify();
   if (mouseListener != null) {
     this.removeMouseListener(mouseListener);
     mouseListener = null;
   }
 }
Example #2
0
  /**
   * 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);
  }
Example #3
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;
 }
Example #4
0
 public void removeNotify() {
   super.removeNotify();
   thread.kill();
 }
  public void removeNotify() {
    super.removeNotify();

    uninstallListeners();
    myWindow = null;
  }
Example #6
0
 public void removeNotify() {
   scene.getView().removeComponentListener(this);
   scene.removeSceneListener(this);
   super.removeNotify();
 }
Example #7
0
 /*      */ public void removeNotify() {
   /*  266 */ super.removeNotify();
   /*      */
   /*  268 */ uninstallListeners();
   /*  269 */ this.window = null;
   /*      */ }