Search in sources :

Example 36 with ModeImpl

use of org.netbeans.core.windows.ModeImpl in project netbeans-rcp-lite by outersky.

the class UndockWindowAction method actionPerformed.

@Override
public void actionPerformed(ActionEvent e) {
    // contextTC shound never be null thanks to isEnabled impl
    WindowManagerImpl wmi = WindowManagerImpl.getInstance();
    TopComponent contextTC = getTC2WorkWith();
    if (null == contextTC)
        return;
    boolean isDocked = wmi.isDocked(contextTC);
    ModeImpl mode = (ModeImpl) wmi.findMode(contextTC);
    if (isDocked) {
        wmi.userUndockedTopComponent(contextTC, mode);
    }
}
Also used : WindowManagerImpl(org.netbeans.core.windows.WindowManagerImpl) ModeImpl(org.netbeans.core.windows.ModeImpl) TopComponent(org.openide.windows.TopComponent)

Example 37 with ModeImpl

use of org.netbeans.core.windows.ModeImpl in project netbeans-rcp-lite by outersky.

the class DefaultView method userActivatedModeView.

// //////////////////////////////////////////////////
// Controller >>
@Override
public void userActivatedModeView(ModeView modeView) {
    if (DEBUG) {
        // NOI18N
        debugLog("User activated mode view, mode=" + modeView);
    }
    ModeAccessor modeAccessor = (ModeAccessor) hierarchy.getAccessorForView(modeView);
    ModeImpl mode = getModeForModeAccessor(modeAccessor);
    controllerHandler.userActivatedMode(mode);
}
Also used : ModeImpl(org.netbeans.core.windows.ModeImpl)

Example 38 with ModeImpl

use of org.netbeans.core.windows.ModeImpl in project netbeans-rcp-lite by outersky.

the class DefaultView method userClosedTopComponent.

@Override
public void userClosedTopComponent(ModeView modeView, TopComponent tc) {
    if (DEBUG) {
        // NOI18N
        debugLog("User closed topComponent=" + tc);
    }
    ModeAccessor modeAccessor = (ModeAccessor) hierarchy.getAccessorForView(modeView);
    ModeImpl mode = getModeForModeAccessor(modeAccessor);
    controllerHandler.userClosedTopComponent(mode, tc);
}
Also used : ModeImpl(org.netbeans.core.windows.ModeImpl)

Example 39 with ModeImpl

use of org.netbeans.core.windows.ModeImpl in project netbeans-rcp-lite by outersky.

the class DefaultView method userClosingMode.

@Override
public void userClosingMode(ModeView modeView) {
    if (DEBUG) {
        // NOI18N
        debugLog("User closing mode=" + modeView);
    }
    ModeAccessor modeAccessor = (ModeAccessor) hierarchy.getAccessorForView(modeView);
    ModeImpl mode = getModeForModeAccessor(modeAccessor);
    controllerHandler.userClosedMode(mode);
}
Also used : ModeImpl(org.netbeans.core.windows.ModeImpl)

Example 40 with ModeImpl

use of org.netbeans.core.windows.ModeImpl in project netbeans-rcp-lite by outersky.

the class DefaultView method userSelectedTab.

@Override
public void userSelectedTab(ModeView modeView, TopComponent selected) {
    if (DEBUG) {
        // NOI18N
        debugLog("User selected tab, tc=" + WindowManagerImpl.getInstance().getTopComponentDisplayName(selected));
    }
    ModeAccessor modeAccessor = (ModeAccessor) hierarchy.getAccessorForView(modeView);
    ModeImpl mode = getModeForModeAccessor(modeAccessor);
    controllerHandler.userActivatedTopComponent(mode, selected);
}
Also used : ModeImpl(org.netbeans.core.windows.ModeImpl)

Aggregations

ModeImpl (org.netbeans.core.windows.ModeImpl)60 TopComponent (org.openide.windows.TopComponent)35 WindowManagerImpl (org.netbeans.core.windows.WindowManagerImpl)22 ArrayList (java.util.ArrayList)5 IOException (java.io.IOException)3 List (java.util.List)3 FileObject (org.openide.filesystems.FileObject)3 Component (java.awt.Component)2 File (java.io.File)2 HashMap (java.util.HashMap)2 HashSet (java.util.HashSet)2 Iterator (java.util.Iterator)2 BackingStoreException (java.util.prefs.BackingStoreException)2 Preferences (java.util.prefs.Preferences)2 WindowSystem (org.netbeans.core.WindowSystem)2 ModeStructureSnapshot (org.netbeans.core.windows.ModeStructureSnapshot)2 TopComponentTracker (org.netbeans.core.windows.TopComponentTracker)2 MultiSplitPane (org.netbeans.core.windows.view.ui.MultiSplitPane)2 TabActionEvent (org.netbeans.swing.tabcontrol.event.TabActionEvent)2 NbPreferences (org.openide.util.NbPreferences)2