# This patch file was generated by NetBeans IDE
# Following Index: paths are relative to: D:\hg\core-copy
# This patch can be applied using context Tools: Patch action on respective folder.
# It uses platform neutral UTF-8 encoding and \n newlines.
# Above lines and this line are ignored by the patching process.
Index: openide.windows/apichanges.xml
--- openide.windows/apichanges.xml Base (BASE)
+++ openide.windows/apichanges.xml Locally Modified (Based On LOCAL)
@@ -50,6 +50,31 @@
Window System API
+
+
+ Support multiple window system layouts.
+
+
+
+
+
+ It is possible to define multiple window system layouts and switch between
+ them either at startup or at runtime.
+
+ The default window system layout is defined in Windows2
folder in XML layer.
+ Additional layouts - roles or perspectives - are defined
+ in Windows2/Roles
folder. Each role has its own sub-folder.
+ The name of that folder is role's unique name. The content of role folder
+ is merged with Windows2 folder when the window system loads. Within a role
+ it is possible to add new TopComponents, add TopComponent groups, docking
+ modes, change the location of docking modes etc. To hide a file which
+ is present in Windows2 folder and which isn't part of a role, add an empty
+ file with the same name into role's sub-folder.
+
+ User settings are stored separately for each role.
+
+
+
Allow custom painted background in the main IDE window.
Index: openide.windows/manifest.mf
--- openide.windows/manifest.mf Base (BASE)
+++ openide.windows/manifest.mf Locally Modified (Based On LOCAL)
@@ -1,6 +1,6 @@
Manifest-Version: 1.0
OpenIDE-Module: org.openide.windows
-OpenIDE-Module-Specification-Version: 6.41
+OpenIDE-Module-Specification-Version: 6.42
OpenIDE-Module-Localizing-Bundle: org/openide/windows/Bundle.properties
AutoUpdate-Essential-Module: true
Index: openide.windows/src/org/openide/windows/WindowManager.java
--- openide.windows/src/org/openide/windows/WindowManager.java Base (BASE)
+++ openide.windows/src/org/openide/windows/WindowManager.java Locally Modified (Based On LOCAL)
@@ -637,6 +637,42 @@
this.activeComponent = new WeakReference(activeComponent);
}
+ /**
+ * Register window system listener to receive notifications when the window
+ * system loads or saves.
+ * @since 6.42
+ */
+ public void addWindowSystemListener( WindowSystemListener listener ) {
+ }
+
+ /**
+ * Remove window system listener.
+ * @since 6.42
+ */
+ public void removeWindowSystemListener( WindowSystemListener listener ) {
+ }
+
+ /**
+ * Switches the window system to a new role (perspective). The window system will
+ * first save the current layout then it will load new window layout from the
+ * given role.
+ * If the window system has been already loaded then the method must be
+ * called from EDT thread, otherwise it's safe to set the initial startup
+ * role in e.g. ModuleInstall.restore method.
+ * @param roleName Name of the new role to switch to or null to switch
+ * to the default window layout.
+ */
+ public void setRole( String roleName ) {
+ }
+
+ /**
+ * @return The name of the current role or null if the default window system
+ * layout is being used.
+ */
+ public String getRole() {
+ return null;
+ }
+
/** A manager that handles operations on top components.
* It is always attached to a {@link TopComponent}.
* @deprecated Do not use anymore. This interface is replaced by bunch of protected methods
Index: openide.windows/src/org/openide/windows/WindowSystemEvent.java
--- openide.windows/src/org/openide/windows/WindowSystemEvent.java Base (BASE)
+++ openide.windows/src/org/openide/windows/WindowSystemEvent.java Locally New
@@ -0,0 +1,59 @@
+/*
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+ *
+ * Copyright 2011 Oracle and/or its affiliates. All rights reserved.
+ *
+ * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
+ * Other names may be trademarks of their respective owners.
+ *
+ * The contents of this file are subject to the terms of either the GNU
+ * General Public License Version 2 only ("GPL") or the Common
+ * Development and Distribution License("CDDL") (collectively, the
+ * "License"). You may not use this file except in compliance with the
+ * License. You can obtain a copy of the License at
+ * http://www.netbeans.org/cddl-gplv2.html
+ * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
+ * specific language governing permissions and limitations under the
+ * License. When distributing the software, include this License Header
+ * Notice in each file and include the License file at
+ * nbbuild/licenses/CDDL-GPL-2-CP. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the GPL Version 2 section of the License file that
+ * accompanied this code. If applicable, add the following below the
+ * License Header, with the fields enclosed by brackets [] replaced by
+ * your own identifying information:
+ * "Portions Copyrighted [year] [name of copyright owner]"
+ *
+ * If you wish your version of this file to be governed by only the CDDL
+ * or only the GPL Version 2, indicate your decision by adding
+ * "[Contributor] elects to include this software in this distribution
+ * under the [CDDL or GPL Version 2] license." If you do not indicate a
+ * single choice of license, a recipient has the option to distribute
+ * your version of this file under either the CDDL, the GPL Version 2 or
+ * to extend the choice of license to its licensees as provided above.
+ * However, if you add GPL Version 2 code and therefore, elected the GPL
+ * Version 2 license, then the option applies only if the new code is
+ * made subject to such option by the copyright holder.
+ *
+ * Contributor(s):
+ *
+ * Portions Copyrighted 2011 Sun Microsystems, Inc.
+ */
+package org.openide.windows;
+
+import java.util.EventObject;
+
+/**
+ * Event object passed to registered listeners when the window system loads/saves.
+ *
+ * @see WindowSystemListener
+ *
+ * @author S. Aubrecht
+ * @since 6.42
+ */
+public final class WindowSystemEvent extends EventObject {
+
+ public WindowSystemEvent( Object source ) {
+ super( source );
+ }
+}
Index: openide.windows/src/org/openide/windows/WindowSystemListener.java
--- openide.windows/src/org/openide/windows/WindowSystemListener.java Base (BASE)
+++ openide.windows/src/org/openide/windows/WindowSystemListener.java Locally New
@@ -0,0 +1,81 @@
+/*
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+ *
+ * Copyright 2011 Oracle and/or its affiliates. All rights reserved.
+ *
+ * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
+ * Other names may be trademarks of their respective owners.
+ *
+ * The contents of this file are subject to the terms of either the GNU
+ * General Public License Version 2 only ("GPL") or the Common
+ * Development and Distribution License("CDDL") (collectively, the
+ * "License"). You may not use this file except in compliance with the
+ * License. You can obtain a copy of the License at
+ * http://www.netbeans.org/cddl-gplv2.html
+ * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
+ * specific language governing permissions and limitations under the
+ * License. When distributing the software, include this License Header
+ * Notice in each file and include the License file at
+ * nbbuild/licenses/CDDL-GPL-2-CP. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the GPL Version 2 section of the License file that
+ * accompanied this code. If applicable, add the following below the
+ * License Header, with the fields enclosed by brackets [] replaced by
+ * your own identifying information:
+ * "Portions Copyrighted [year] [name of copyright owner]"
+ *
+ * If you wish your version of this file to be governed by only the CDDL
+ * or only the GPL Version 2, indicate your decision by adding
+ * "[Contributor] elects to include this software in this distribution
+ * under the [CDDL or GPL Version 2] license." If you do not indicate a
+ * single choice of license, a recipient has the option to distribute
+ * your version of this file under either the CDDL, the GPL Version 2 or
+ * to extend the choice of license to its licensees as provided above.
+ * However, if you add GPL Version 2 code and therefore, elected the GPL
+ * Version 2 license, then the option applies only if the new code is
+ * made subject to such option by the copyright holder.
+ *
+ * Contributor(s):
+ *
+ * Portions Copyrighted 2011 Sun Microsystems, Inc.
+ */
+package org.openide.windows;
+
+import java.util.EventListener;
+
+/**
+ * Window system listener to receive notifications when the window system loads
+ * or saves its state to disk.
+ *
+ * @see WindowManager#addWindowSystemListener(WindowSystemListener)
+ *
+ * @author S. Aubrecht
+ * @since 6.42
+ */
+public interface WindowSystemListener extends EventListener {
+
+ /**
+ * Invoked from EDT before the window system loads.
+ * @param event
+ */
+ void beforeLoad( WindowSystemEvent event );
+
+ /**
+ * Invoked from EDT after the window system finished loading and is about
+ * to show the main window and its content.
+ * @param event
+ */
+ void afterLoad( WindowSystemEvent event );
+
+ /**
+ * Invoked from EDT before the window system starts saving its state to disk.
+ * @param event
+ */
+ void beforeSave( WindowSystemEvent event );
+
+ /**
+ * Invoked from EDT when the window system finished saving its state to disk.
+ * @param event
+ */
+ void afterSave( WindowSystemEvent event );
+}