Example usage for javax.swing JInternalFrame getInternalFrameListeners

List of usage examples for javax.swing JInternalFrame getInternalFrameListeners

Introduction

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

Prototype

@BeanProperty(bound = false)
public InternalFrameListener[] getInternalFrameListeners() 

Source Link

Document

Returns an array of all the InternalFrameListeners added to this JInternalFrame with addInternalFrameListener.

Usage

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

@Override
public void internalFrameClosed(InternalFrameEvent e) {
    decrementOpenDocuments();// ww w . ja  va2s . c  o  m

    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();
}