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

(-)core.windows/src/org/netbeans/core/windows/resources/mode-properties2_4.dtd (+216 lines)
Added Link Here 
1
<!--
2
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
3
4
Copyright 1997-2010 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
10
The contents of this file are subject to the terms of either the GNU
11
General Public License Version 2 only ("GPL") or the Common
12
Development and Distribution License("CDDL") (collectively, the
13
"License"). You may not use this file except in compliance with the
14
License. You can obtain a copy of the License at
15
http://www.netbeans.org/cddl-gplv2.html
16
or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
17
specific language governing permissions and limitations under the
18
License.  When distributing the software, include this License Header
19
Notice in each file and include the License file at
20
nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
21
particular file as subject to the "Classpath" exception as provided
22
by Oracle in the GPL Version 2 section of the License file that
23
accompanied this code. If applicable, add the following below the
24
License Header, with the fields enclosed by brackets [] replaced by
25
your own identifying information:
26
"Portions Copyrighted [year] [name of copyright owner]"
27
28
Contributor(s):
29
30
The Original Software is NetBeans. The Initial Developer of the Original
31
Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
32
Microsystems, Inc. All Rights Reserved.
33
34
If you wish your version of this file to be governed by only the CDDL
35
or only the GPL Version 2, indicate your decision by adding
36
"[Contributor] elects to include this software in this distribution
37
under the [CDDL or GPL Version 2] license." If you do not indicate a
38
single choice of license, a recipient has the option to distribute
39
your version of this file under either the CDDL, the GPL Version 2 or
40
to extend the choice of license to its licensees as provided above.
41
However, if you add GPL Version 2 code and therefore, elected the GPL
42
Version 2 license, then the option applies only if the new code is
43
made subject to such option by the copyright holder.
44
-->
45
46
<!--
47
-//NetBeans//DTD Mode Properties 2.4//EN
48
-->
49
50
<!-- The root element for mode properties. Consists of name, optional
51
     module information and several property sets for various types of
52
     user interface.
53
     Attribute "version" is versioning attribute which in fact specifies
54
     version of this DTD. Attribute is used to perform simple versioning
55
     without the need to use time-consuming xml validation using this DTD.
56
-->
57
<!ELEMENT mode (module?, name, kind, state, constraints?, (bounds | relative-bounds)?, frame?, active-tc?, empty-behavior?, slidingSide?, slide-in-size*) >
58
<!ATTLIST mode
59
    version CDATA #REQUIRED
60
>
61
62
<!-- Optional element for module information. Attribute name specifies name of
63
    module which defines this xml description. Module information is used for
64
    automatic removal of mode defined by module if module is disabled.
65
    If you want your module's mode to be removed automatically when
66
    your module is disabled, fill this element. When this element is missing,
67
    no automatic removal will be done.
68
 1) "name" code name of the module, can be either base code name or full code
69
    name with slash and release number. Examples for core module are: 
70
    "org.netbeans.core" or "org.netbeans.core/1"
71
 2) "spec" is specification version of the module which defines this xml description.
72
-->
73
<!ELEMENT module EMPTY >
74
<!ATTLIST module
75
    name CDATA #REQUIRED
76
    spec CDATA #IMPLIED
77
>
78
79
<!-- Element name
80
    "unique" represents unique ID of mode
81
    "includes" contains a list of names of other modes that were merged into this one.
82
-->
83
<!ELEMENT name      EMPTY >
84
<!ATTLIST name
85
    unique CDATA #REQUIRED
86
    includes CDATA #IMPLIED
87
>
88
89
<!-- Element kind
90
    "type" kind of mode "editor" or "view" or "sliding".
91
-->
92
<!ELEMENT kind      EMPTY >
93
<!ATTLIST kind
94
    type (editor | view | sliding) #REQUIRED
95
>
96
97
<!-- Element sliding side
98
    "side" direction of slide
99
-->
100
<!ELEMENT slidingSide      EMPTY >
101
<!ATTLIST slidingSide
102
    side (left | right | bottom | top) #REQUIRED
103
>
104
105
106
<!-- Element slide-in size
107
    "tc-id" TopComponent's ID
108
    "size" the size of the TopComponent (width or height) when it is slided-in
109
-->
110
<!ELEMENT slide-in-size      EMPTY >
111
<!ATTLIST slide-in-size
112
    tc-id CDATA #REQUIRED
113
    size CDATA #REQUIRED
114
>
115
116
<!-- Element state
117
    "type" state of mode "joined" (is inside of main window) or "separated" 
118
    (is in its own native window separated from main window).
119
    "minimized" state "true" means that any window opened in this mode is
120
    automatically minimized (slided out).
121
-->
122
<!ELEMENT state      EMPTY >
123
<!ATTLIST state
124
    type (joined | separated) #REQUIRED
125
    minimized (true | false) #IMPLIED
126
>
127
128
<!-- Absolute bounds rectangle of the mode, stored in attributes
129
     x, y, width, height, where x, y is location of left top point of bounds 
130
     rectangle.
131
     Relevant only for separate mode (window).
132
-->
133
<!ELEMENT bounds    EMPTY >
134
<!ATTLIST bounds
135
    x CDATA #REQUIRED
136
    y CDATA #REQUIRED
137
    width CDATA #REQUIRED
138
    height CDATA #REQUIRED
139
>
140
141
<!-- Relative (percentage) bounds rectangle of the mode, stored in attributes
142
     x, y, width, height, where x, y is location of left top point of bounds
143
     rectangle, it is relative to width of main window and height of area below
144
     main window.
145
     Relevant only for separate mode (window).
146
-->
147
<!ELEMENT relative-bounds    EMPTY >
148
<!ATTLIST relative-bounds
149
    x CDATA #REQUIRED
150
    y CDATA #REQUIRED
151
    width CDATA #REQUIRED
152
    height CDATA #REQUIRED
153
>
154
155
<!-- Frame properties.
156
    Relevant only for separate mode (window).
157
    Attribute "state" represents current state of frame.
158
    It is represented as bitwise mask - integer value.
159
    See java.awt.Frame for possible values.
160
    Default value is Frame.NORMAL (0).
161
-->
162
<!ELEMENT frame    EMPTY >
163
<!ATTLIST frame
164
    state CDATA #IMPLIED
165
>
166
167
<!-- Constraints describes path of mode in model tree.
168
     Path consists of array of values to describe path eg. [H1;V2].
169
     Relevant only for mode inside desktop
170
-->
171
<!ELEMENT constraints  (path*) >
172
<!ATTLIST constraints
173
>
174
175
<!-- Path describe path to mode in model tree.
176
     "orientation" sets orientation of splitter. "horizontal" means splitting
177
     along x axis - components are from left to right. "vertical" means splitting
178
     along y axis - components are from top to bottom.
179
     "number" sets number of cell in given split cell. It is integer number. Number defines
180
     position of given cell in array of cells. It is possible to define for example
181
     20 for first cell and 40 for second cell. Later it is possible to insert third cell between
182
     first and second by using 30 for third cell. It is usefull for platform to allow third party
183
     modules to modify (insert) their own modes to existing layout.
184
     Cells are counted from left to right in case of vertical split and
185
     from top to bottom in case of horizontal split.
186
     "weight" is double number from 0 to 1. It sets relative size of cell
187
     in given splitter. Default value is 0.5.
188
-->
189
<!ELEMENT path   EMPTY >
190
<!ATTLIST path
191
    orientation (horizontal | vertical) #REQUIRED
192
    number CDATA #REQUIRED
193
    weight CDATA #IMPLIED
194
>
195
196
<!-- Active TopComponent.
197
     "id" stores unique ID of active TopComponent
198
-->
199
<!ELEMENT active-tc  EMPTY >
200
<!ATTLIST active-tc
201
    id CDATA #IMPLIED
202
    prev-id CDATA #IMPLIED
203
>
204
205
<!-- Element "empty-behavior" describes behavior of mode when it is empty ie. does not contain
206
     any opened TopComponent.
207
     Attribute "permanent" can be "true" of "false". "true" means that mode remains in window
208
     system when it is empty ie. it does not contain any opened TopComponent. "false" means that
209
     mode is completely destroyed when it is empty. 
210
     Optional attribute, default value is "true".
211
     When mode is defined in module layer it is usually permanent ie. "true" is used.
212
-->
213
<!ELEMENT empty-behavior   EMPTY >
214
<!ATTLIST empty-behavior
215
    permanent (true | false) #IMPLIED
216
>
(-)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 (+15 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
    
640
    /** A manager that handles operations on top components.
655
    /** A manager that handles operations on top components.
641
     * It is always attached to a {@link TopComponent}.
656
     * It is always attached to a {@link TopComponent}.
642
     * @deprecated Do not use anymore. This interface is replaced by bunch of protected methods
657
     * @deprecated Do not use anymore. This interface is replaced by bunch of protected methods
(-)openide.windows/src/org/openide/windows/WindowSystemConfiguration.java (+79 lines)
Added 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
 * Configuration of window system. Use this class to change the window system behavior.
48
 * The configuration must be adjusted before window system loads.
49
 * 
50
 * @see WindowSystemListener#beforeLoad(org.openide.windows.WindowSystemConfiguration) 
51
 * 
52
 * @author S. Aubrecht
53
 * @since 6.42
54
 */
55
public final class WindowSystemConfiguration extends EventObject {
56
    
57
    private String roleName;
58
59
    public WindowSystemConfiguration( Object source ) {
60
        super( source );
61
    }
62
    
63
    /**
64
     * @return Name of current window system role or null when using the default
65
     * window system settings.
66
     */
67
    public String getRoleName() {
68
        return roleName;
69
    }
70
71
    /**
72
     * Set
73
     * @param roleName Name of the role to use when window system loads. Or null
74
     * value to use default window system settings.
75
     */
76
    public void setRoleName( String roleName ) {
77
        this.roleName = roleName;
78
    }
79
}
(-)openide.windows/src/org/openide/windows/WindowSystemListener.java (+83 lines)
Added 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
import java.util.EventObject;
46
47
/**
48
 * Window system listener to receive notifications when the window system loads
49
 * or saves its state to disk.
50
 * 
51
 * @see WindowManager#addWindowSystemListener(WindowSystemListener)
52
 * 
53
 * @author S. Aubrecht
54
 * @since 6.42
55
 */
56
public interface WindowSystemListener extends EventListener {
57
    
58
    /**
59
     * Invoked from EDT before the window system loads.
60
     * @param config Current window system configuration. Use it to change the
61
     * default window system behavior.
62
     */
63
    void beforeLoad( WindowSystemConfiguration config );
64
    
65
    /**
66
     * Invoked from EDT after the window system finished loading and is about
67
     * to show the main window and its content.
68
     * @param event 
69
     */
70
    void afterLoad( EventObject event );
71
    
72
    /**
73
     * Invoked from EDT before the window system starts saving its state to disk.
74
     * @param event 
75
     */
76
    void beforeSave( EventObject event );
77
    
78
    /**
79
     * Invoked from EDT when the window system finished saving its state to disk.
80
     * @param event 
81
     */
82
    void afterSave( EventObject event );
83
}

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