コード例 #1
0
 @Override
 public void removeNotify() {
   super.removeNotify();
   if (mouseListener != null) {
     this.removeMouseListener(mouseListener);
     mouseListener = null;
   }
 }
コード例 #2
0
ファイル: GLG2DCanvas.java プロジェクト: plasmoske/glg2d
  /**
   * 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);
  }
コード例 #3
0
ファイル: JEditTextArea.java プロジェクト: zeph/grinder
 /**
  * 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;
 }
コード例 #4
0
 public void removeNotify() {
   super.removeNotify();
   thread.kill();
 }
コード例 #5
0
  public void removeNotify() {
    super.removeNotify();

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