Please use the Apache issue tracking system for new NetBeans issues (https://issues.apache.org/jira/projects/NETBEANS0/issues) !!
View | Details | Raw Unified | Return to bug 198859 | Differences between
and this patch

Collapse All | Expand All

(-)openide.windows/apichanges.xml (+25 lines)
 Lines 50-55    Link Here 
50
<apidef name="winsys">Window System API</apidef>
50
<apidef name="winsys">Window System API</apidef>
51
</apidefs>
51
</apidefs>
52
<changes>
52
<changes>
53
<change id="roles">
54
    <api name="winsys"/>
55
    <summary>Support multiple window system layouts.</summary>
56
    <version major="6" minor="42"/>
57
    <date day="24" month="5" year="2011"/>
58
    <author login="saubrecht"/>
59
    <compatibility addition="yes" binary="compatible" source="compatible" semantic="compatible" deprecation="no" deletion="no" modification="no"/>
60
    <description>
61
        It is possible to define multiple window system layouts and switch between
62
        them either at startup or at runtime.
63
        <br/>
64
        The default window system layout is defined in <pre>Windows2</pre> folder in XML layer.
65
        Additional layouts - <i>roles</i> or <i>perspectives</i> - are defined
66
        in <pre>Windows2/Roles</pre> folder. Each role has its own sub-folder.
67
        The name of that folder is role's unique name. The content of role folder
68
        is merged with Windows2 folder when the window system loads. Within a role
69
        it is possible to add new TopComponents, add TopComponent groups, docking
70
        modes, change the location of docking modes etc. To hide a file which
71
        is present in Windows2 folder and which isn't part of a role, add an empty
72
        file with the same name into role's sub-folder.
73
        <br/>
74
        User settings are stored separately for each role.
75
    </description>
76
    <issue number="198856"/>
77
</change>
53
<change id="mainwindow.custom.background">
78
<change id="mainwindow.custom.background">
54
    <api name="winsys"/>
79
    <api name="winsys"/>
55
    <summary>Allow custom painted background in the main IDE window.</summary>
80
    <summary>Allow custom painted background in the main IDE window.</summary>
(-)openide.windows/manifest.mf (-1 / +1 lines)
 Lines 1-6    Link Here 
1
Manifest-Version: 1.0
1
Manifest-Version: 1.0
2
OpenIDE-Module: org.openide.windows
2
OpenIDE-Module: org.openide.windows
3
OpenIDE-Module-Specification-Version: 6.41
3
OpenIDE-Module-Specification-Version: 6.42
4
OpenIDE-Module-Localizing-Bundle: org/openide/windows/Bundle.properties
4
OpenIDE-Module-Localizing-Bundle: org/openide/windows/Bundle.properties
5
AutoUpdate-Essential-Module: true
5
AutoUpdate-Essential-Module: true
6
6
(-)openide.windows/src/org/openide/windows/WindowManager.java (+36 lines)
 Lines 637-642    Link Here 
637
        this.activeComponent = new WeakReference<TopComponent>(activeComponent);
637
        this.activeComponent = new WeakReference<TopComponent>(activeComponent);
638
    }
638
    }
639
    
639
    
640
    /**
641
     * Register window system listener to receive notifications when the window
642
     * system loads or saves.
643
     * @since 6.42
644
     */
645
    public void addWindowSystemListener( WindowSystemListener listener ) {
646
    }
647
    
648
    /**
649
     * Remove window system listener.
650
     * @since 6.42
651
     */
652
    public void removeWindowSystemListener( WindowSystemListener listener ) {
653
    }
654
    
655
    /**
656
     * Switches the window system to a new role (perspective). The window system will
657
     * first save the current layout then it will load new window layout from the 
658
     * given role.
659
     * If the window system has been already loaded then the method must be
660
     * called from EDT thread, otherwise it's safe to set the initial startup
661
     * role in e.g. ModuleInstall.restore method.
662
     * @param roleName Name of the new role to switch to or null to switch
663
     * to the default window layout.
664
     */
665
    public void setRole( String roleName ) {
666
    }
667
    
668
    /**
669
     * @return The name of the current role or null if the default window system
670
     * layout is being used.
671
     */
672
    public String getRole() {
673
        return null;
674
    }
675
    
640
    /** A manager that handles operations on top components.
676
    /** A manager that handles operations on top components.
641
     * It is always attached to a {@link TopComponent}.
677
     * It is always attached to a {@link TopComponent}.
642
     * @deprecated Do not use anymore. This interface is replaced by bunch of protected methods
678
     * @deprecated Do not use anymore. This interface is replaced by bunch of protected methods
(-)openide.windows/src/org/openide/windows/WindowSystemEvent.java (+59 lines)
Line 0    Link Here 
1
/*
2
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
3
 *
4
 * Copyright 2011 Oracle and/or its affiliates. All rights reserved.
5
 *
6
 * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
7
 * Other names may be trademarks of their respective owners.
8
 *
9
 * The contents of this file are subject to the terms of either the GNU
10
 * General Public License Version 2 only ("GPL") or the Common
11
 * Development and Distribution License("CDDL") (collectively, the
12
 * "License"). You may not use this file except in compliance with the
13
 * License. You can obtain a copy of the License at
14
 * http://www.netbeans.org/cddl-gplv2.html
15
 * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
16
 * specific language governing permissions and limitations under the
17
 * License.  When distributing the software, include this License Header
18
 * Notice in each file and include the License file at
19
 * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
20
 * particular file as subject to the "Classpath" exception as provided
21
 * by Oracle in the GPL Version 2 section of the License file that
22
 * accompanied this code. If applicable, add the following below the
23
 * License Header, with the fields enclosed by brackets [] replaced by
24
 * your own identifying information:
25
 * "Portions Copyrighted [year] [name of copyright owner]"
26
 *
27
 * If you wish your version of this file to be governed by only the CDDL
28
 * or only the GPL Version 2, indicate your decision by adding
29
 * "[Contributor] elects to include this software in this distribution
30
 * under the [CDDL or GPL Version 2] license." If you do not indicate a
31
 * single choice of license, a recipient has the option to distribute
32
 * your version of this file under either the CDDL, the GPL Version 2 or
33
 * to extend the choice of license to its licensees as provided above.
34
 * However, if you add GPL Version 2 code and therefore, elected the GPL
35
 * Version 2 license, then the option applies only if the new code is
36
 * made subject to such option by the copyright holder.
37
 *
38
 * Contributor(s):
39
 *
40
 * Portions Copyrighted 2011 Sun Microsystems, Inc.
41
 */
42
package org.openide.windows;
43
44
import java.util.EventObject;
45
46
/**
47
 * Event object passed to registered listeners when the window system loads/saves.
48
 * 
49
 * @see WindowSystemListener
50
 * 
51
 * @author S. Aubrecht
52
 * @since 6.42
53
 */
54
public final class WindowSystemEvent extends EventObject {
55
    
56
    public WindowSystemEvent( Object source ) {
57
        super( source );
58
    }
59
}
(-)openide.windows/src/org/openide/windows/WindowSystemListener.java (+81 lines)
Line 0    Link Here 
1
/*
2
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
3
 *
4
 * Copyright 2011 Oracle and/or its affiliates. All rights reserved.
5
 *
6
 * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
7
 * Other names may be trademarks of their respective owners.
8
 *
9
 * The contents of this file are subject to the terms of either the GNU
10
 * General Public License Version 2 only ("GPL") or the Common
11
 * Development and Distribution License("CDDL") (collectively, the
12
 * "License"). You may not use this file except in compliance with the
13
 * License. You can obtain a copy of the License at
14
 * http://www.netbeans.org/cddl-gplv2.html
15
 * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
16
 * specific language governing permissions and limitations under the
17
 * License.  When distributing the software, include this License Header
18
 * Notice in each file and include the License file at
19
 * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
20
 * particular file as subject to the "Classpath" exception as provided
21
 * by Oracle in the GPL Version 2 section of the License file that
22
 * accompanied this code. If applicable, add the following below the
23
 * License Header, with the fields enclosed by brackets [] replaced by
24
 * your own identifying information:
25
 * "Portions Copyrighted [year] [name of copyright owner]"
26
 *
27
 * If you wish your version of this file to be governed by only the CDDL
28
 * or only the GPL Version 2, indicate your decision by adding
29
 * "[Contributor] elects to include this software in this distribution
30
 * under the [CDDL or GPL Version 2] license." If you do not indicate a
31
 * single choice of license, a recipient has the option to distribute
32
 * your version of this file under either the CDDL, the GPL Version 2 or
33
 * to extend the choice of license to its licensees as provided above.
34
 * However, if you add GPL Version 2 code and therefore, elected the GPL
35
 * Version 2 license, then the option applies only if the new code is
36
 * made subject to such option by the copyright holder.
37
 *
38
 * Contributor(s):
39
 *
40
 * Portions Copyrighted 2011 Sun Microsystems, Inc.
41
 */
42
package org.openide.windows;
43
44
import java.util.EventListener;
45
46
/**
47
 * Window system listener to receive notifications when the window system loads
48
 * or saves its state to disk.
49
 * 
50
 * @see WindowManager#addWindowSystemListener(WindowSystemListener)
51
 * 
52
 * @author S. Aubrecht
53
 * @since 6.42
54
 */
55
public interface WindowSystemListener extends EventListener {
56
    
57
    /**
58
     * Invoked from EDT before the window system loads.
59
     * @param event 
60
     */
61
    void beforeLoad( WindowSystemEvent event );
62
    
63
    /**
64
     * Invoked from EDT after the window system finished loading and is about
65
     * to show the main window and its content.
66
     * @param event 
67
     */
68
    void afterLoad( WindowSystemEvent event );
69
    
70
    /**
71
     * Invoked from EDT before the window system starts saving its state to disk.
72
     * @param event 
73
     */
74
    void beforeSave( WindowSystemEvent event );
75
    
76
    /**
77
     * Invoked from EDT when the window system finished saving its state to disk.
78
     * @param event 
79
     */
80
    void afterSave( WindowSystemEvent event );
81
}

Return to bug 198859
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo