Search in sources :

Example 1 with ModeStructureSnapshot

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

the class DefaultModel method createWindowSystemSnapshot.

// Controller updates <<
// ///////////////////////
@Override
public WindowSystemSnapshot createWindowSystemSnapshot() {
    WindowSystemSnapshot wsms = new WindowSystemSnapshot();
    // PENDING
    ModeStructureSnapshot mss = createModeStructureSnapshot();
    wsms.setModeStructureSnapshot(mss);
    ModeImpl activeMode = getActiveMode();
    wsms.setActiveModeSnapshot(activeMode == null ? null : mss.findModeSnapshot(activeMode.getName()));
    ModeImpl maximizedMode = null != getViewMaximizedMode() ? getViewMaximizedMode() : null;
    wsms.setMaximizedModeSnapshot(maximizedMode == null ? null : mss.findModeSnapshot(maximizedMode.getName()));
    wsms.setMainWindowBoundsJoined(getMainWindowBoundsJoined());
    wsms.setMainWindowBoundsSeparated(getMainWindowBoundsSeparated());
    wsms.setEditorAreaBounds(getEditorAreaBounds());
    wsms.setEditorAreaState(getEditorAreaState());
    wsms.setEditorAreaFrameState(getEditorAreaFrameState());
    wsms.setMainWindowFrameStateJoined(getMainWindowFrameStateJoined());
    wsms.setMainWindowFrameStateSeparated(getMainWindowFrameStateSeparated());
    wsms.setToolbarConfigurationName(getToolbarConfigName());
    return wsms;
}
Also used : WindowSystemSnapshot(org.netbeans.core.windows.WindowSystemSnapshot) ModeStructureSnapshot(org.netbeans.core.windows.ModeStructureSnapshot) ModeImpl(org.netbeans.core.windows.ModeImpl)

Example 2 with ModeStructureSnapshot

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

the class DefaultModel method createModeStructureSnapshot.

/**
 * Creates modes snapshot..
 */
private ModeStructureSnapshot createModeStructureSnapshot() {
    ModeStructureSnapshot.ElementSnapshot splitRoot;
    Set<ModeStructureSnapshot.ModeSnapshot> separateModes;
    Set<ModeStructureSnapshot.SlidingModeSnapshot> slidingModes;
    synchronized (LOCK_MODES) {
        splitRoot = modesSubModel.createSplitSnapshot();
        separateModes = modesSubModel.createSeparateModeSnapshots();
        slidingModes = modesSubModel.createSlidingModeSnapshots();
    }
    ModeStructureSnapshot ms = new ModeStructureSnapshot(splitRoot, separateModes, slidingModes);
    return ms;
}
Also used : ModeStructureSnapshot(org.netbeans.core.windows.ModeStructureSnapshot)

Aggregations

ModeStructureSnapshot (org.netbeans.core.windows.ModeStructureSnapshot)2 ModeImpl (org.netbeans.core.windows.ModeImpl)1 WindowSystemSnapshot (org.netbeans.core.windows.WindowSystemSnapshot)1