Java Code Examples for javax.swing.event.InternalFrameEvent#getInternalFrame()

The following examples show how to use javax.swing.event.InternalFrameEvent#getInternalFrame() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: WorkspaceTopComponent.java    From snap-desktop with GNU General Public License v3.0 5 votes vote down vote up
@Override
public void internalFrameClosed(InternalFrameEvent e) {
    //LOG.fine("internalFrameClosed: e = " + e);

    JInternalFrame internalFrame = e.getInternalFrame();
    if (frameToTabMap.containsKey(internalFrame)) {
        closeInternalFrame(internalFrame);
    }
    tabbedContainer.updateUI();

    notifyClosed(getTopComponent(internalFrame));
}
 
Example 2
Source File: WorkspaceTopComponent.java    From snap-desktop with GNU General Public License v3.0 5 votes vote down vote up
@Override
public void internalFrameActivated(InternalFrameEvent e) {
    //LOG.fine("internalFrameActivated: e = " + e);

    // Synchronise tab selection state, if not already done
    JInternalFrame internalFrame = e.getInternalFrame();
    TabData selectedTab = frameToTabMap.get(internalFrame);
    int selectedTabIndex = tabbedContainer.getSelectionModel().getSelectedIndex();
    List<TabData> tabs = tabbedContainer.getModel().getTabs();
    for (int i = 0; i < tabs.size(); i++) {
        TabData tab = tabs.get(i);
        if (tab == selectedTab && selectedTabIndex != i) {
            tabbedContainer.getSelectionModel().setSelectedIndex(i);
            break;
        }
    }

    tabbedContainer.updateUI();

    TopComponent topComponent = getTopComponent(internalFrame);

    // Publish lookup contents of selected frame to parent window
    lookup.setLookup(topComponent.getLookup());
    // Publish activated nodes, if any
    setActivatedNodes(topComponent.getActivatedNodes());

    // May not really be required
    if (WorkspaceTopComponent.this != WindowManager.getDefault().getRegistry().getActivated()) {
        WorkspaceTopComponent.this.requestActive();
    }

    notifyActivated(topComponent);
}
 
Example 3
Source File: BrowserDesktopManager.java    From ApkToolPlus with Apache License 2.0 4 votes vote down vote up
public void internalFrameActivated(InternalFrameEvent event) {
    BrowserInternalFrame internalFrame = (BrowserInternalFrame)event.getInternalFrame();
    actionStatus(internalFrame);
    internalFrame.getBrowserComponent().checkSelection();
}
 
Example 4
Source File: BasicDesktopManager.java    From ApkToolPlus with Apache License 2.0 4 votes vote down vote up
public void internalFrameClosing(InternalFrameEvent event) {
    JInternalFrame frame = event.getInternalFrame();
    removeInternalFrame(frame);
}