Search in sources :

Example 6 with ModeConfig

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

the class ConfigFactory method createDefaultExplorerModeConfig.

private static ModeConfig createDefaultExplorerModeConfig() {
    ModeConfig mc = new ModeConfig();
    // NOI18N
    mc.name = "explorer";
    mc.bounds = null;
    mc.relativeBounds = null;
    mc.frameState = -1;
    mc.state = Constants.MODE_STATE_JOINED;
    mc.kind = Constants.MODE_KIND_VIEW;
    mc.constraints = createDefaultExplorerConstraints();
    // NOI18N
    mc.selectedTopComponentID = "runtime";
    mc.permanent = true;
    mc.tcRefConfigs = createDefaultExplorerTCRefConfigs();
    return mc;
}
Also used : ModeConfig(org.netbeans.core.windows.persistence.ModeConfig)

Example 7 with ModeConfig

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

the class ConfigFactory method createDefaultFormModeConfig.

private static ModeConfig createDefaultFormModeConfig() {
    ModeConfig mc = new ModeConfig();
    mc.name = "Form";
    mc.bounds = null;
    mc.relativeBounds = null;
    mc.frameState = -1;
    mc.state = Constants.MODE_STATE_JOINED;
    mc.kind = Constants.MODE_KIND_VIEW;
    mc.constraints = createDefaultFormConstraints();
    // NOI18N
    mc.selectedTopComponentID = "ComponentInspector";
    mc.permanent = true;
    mc.tcRefConfigs = createDefaultFormTCRefConfigs();
    return mc;
}
Also used : ModeConfig(org.netbeans.core.windows.persistence.ModeConfig)

Example 8 with ModeConfig

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

the class WindowManagerImpl method updateModeConstraintsFromXml.

@Override
public boolean updateModeConstraintsFromXml(String xml) {
    try {
        ModeConfig modeConfig = PersistenceManager.getDefault().createModeFromXml(xml);
        ModeImpl mode = findModeImpl(modeConfig.name);
        mode.setConstraints(modeConfig.constraints);
        return true;
    } catch (IOException ex) {
        Exceptions.printStackTrace(ex);
        return false;
    }
}
Also used : ModeConfig(org.netbeans.core.windows.persistence.ModeConfig) IOException(java.io.IOException)

Aggregations

ModeConfig (org.netbeans.core.windows.persistence.ModeConfig)8 IOException (java.io.IOException)3 File (java.io.File)1 ArrayList (java.util.ArrayList)1 HashMap (java.util.HashMap)1 BackingStoreException (java.util.prefs.BackingStoreException)1 Preferences (java.util.prefs.Preferences)1 ModeImpl (org.netbeans.core.windows.ModeImpl)1 WindowManagerImpl (org.netbeans.core.windows.WindowManagerImpl)1 InstanceCookie (org.openide.cookies.InstanceCookie)1 FileObject (org.openide.filesystems.FileObject)1 DataLoader (org.openide.loaders.DataLoader)1 DataObject (org.openide.loaders.DataObject)1 InstanceDataObject (org.openide.loaders.InstanceDataObject)1 NbPreferences (org.openide.util.NbPreferences)1 TopComponent (org.openide.windows.TopComponent)1