Example usage for javax.swing JInternalFrame removeInternalFrameListener

List of usage examples for javax.swing JInternalFrame removeInternalFrameListener

Introduction

In this page you can find the example usage for javax.swing JInternalFrame removeInternalFrameListener.

Prototype

public void removeInternalFrameListener(InternalFrameListener l) 

Source Link

Document

Removes the specified internal frame listener so that it no longer receives internal frame events from this internal frame.

Usage

From source file:com.g2inc.scap.editor.gui.windows.EditorMainWindow.java

@Override
public void internalFrameClosed(InternalFrameEvent e) {
    decrementOpenDocuments();/*  w w  w.j a  v  a 2 s.c om*/

    JInternalFrame internalFrame = (JInternalFrame) e.getInternalFrame();

    /* if (internalFrame instanceof WizardModeWindow) {
    setWizMode(false);
     }
    */
    InternalFrameListener[] frameListeners = internalFrame.getInternalFrameListeners();

    if (frameListeners != null) {
        for (int x = 0; x < frameListeners.length; x++) {
            internalFrame.removeInternalFrameListener(frameListeners[x]);
        }

        frameListeners = null;
    }

    decrementOpenDocuments();

    desktopPane.remove(internalFrame);

    if (internalFrame instanceof OvalEditorForm) {
        ((OvalEditorForm) internalFrame).cleanUp();
    } else if (internalFrame instanceof CPEDictionaryEditorForm) {
        ((CPEDictionaryEditorForm) internalFrame).cleanUp();
    }

    internalFrame.dispose();
    //       navPanel.clearButtons();
}