This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

View | Details | Raw Unified | Return to bug 136647
Collapse All | Expand All

(-)a/core.windows/nbproject/project.properties (-1 / +1 lines)
Lines 39-42 Link Here
39
39
40
javac.compilerargs=-Xlint:unchecked
40
javac.compilerargs=-Xlint:unchecked
41
javac.source=1.5
41
javac.source=1.5
42
spec.version.base=2.11.0
42
spec.version.base=2.12.0
(-)a/core.windows/nbproject/project.xml (-1 / +1 lines)
Lines 80-86 Link Here
80
                    <build-prerequisite/>
80
                    <build-prerequisite/>
81
                    <compile-dependency/>
81
                    <compile-dependency/>
82
                    <run-dependency>
82
                    <run-dependency>
83
                        <specification-version>1.8</specification-version>
83
                        <specification-version>1.13</specification-version>
84
                    </run-dependency>
84
                    </run-dependency>
85
                </dependency>
85
                </dependency>
86
                <dependency>
86
                <dependency>
(-)a/core.windows/src/org/netbeans/core/windows/Bundle.properties (+8 lines)
Lines 43-45 Link Here
43
# Name of the only (fake) workspace
43
# Name of the only (fake) workspace
44
LBL_FakeWorkspace=<Only Workspace>
44
LBL_FakeWorkspace=<Only Workspace>
45
45
46
TopComponent.DragAndDrop.Enabled=true
47
TopComponent.Resizing.Enabled=true
48
TopComponent.Undocking.Enabled=true
49
TopComponent.Maximization.Enabled=true
50
TopComponent.Sliding.Enabled=true
51
Editor.TopComponent.Closing.Enabled=true
52
View.TopComponent.Closing.Enabled=true
53
Splitter.Respect.MinimumSize.Enabled=false
(-)95cf9ddea4af (+98 lines)
Added Link Here
1
/*
2
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
3
 *
4
 * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
5
 *
6
 * The contents of this file are subject to the terms of either the GNU
7
 * General Public License Version 2 only ("GPL") or the Common
8
 * Development and Distribution License("CDDL") (collectively, the
9
 * "License"). You may not use this file except in compliance with the
10
 * License. You can obtain a copy of the License at
11
 * http://www.netbeans.org/cddl-gplv2.html
12
 * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
13
 * specific language governing permissions and limitations under the
14
 * License.  When distributing the software, include this License Header
15
 * Notice in each file and include the License file at
16
 * nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
17
 * particular file as subject to the "Classpath" exception as provided
18
 * by Sun in the GPL Version 2 section of the License file that
19
 * accompanied this code. If applicable, add the following below the
20
 * License Header, with the fields enclosed by brackets [] replaced by
21
 * your own identifying information:
22
 * "Portions Copyrighted [year] [name of copyright owner]"
23
 *
24
 * Contributor(s):
25
 *
26
 * The Original Software is NetBeans. The Initial Developer of the Original
27
 * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
28
 * Microsystems, Inc. All Rights Reserved.
29
 *
30
 * If you wish your version of this file to be governed by only the CDDL
31
 * or only the GPL Version 2, indicate your decision by adding
32
 * "[Contributor] elects to include this software in this distribution
33
 * under the [CDDL or GPL Version 2] license." If you do not indicate a
34
 * single choice of license, a recipient has the option to distribute
35
 * your version of this file under either the CDDL, the GPL Version 2 or
36
 * to extend the choice of license to its licensees as provided above.
37
 * However, if you add GPL Version 2 code and therefore, elected the GPL
38
 * Version 2 license, then the option applies only if the new code is
39
 * made subject to such option by the copyright holder.
40
 */
41
42
package org.netbeans.core.windows;
43
44
import java.util.MissingResourceException;
45
import org.openide.util.NbBundle;
46
47
/**
48
 * Window system switches
49
 *
50
 * @author  S. Aubrecht
51
 */
52
public final class Switches {
53
54
    public static boolean isTopComponentDragAndDropEnabled() {
55
        return getSwitchValue( "TopComponent.DragAndDrop.Enabled", true ); //NOI18N
56
    }
57
    
58
    public static boolean isTopComponentUndockingEnabled() {
59
        return getSwitchValue( "TopComponent.Undocking.Enabled", true ); //NOI18N
60
    }
61
    
62
    public static boolean isTopComponentSlidingEnabled() {
63
        return getSwitchValue( "TopComponent.Sliding.Enabled", true ); //NOI18N
64
    }
65
    
66
    public static boolean isTopComponentResizingEnabled() {
67
        return getSwitchValue( "TopComponent.Resizing.Enabled", true ); //NOI18N
68
    }
69
    
70
    public static boolean isViewTopComponentClosingEnabled() {
71
        return getSwitchValue( "View.TopComponent.Closing.Enabled", true ); //NOI18N
72
    }
73
    
74
    public static boolean isEditorTopComponentClosingEnabled() {
75
        return getSwitchValue( "Editor.TopComponent.Closing.Enabled", true ); //NOI18N
76
    }
77
    
78
    public static boolean isTopComponentMaximizationEnabled() {
79
        return getSwitchValue( "TopComponent.Maximization.Enabled", true ); //NOI18N
80
    }
81
    
82
    public static boolean isSplitterRespectMinimumSizeEnabled() {
83
        return getSwitchValue( "Splitter.Respect.MinimumSize.Enabled", false ); //NOI18N
84
    }
85
    
86
    private static boolean getSwitchValue( String switchName, boolean defaultValue ) {
87
        boolean result = defaultValue;
88
        try {
89
            String resValue = NbBundle.getMessage(Switches.class, switchName );
90
            result = "true".equals( resValue.toLowerCase() ); //NOI18N
91
        } catch( MissingResourceException mrE ) {
92
            //ignore
93
        }
94
        return result;
95
    }
96
    
97
    private Switches() {}
98
}
(-)a/core.windows/src/org/netbeans/core/windows/actions/ActionUtils.java (-18 / +36 lines)
Lines 76-107 Link Here
76
        
76
        
77
        List<Action> actions = new ArrayList<Action>();
77
        List<Action> actions = new ArrayList<Action>();
78
        if(kind == Constants.MODE_KIND_EDITOR) {
78
        if(kind == Constants.MODE_KIND_EDITOR) {
79
            actions.add(new CloseAllDocumentsAction(true));
79
            if( Switches.isEditorTopComponentClosingEnabled() ) {
80
            CloseAllButThisAction allBut = new CloseAllButThisAction(tc, true);
80
                actions.add(new CloseAllDocumentsAction(true));
81
            if (mode != null && mode.getOpenedTopComponents().size() == 1) {
81
                CloseAllButThisAction allBut = new CloseAllButThisAction(tc, true);
82
                allBut.setEnabled(false);
82
                if (mode != null && mode.getOpenedTopComponents().size() == 1) {
83
                    allBut.setEnabled(false);
84
                }
85
                actions.add(allBut);
86
                actions.add(null); // Separator
83
            }
87
            }
84
            actions.add(allBut);
85
            actions.add(null); // Separator
86
            actions.add(new SaveDocumentAction(tc));
88
            actions.add(new SaveDocumentAction(tc));
87
            actions.add(new CloneDocumentAction(tc));
89
            actions.add(new CloneDocumentAction(tc));
88
            actions.add(null); // Separator
90
            actions.add(null); // Separator
89
            actions.add(new CloseWindowAction(tc));
91
            if( Switches.isEditorTopComponentClosingEnabled() ) {
90
            actions.add(new MaximizeWindowAction(tc));
92
                actions.add(new CloseWindowAction(tc));
91
            actions.add(new UndockWindowAction(tc));
93
            }
92
        } else if (kind == Constants.MODE_KIND_VIEW) {
94
            if( Switches.isTopComponentMaximizationEnabled() ) {
93
            actions.add(new CloseWindowAction(tc));
94
            // #82053: don't include maximize action for floating (separate) views
95
            if (mode.getState() == Constants.MODE_STATE_JOINED) {
96
                actions.add(new MaximizeWindowAction(tc));
95
                actions.add(new MaximizeWindowAction(tc));
97
            }
96
            }
98
            actions.add(new UndockWindowAction(tc));
97
            if( Switches.isTopComponentUndockingEnabled() ) {
99
        } else if (kind == Constants.MODE_KIND_SLIDING) {
98
                actions.add(new UndockWindowAction(tc));
100
            actions.add(new CloseWindowAction(tc));
99
            }
101
            if (mode.getState() == Constants.MODE_STATE_JOINED) {
100
        } else if (kind == Constants.MODE_KIND_VIEW) {
101
            if( Switches.isViewTopComponentClosingEnabled() ) {
102
                actions.add(new CloseWindowAction(tc));
103
            }
104
            // #82053: don't include maximize action for floating (separate) views
105
            if (mode.getState() == Constants.MODE_STATE_JOINED
106
                    && Switches.isTopComponentMaximizationEnabled() ) {
102
                actions.add(new MaximizeWindowAction(tc));
107
                actions.add(new MaximizeWindowAction(tc));
103
            }
108
            }
104
            actions.add(new UndockWindowAction(tc));
109
            if( Switches.isTopComponentUndockingEnabled() ) {
110
                actions.add(new UndockWindowAction(tc));
111
            }
112
        } else if (kind == Constants.MODE_KIND_SLIDING) {
113
            if( Switches.isViewTopComponentClosingEnabled() ) {
114
                actions.add(new CloseWindowAction(tc));
115
            }
116
            if (mode.getState() == Constants.MODE_STATE_JOINED
117
                    && Switches.isTopComponentMaximizationEnabled() ) {
118
                actions.add(new MaximizeWindowAction(tc));
119
            }
120
            if( Switches.isTopComponentUndockingEnabled() ) {
121
                actions.add(new UndockWindowAction(tc));
122
            }
105
        }
123
        }
106
        
124
        
107
        return actions.toArray(new Action[actions.size()]);
125
        return actions.toArray(new Action[actions.size()]);
(-)a/core.windows/src/org/netbeans/core/windows/actions/CloseAllButThisAction.java (-1 / +2 lines)
Lines 55-60 Link Here
55
import java.beans.PropertyChangeEvent;
55
import java.beans.PropertyChangeEvent;
56
import java.beans.PropertyChangeListener;
56
import java.beans.PropertyChangeListener;
57
import java.awt.event.KeyEvent;
57
import java.awt.event.KeyEvent;
58
import org.netbeans.core.windows.Switches;
58
59
59
60
60
/**
61
/**
Lines 124-130 Link Here
124
        }
125
        }
125
        
126
        
126
        setEnabled(mode != null && mode.getKind() == Constants.MODE_KIND_EDITOR
127
        setEnabled(mode != null && mode.getKind() == Constants.MODE_KIND_EDITOR
127
                    && areOtherDocs);
128
                    && areOtherDocs && Switches.isEditorTopComponentClosingEnabled());
128
    }
129
    }
129
    
130
    
130
    private TopComponent obtainTC () {
131
    private TopComponent obtainTC () {
(-)a/core.windows/src/org/netbeans/core/windows/actions/CloseAllDocumentsAction.java (+3 lines)
Lines 48-53 Link Here
48
import javax.swing.*;
48
import javax.swing.*;
49
import org.netbeans.core.windows.Constants;
49
import org.netbeans.core.windows.Constants;
50
import org.netbeans.core.windows.ModeImpl;
50
import org.netbeans.core.windows.ModeImpl;
51
import org.netbeans.core.windows.Switches;
51
import org.netbeans.core.windows.WindowManagerImpl;
52
import org.netbeans.core.windows.WindowManagerImpl;
52
import org.openide.windows.TopComponent;
53
import org.openide.windows.TopComponent;
53
54
Lines 112-117 Link Here
112
113
113
    @Override
114
    @Override
114
    public boolean isEnabled() {
115
    public boolean isEnabled() {
116
        if( !Switches.isEditorTopComponentClosingEnabled() )
117
            return false;
115
        WindowManagerImpl wmi = WindowManagerImpl.getInstance();
118
        WindowManagerImpl wmi = WindowManagerImpl.getInstance();
116
        if (isContext) {
119
        if (isContext) {
117
            TopComponent activeTC = TopComponent.getRegistry().getActivated();
120
            TopComponent activeTC = TopComponent.getRegistry().getActivated();
(-)a/core.windows/src/org/netbeans/core/windows/actions/CloseWindowAction.java (-2 / +15 lines)
Lines 50-55 Link Here
50
import javax.swing.*;
50
import javax.swing.*;
51
import java.beans.PropertyChangeEvent;
51
import java.beans.PropertyChangeEvent;
52
import java.beans.PropertyChangeListener;
52
import java.beans.PropertyChangeListener;
53
import org.netbeans.core.windows.Switches;
54
import org.netbeans.core.windows.WindowManagerImpl;
53
55
54
56
55
/**
57
/**
Lines 73-79 Link Here
73
        //a component that is not selected
75
        //a component that is not selected
74
        putValue(Action.NAME, NbBundle.getMessage(ActionUtils.class,
76
        putValue(Action.NAME, NbBundle.getMessage(ActionUtils.class,
75
        "LBL_CloseWindowAction")); //NOI18N
77
        "LBL_CloseWindowAction")); //NOI18N
76
        setEnabled(true);
78
        if( WindowManagerImpl.getInstance().isEditorTopComponent(tc) ) {
79
            setEnabled(Switches.isEditorTopComponentClosingEnabled());
80
        } else {
81
            setEnabled(Switches.isViewTopComponentClosingEnabled());
82
        }
77
    }
83
    }
78
    
84
    
79
    
85
    
Lines 96-102 Link Here
96
    }
102
    }
97
    
103
    
98
    private void updateEnabled() {
104
    private void updateEnabled() {
99
        setEnabled(TopComponent.getRegistry().getActivated() != null);
105
        TopComponent activeTc = TopComponent.getRegistry().getActivated();
106
        if( null == activeTc ) 
107
            setEnabled(false);
108
        if( WindowManagerImpl.getInstance().isEditorTopComponent(activeTc) ) {
109
            setEnabled( Switches.isEditorTopComponentClosingEnabled() );
110
        } else {
111
            setEnabled( Switches.isViewTopComponentClosingEnabled() );
112
        }
100
    }
113
    }
101
    
114
    
102
    /** Overriden to share accelerator with 
115
    /** Overriden to share accelerator with 
(-)a/core.windows/src/org/netbeans/core/windows/actions/MaximizeWindowAction.java (-1 / +2 lines)
Lines 54-59 Link Here
54
import java.awt.*;
54
import java.awt.*;
55
import java.beans.PropertyChangeEvent;
55
import java.beans.PropertyChangeEvent;
56
import java.beans.PropertyChangeListener;
56
import java.beans.PropertyChangeListener;
57
import org.netbeans.core.windows.Switches;
57
import org.openide.util.Mutex;
58
import org.openide.util.Mutex;
58
59
59
60
Lines 163-169 Link Here
163
        TopComponent active = getTCToWorkWith();
164
        TopComponent active = getTCToWorkWith();
164
        boolean maximize;
165
        boolean maximize;
165
        ModeImpl activeMode = (ModeImpl)wm.findMode(active);
166
        ModeImpl activeMode = (ModeImpl)wm.findMode(active);
166
        if (activeMode == null) {
167
        if (activeMode == null || !Switches.isTopComponentMaximizationEnabled() ) {
167
            String label = NbBundle.getMessage(MaximizeWindowAction.class, "CTL_MaximizeWindowAction"); //NOI18N
168
            String label = NbBundle.getMessage(MaximizeWindowAction.class, "CTL_MaximizeWindowAction"); //NOI18N
168
            putValue(Action.NAME, (isPopup ? Actions.cutAmpersand(label) : label));
169
            putValue(Action.NAME, (isPopup ? Actions.cutAmpersand(label) : label));
169
            setEnabled(false);
170
            setEnabled(false);
(-)a/core.windows/src/org/netbeans/core/windows/actions/UndockWindowAction.java (-1 / +2 lines)
Lines 45-50 Link Here
45
import javax.swing.AbstractAction;
45
import javax.swing.AbstractAction;
46
import javax.swing.Action;
46
import javax.swing.Action;
47
import org.netbeans.core.windows.ModeImpl;
47
import org.netbeans.core.windows.ModeImpl;
48
import org.netbeans.core.windows.Switches;
48
import org.netbeans.core.windows.WindowManagerImpl;
49
import org.netbeans.core.windows.WindowManagerImpl;
49
import org.openide.util.HelpCtx;
50
import org.openide.util.HelpCtx;
50
import org.openide.util.NbBundle;
51
import org.openide.util.NbBundle;
Lines 114-120 Link Here
114
115
115
    public boolean isEnabled() {
116
    public boolean isEnabled() {
116
        updateName();
117
        updateName();
117
        return getTC2WorkWith() != null;
118
        return getTC2WorkWith() != null && Switches.isTopComponentUndockingEnabled();
118
    }
119
    }
119
120
120
    private void updateName() {
121
    private void updateName() {
(-)a/core.windows/src/org/netbeans/core/windows/view/dnd/WindowDnDManager.java (-1 / +1 lines)
Lines 139-145 Link Here
139
    
139
    
140
    /** Indicates whether the window drag and drop is enabled. */
140
    /** Indicates whether the window drag and drop is enabled. */
141
    public static boolean isDnDEnabled() {
141
    public static boolean isDnDEnabled() {
142
        return !Constants.SWITCH_DND_DISABLE;
142
        return !Constants.SWITCH_DND_DISABLE && Switches.isTopComponentDragAndDropEnabled();
143
    }
143
    }
144
144
145
    /** Gets the only current instance of <code>DragSource</code> used in 
145
    /** Gets the only current instance of <code>DragSource</code> used in 
(-)a/core.windows/src/org/netbeans/core/windows/view/ui/DefaultSplitContainer.java (-3 lines)
Lines 75-83 Link Here
75
        panel = new ModePanel(this);
75
        panel = new ModePanel(this);
76
        
76
        
77
        panel.add(this.tabbedHandler.getComponent(), BorderLayout.CENTER);
77
        panel.add(this.tabbedHandler.getComponent(), BorderLayout.CENTER);
78
        
79
        // To be able to move split dividers.
80
        panel.setMinimumSize(new Dimension(1, 1));
81
    }
78
    }
82
    
79
    
83
    public void requestAttention (TopComponent tc) {
80
    public void requestAttention (TopComponent tc) {
(-)a/core.windows/src/org/netbeans/core/windows/view/ui/MultiSplitCell.java (-3 / +13 lines)
Lines 42-47 Link Here
42
package org.netbeans.core.windows.view.ui;
42
package org.netbeans.core.windows.view.ui;
43
43
44
import java.awt.Component;
44
import java.awt.Component;
45
import org.netbeans.core.windows.Switches;
45
import org.netbeans.core.windows.view.ViewElement;
46
import org.netbeans.core.windows.view.ViewElement;
46
47
47
/**
48
/**
Lines 57-62 Link Here
57
    private int requiredSize = -1;
58
    private int requiredSize = -1;
58
    private boolean dirty = false;
59
    private boolean dirty = false;
59
    private boolean isHorizontalSplit;
60
    private boolean isHorizontalSplit;
61
    
62
    private static final int MINIMUM_POSSIBLE_SIZE = 10;
60
    
63
    
61
    MultiSplitCell( ViewElement view, double initialSplitWeight, boolean isHorizontalSplit ) {
64
    MultiSplitCell( ViewElement view, double initialSplitWeight, boolean isHorizontalSplit ) {
62
        this.view = view;
65
        this.view = view;
Lines 104-112 Link Here
104
     * result is a sum of minimum sizes of all children cells.
107
     * result is a sum of minimum sizes of all children cells.
105
     */
108
     */
106
    int getMinimumSize() {
109
    int getMinimumSize() {
107
        if( isHorizontalSplit )
110
        int result = MINIMUM_POSSIBLE_SIZE;
108
            return getComponent().getMinimumSize().width;
111
        if( Switches.isSplitterRespectMinimumSizeEnabled() ) {
109
        return getComponent().getMinimumSize().height;
112
            if( isHorizontalSplit )
113
                result = getComponent().getMinimumSize().width;
114
            else
115
                result = getComponent().getMinimumSize().height;
116
        }
117
        if( result < MINIMUM_POSSIBLE_SIZE )
118
            result = MINIMUM_POSSIBLE_SIZE;
119
        return result;
110
    }
120
    }
111
    
121
    
112
    int getRequiredSize() {
122
    int getRequiredSize() {
(-)a/core.windows/src/org/netbeans/core/windows/view/ui/MultiSplitPane.java (+13 lines)
Lines 62-67 Link Here
62
import javax.swing.JPanel;
62
import javax.swing.JPanel;
63
import javax.swing.JSplitPane;
63
import javax.swing.JSplitPane;
64
import javax.swing.UIManager;
64
import javax.swing.UIManager;
65
import org.netbeans.core.windows.Switches;
65
import org.netbeans.core.windows.view.ViewElement;
66
import org.netbeans.core.windows.view.ViewElement;
66
67
67
68
Lines 217-222 Link Here
217
        this.dividerSize = newDividerSize;
218
        this.dividerSize = newDividerSize;
218
    }
219
    }
219
    
220
    
221
    @Override
220
    public Dimension getMinimumSize() {
222
    public Dimension getMinimumSize() {
221
        //the minimum size is a sum of minimum sizes of all children components
223
        //the minimum size is a sum of minimum sizes of all children components
222
        Dimension d = new Dimension();
224
        Dimension d = new Dimension();
Lines 268-273 Link Here
268
    }
270
    }
269
271
270
    public void mousePressed(MouseEvent e) {
272
    public void mousePressed(MouseEvent e) {
273
        if( !Switches.isTopComponentResizingEnabled() )
274
            return;
271
        MultiSplitDivider divider = dividerAtPoint( e.getPoint() );
275
        MultiSplitDivider divider = dividerAtPoint( e.getPoint() );
272
        if( null == divider )
276
        if( null == divider )
273
            return;
277
            return;
Lines 292-297 Link Here
292
    
296
    
293
297
294
    private void switchCursor( MouseEvent e ) {
298
    private void switchCursor( MouseEvent e ) {
299
        if( !Switches.isTopComponentResizingEnabled() )
300
            return;
295
        MultiSplitDivider divider = dividerAtPoint( e.getPoint() );
301
        MultiSplitDivider divider = dividerAtPoint( e.getPoint() );
296
        if( null == divider ) {
302
        if( null == divider ) {
297
            setCursor( Cursor.getDefaultCursor() );
303
            setCursor( Cursor.getDefaultCursor() );
Lines 312-317 Link Here
312
        return null;
318
        return null;
313
    }
319
    }
314
320
321
    @Override
315
    public void paint( Graphics g ) {
322
    public void paint( Graphics g ) {
316
        super.paint(g);
323
        super.paint(g);
317
        //paint split bars
324
        //paint split bars
Lines 528-533 Link Here
528
    // *************************************************************************
535
    // *************************************************************************
529
    // Accessibility
536
    // Accessibility
530
    
537
    
538
    @Override
531
    public AccessibleContext getAccessibleContext() {
539
    public AccessibleContext getAccessibleContext() {
532
        if( accessibleContext == null ) {
540
        if( accessibleContext == null ) {
533
            accessibleContext = new AccessibleMultiSplitPane();
541
            accessibleContext = new AccessibleMultiSplitPane();
Lines 542-547 Link Here
542
    }
550
    }
543
551
544
    protected class AccessibleMultiSplitPane extends AccessibleJComponent {
552
    protected class AccessibleMultiSplitPane extends AccessibleJComponent {
553
        @Override
545
        public AccessibleStateSet getAccessibleStateSet() {
554
        public AccessibleStateSet getAccessibleStateSet() {
546
            AccessibleStateSet states = super.getAccessibleStateSet();
555
            AccessibleStateSet states = super.getAccessibleStateSet();
547
            if( isHorizontalSplit() ) {
556
            if( isHorizontalSplit() ) {
Lines 552-561 Link Here
552
            return states;
561
            return states;
553
        }
562
        }
554
563
564
        @Override
555
        public AccessibleRole getAccessibleRole() {
565
        public AccessibleRole getAccessibleRole() {
556
            return AccessibleRole.SPLIT_PANE;
566
            return AccessibleRole.SPLIT_PANE;
557
        }
567
        }
558
568
569
        @Override
559
        public Accessible getAccessibleAt( Point p ) {
570
        public Accessible getAccessibleAt( Point p ) {
560
            MultiSplitDivider divider = dividerAtPoint( p );
571
            MultiSplitDivider divider = dividerAtPoint( p );
561
            if( null != divider ) {
572
            if( null != divider ) {
Lines 564-569 Link Here
564
            return super.getAccessibleAt( p );
575
            return super.getAccessibleAt( p );
565
        }
576
        }
566
577
578
        @Override
567
        public Accessible getAccessibleChild(int i) {
579
        public Accessible getAccessibleChild(int i) {
568
580
569
            int childrenCount = super.getAccessibleChildrenCount();
581
            int childrenCount = super.getAccessibleChildrenCount();
Lines 578-583 Link Here
578
            return divider;
590
            return divider;
579
        }
591
        }
580
592
593
        @Override
581
        public int getAccessibleChildrenCount() {
594
        public int getAccessibleChildrenCount() {
582
            return super.getAccessibleChildrenCount() + dividers.size();
595
            return super.getAccessibleChildrenCount() + dividers.size();
583
        }
596
        }
(-)a/core.windows/src/org/netbeans/core/windows/view/ui/TabbedHandler.java (-14 / +18 lines)
Lines 68-73 Link Here
68
import java.awt.event.MouseEvent;
68
import java.awt.event.MouseEvent;
69
import java.awt.event.AWTEventListener;
69
import java.awt.event.AWTEventListener;
70
import java.util.logging.Logger;
70
import java.util.logging.Logger;
71
import org.netbeans.core.windows.Switches;
71
import org.netbeans.core.windows.view.ui.slides.SlideBar;
72
import org.netbeans.core.windows.view.ui.slides.SlideBar;
72
import org.netbeans.core.windows.view.ui.slides.SlideBarActionEvent;
73
import org.netbeans.core.windows.view.ui.slides.SlideBarActionEvent;
73
import org.netbeans.core.windows.view.ui.slides.SlideOperationFactory;
74
import org.netbeans.core.windows.view.ui.slides.SlideOperationFactory;
Lines 332-350 Link Here
332
                ActionUtils.closeAllExcept(tc, true);
333
                ActionUtils.closeAllExcept(tc, true);
333
            //Pin button handling here
334
            //Pin button handling here
334
            } else if (TabbedContainer.COMMAND_ENABLE_AUTO_HIDE.equals(cmd)) {
335
            } else if (TabbedContainer.COMMAND_ENABLE_AUTO_HIDE.equals(cmd)) {
335
                TopComponent tc = (TopComponent) tabbed.getTopComponentAt(tae.getTabIndex());
336
                if( Switches.isTopComponentSlidingEnabled() ) {
336
                // prepare slide operation
337
                    TopComponent tc = (TopComponent) tabbed.getTopComponentAt(tae.getTabIndex());
337
                Component tabbedComp = tabbed.getComponent();
338
                    // prepare slide operation
338
                
339
                    Component tabbedComp = tabbed.getComponent();
339
                String side = WindowManagerImpl.getInstance().guessSlideSide(tc);
340
340
                SlideOperation operation = SlideOperationFactory.createSlideIntoEdge(
341
                    String side = WindowManagerImpl.getInstance().guessSlideSide(tc);
341
                    tabbedComp, side, true);
342
                    SlideOperation operation = SlideOperationFactory.createSlideIntoEdge(
342
                operation.setStartBounds(
343
                        tabbedComp, side, true);
343
                       new Rectangle(tabbedComp.getLocationOnScreen(), tabbedComp.getSize()));
344
                    operation.setStartBounds(
344
                operation.prepareEffect();
345
                           new Rectangle(tabbedComp.getLocationOnScreen(), tabbedComp.getSize()));
345
                
346
                    operation.prepareEffect();
346
                modeView.getController().userEnabledAutoHide(modeView, tc);
347
347
                modeView.getController().userTriggeredSlideIntoEdge(modeView, operation);
348
                    modeView.getController().userEnabledAutoHide(modeView, tc);
349
                    modeView.getController().userTriggeredSlideIntoEdge(modeView, operation);
350
                }
348
            }
351
            }
349
        } else if (e instanceof SlideBarActionEvent) {
352
        } else if (e instanceof SlideBarActionEvent) {
350
            // slide bar commands
353
            // slide bar commands
Lines 424-430 Link Here
424
        TopComponent tc = tab.getTopComponentAt(tae.getTabIndex());
427
        TopComponent tc = tab.getTopComponentAt(tae.getTabIndex());
425
        // perform action
428
        // perform action
426
        MaximizeWindowAction mwa = new MaximizeWindowAction(tc);
429
        MaximizeWindowAction mwa = new MaximizeWindowAction(tc);
427
        mwa.actionPerformed(tae);
430
        if( mwa.isEnabled() )
431
            mwa.actionPerformed(tae);
428
    }
432
    }
429
433
430
    /** Well, we can't totally get rid of AWT event listeners - this is what
434
    /** Well, we can't totally get rid of AWT event listeners - this is what
(-)a/core.windows/src/org/netbeans/core/windows/view/ui/slides/CommandManager.java (-1 / +1 lines)
Lines 281-287 Link Here
281
    private TabbedContainer getSlidedTabContainer () {
281
    private TabbedContainer getSlidedTabContainer () {
282
        if (slidedTabContainer == null) {
282
        if (slidedTabContainer == null) {
283
            TabDataModel slidedCompModel = new DefaultTabDataModel();
283
            TabDataModel slidedCompModel = new DefaultTabDataModel();
284
            slidedTabContainer = new TabbedContainer(slidedCompModel, TabbedContainer.TYPE_VIEW, slideBar);
284
            slidedTabContainer = new TabbedContainer(slidedCompModel, TabbedContainer.TYPE_VIEW, slideBar.createWinsysInfo());
285
            slidedTabContainer.addActionListener(this);
285
            slidedTabContainer.addActionListener(this);
286
            Border b = (Border) UIManager.get ("floatingBorder"); //NOI18N
286
            Border b = (Border) UIManager.get ("floatingBorder"); //NOI18N
287
            if (b != null) {
287
            if (b != null) {
(-)a/core.windows/src/org/netbeans/core/windows/view/ui/slides/SlideBar.java (-10 / +27 lines)
Lines 60-65 Link Here
60
import javax.swing.event.ChangeListener;
60
import javax.swing.event.ChangeListener;
61
import javax.swing.event.ListDataEvent;
61
import javax.swing.event.ListDataEvent;
62
import org.netbeans.core.windows.Constants;
62
import org.netbeans.core.windows.Constants;
63
import org.netbeans.core.windows.Switches;
63
import org.netbeans.core.windows.WindowManagerImpl;
64
import org.netbeans.core.windows.WindowManagerImpl;
64
import org.netbeans.core.windows.view.ui.Tabbed;
65
import org.netbeans.core.windows.view.ui.Tabbed;
65
import org.netbeans.core.windows.view.ui.tabcontrol.TabbedAdapter;
66
import org.netbeans.core.windows.view.ui.tabcontrol.TabbedAdapter;
Lines 69-74 Link Here
69
import org.netbeans.swing.tabcontrol.TabDisplayer;
70
import org.netbeans.swing.tabcontrol.TabDisplayer;
70
import org.netbeans.swing.tabcontrol.TabbedContainer;
71
import org.netbeans.swing.tabcontrol.TabbedContainer;
71
import org.netbeans.swing.tabcontrol.WinsysInfoForTabbed;
72
import org.netbeans.swing.tabcontrol.WinsysInfoForTabbed;
73
import org.netbeans.swing.tabcontrol.WinsysInfoForTabbedContainer;
72
import org.netbeans.swing.tabcontrol.event.ComplexListDataEvent;
74
import org.netbeans.swing.tabcontrol.event.ComplexListDataEvent;
73
import org.netbeans.swing.tabcontrol.event.ComplexListDataListener;
75
import org.netbeans.swing.tabcontrol.event.ComplexListDataListener;
74
import org.openide.windows.TopComponent;
76
import org.openide.windows.TopComponent;
Lines 84-90 Link Here
84
 * @author Dafe Simonek
86
 * @author Dafe Simonek
85
 */
87
 */
86
public final class SlideBar extends Box implements ComplexListDataListener,
88
public final class SlideBar extends Box implements ComplexListDataListener,
87
    SlideBarController, Tabbed.Accessor, WinsysInfoForTabbed, ChangeListener {
89
    SlideBarController, Tabbed.Accessor, ChangeListener {
88
    
90
    
89
    /** Command indicating request for slide in (appear) of sliding component */
91
    /** Command indicating request for slide in (appear) of sliding component */
90
    public static final String COMMAND_SLIDE_IN = "slideIn"; //NOI18N
92
    public static final String COMMAND_SLIDE_IN = "slideIn"; //NOI18N
Lines 369-387 Link Here
369
        return tabbed;
371
        return tabbed;
370
    }
372
    }
371
    
373
    
372
    /********* implementation of WinsysInfoForTabbed **************/
374
    /********* implementation of WinsysInfoForTabbedContainer **************/
373
    
375
    
374
    public Object getOrientation(Component comp) {
376
    public WinsysInfoForTabbedContainer createWinsysInfo() {
375
        if (WindowManagerImpl.getInstance().getEditorAreaState() != Constants.EDITOR_AREA_JOINED) {
377
        return new SlidedWinsysInfoForTabbedContainer();
376
            return TabDisplayer.ORIENTATION_INVISIBLE;
377
        }
378
        return TabDisplayer.ORIENTATION_CENTER;
379
    }
378
    }
380
    
379
    
381
    public boolean inMaximizedMode(Component comp) {
380
    private class SlidedWinsysInfoForTabbedContainer extends WinsysInfoForTabbedContainer {
382
        return TabbedAdapter.isInMaximizedMode(comp);
381
        public Object getOrientation(Component comp) {
382
            if (WindowManagerImpl.getInstance().getEditorAreaState() != Constants.EDITOR_AREA_JOINED) {
383
                return TabDisplayer.ORIENTATION_INVISIBLE;
384
            }
385
            return TabDisplayer.ORIENTATION_CENTER;
386
        }
387
388
        public boolean inMaximizedMode(Component comp) {
389
            return TabbedAdapter.isInMaximizedMode(comp);
390
        }
391
392
        @Override
393
        public boolean isTopComponentSlidingEnabled() {
394
            return Switches.isTopComponentSlidingEnabled();
395
        }
396
397
        @Override
398
        public boolean isTopComponentClosingEnabled() {
399
            return Switches.isViewTopComponentClosingEnabled();
400
        }
383
    }
401
    }
384
    
385
    
402
    
386
    /*************** non public stuff **************************/
403
    /*************** non public stuff **************************/
387
    
404
    
(-)a/core.windows/src/org/netbeans/core/windows/view/ui/slides/TabbedSlideAdapter.java (-2 / +3 lines)
Lines 59-64 Link Here
59
import javax.swing.SingleSelectionModel;
59
import javax.swing.SingleSelectionModel;
60
import javax.swing.event.ChangeListener;
60
import javax.swing.event.ChangeListener;
61
import org.netbeans.core.windows.Constants;
61
import org.netbeans.core.windows.Constants;
62
import org.netbeans.core.windows.Switches;
62
import org.netbeans.core.windows.WindowManagerImpl;
63
import org.netbeans.core.windows.WindowManagerImpl;
63
import org.netbeans.core.windows.actions.ActionUtils;
64
import org.netbeans.core.windows.actions.ActionUtils;
64
import org.netbeans.core.windows.view.ui.Tabbed;
65
import org.netbeans.core.windows.view.ui.Tabbed;
Lines 372-380 Link Here
372
    /** Add action for disabling slide */
373
    /** Add action for disabling slide */
373
    public Action[] getPopupActions(Action[] defaultActions, int tabIndex) {
374
    public Action[] getPopupActions(Action[] defaultActions, int tabIndex) {
374
        boolean isMDI = WindowManagerImpl.getInstance().getEditorAreaState() == Constants.EDITOR_AREA_JOINED;
375
        boolean isMDI = WindowManagerImpl.getInstance().getEditorAreaState() == Constants.EDITOR_AREA_JOINED;
375
        Action[] result = new Action[defaultActions.length + (isMDI ? 2 : 0)];
376
        Action[] result = new Action[defaultActions.length + (isMDI && Switches.isTopComponentSlidingEnabled() ? 2 : 0)];
376
        System.arraycopy(defaultActions, 0, result, 0, defaultActions.length);
377
        System.arraycopy(defaultActions, 0, result, 0, defaultActions.length);
377
        if (isMDI) {
378
        if (isMDI && Switches.isTopComponentSlidingEnabled() ) {
378
            result[defaultActions.length] = 
379
            result[defaultActions.length] = 
379
                new ActionUtils.AutoHideWindowAction(slideBar, tabIndex, true);
380
                new ActionUtils.AutoHideWindowAction(slideBar, tabIndex, true);
380
                result[defaultActions.length+1] = 
381
                result[defaultActions.length+1] = 
(-)a/core.windows/src/org/netbeans/core/windows/view/ui/tabcontrol/TabbedAdapter.java (-7 / +24 lines)
Lines 56-62 Link Here
56
import org.netbeans.swing.tabcontrol.plaf.EqualPolygon;
56
import org.netbeans.swing.tabcontrol.plaf.EqualPolygon;
57
import org.openide.util.WeakListeners;
57
import org.openide.util.WeakListeners;
58
import org.openide.windows.TopComponent;
58
import org.openide.windows.TopComponent;
59
import java.awt.Image;
60
import org.netbeans.core.windows.view.ui.slides.SlideController;
59
import org.netbeans.core.windows.view.ui.slides.SlideController;
61
import javax.swing.*;
60
import javax.swing.*;
62
import javax.swing.event.ChangeEvent;
61
import javax.swing.event.ChangeEvent;
Lines 65-73 Link Here
65
import java.util.ArrayList;
64
import java.util.ArrayList;
66
import java.util.Arrays;
65
import java.util.Arrays;
67
import org.netbeans.core.windows.ModeImpl;
66
import org.netbeans.core.windows.ModeImpl;
67
import org.netbeans.core.windows.Switches;
68
import org.netbeans.core.windows.actions.ActionUtils;
68
import org.netbeans.core.windows.actions.ActionUtils;
69
import org.netbeans.swing.tabcontrol.TabDisplayer;
69
import org.netbeans.swing.tabcontrol.TabDisplayer;
70
import org.netbeans.swing.tabcontrol.WinsysInfoForTabbed;
70
import org.netbeans.swing.tabcontrol.WinsysInfoForTabbedContainer;
71
import org.netbeans.swing.tabcontrol.event.TabActionEvent;
71
import org.netbeans.swing.tabcontrol.event.TabActionEvent;
72
import org.openide.util.ChangeSupport;
72
import org.openide.util.ChangeSupport;
73
73
Lines 90-96 Link Here
90
90
91
    /** Creates a new instance of TabbedAdapter */
91
    /** Creates a new instance of TabbedAdapter */
92
    public TabbedAdapter (int type) {
92
    public TabbedAdapter (int type) {
93
        super (null, type, new WinsysInfo());
93
        super (null, type, new WinsysInfo(type));
94
        getSelectionModel().addChangeListener(new ChangeListener() {
94
        getSelectionModel().addChangeListener(new ChangeListener() {
95
            public void stateChanged (ChangeEvent ce) {
95
            public void stateChanged (ChangeEvent ce) {
96
                int idx = getSelectionModel().getSelectedIndex();
96
                int idx = getSelectionModel().getSelectedIndex();
Lines 128-134 Link Here
128
                "RequestAttention on component unknown to container: " + tc); //NOI18N
128
                "RequestAttention on component unknown to container: " + tc); //NOI18N
129
        }
129
        }
130
    }
130
    }
131
    
131
132
    public void cancelRequestAttention (TopComponent tc) {
132
    public void cancelRequestAttention (TopComponent tc) {
133
        int idx = indexOf(tc);
133
        int idx = indexOf(tc);
134
        if (idx >= 0) {
134
        if (idx >= 0) {
Lines 460-466 Link Here
460
    public Action[] getPopupActions(Action[] defaultActions, int tabIndex) {
460
    public Action[] getPopupActions(Action[] defaultActions, int tabIndex) {
461
        boolean isDocked = WindowManagerImpl.getInstance().isDocked(getTopComponentAt(tabIndex));
461
        boolean isDocked = WindowManagerImpl.getInstance().isDocked(getTopComponentAt(tabIndex));
462
        // no auto hide for editors and floating views
462
        // no auto hide for editors and floating views
463
        if (TabbedContainer.TYPE_EDITOR == getType() || !isDocked) {
463
        if (TabbedContainer.TYPE_EDITOR == getType() || !isDocked || !Switches.isTopComponentSlidingEnabled()) {
464
            return defaultActions;
464
            return defaultActions;
465
        }
465
        }
466
        int actionCount = defaultActions.length;
466
        int actionCount = defaultActions.length;
Lines 509-516 Link Here
509
509
510
    /********* implementation of WinsysInfoForTabbed ********/
510
    /********* implementation of WinsysInfoForTabbed ********/
511
    
511
    
512
    static class WinsysInfo implements WinsysInfoForTabbed {
512
    static class WinsysInfo extends WinsysInfoForTabbedContainer {
513
    
513
        private int containerType;
514
        public WinsysInfo( int containerType ) {
515
            this.containerType = containerType;
516
        }
517
        
514
        public Object getOrientation (Component comp) {
518
        public Object getOrientation (Component comp) {
515
            WindowManagerImpl wmi = WindowManagerImpl.getInstance();
519
            WindowManagerImpl wmi = WindowManagerImpl.getInstance();
516
            // don't show pin button in separate views
520
            // don't show pin button in separate views
Lines 535-540 Link Here
535
        public boolean inMaximizedMode (Component comp) {
539
        public boolean inMaximizedMode (Component comp) {
536
            return isInMaximizedMode(comp);
540
            return isInMaximizedMode(comp);
537
        }    
541
        }    
542
        
543
        @Override
544
        public boolean isTopComponentSlidingEnabled() {
545
            return Switches.isTopComponentSlidingEnabled();
546
        }
547
        
548
        @Override
549
        public boolean isTopComponentClosingEnabled() {
550
            if( containerType == Constants.MODE_KIND_EDITOR )
551
                return Switches.isEditorTopComponentClosingEnabled();
552
            else
553
                return Switches.isViewTopComponentClosingEnabled();
554
        }
538
        
555
        
539
    } // end of LocInfo
556
    } // end of LocInfo
540
557
(-)a/o.n.swing.tabcontrol/apichanges.xml (+20 lines)
Lines 104-109 Link Here
104
    <!-- ACTUAL CHANGES BEGIN HERE: -->
104
    <!-- ACTUAL CHANGES BEGIN HERE: -->
105
105
106
<changes>
106
<changes>
107
108
    <change id="winsysinfo_for_tabbed_container">
109
      <api name="tabcontrol"/>
110
      <summary>Added new abstract class WinsysInfoForTabbedContainer which can 
111
      adjust some tabbed container properties and behavior.</summary>
112
      <version major="1" minor="13"/>
113
      <date day="6" month="6" year="2008"/>
114
      <author login="saubrecht"/>
115
      <compatibility addition="yes" binary="compatible" deprecation="yes"/>
116
      <description>
117
        <p>The new abstract class WinsysInfoForTabbedContainer is a replacement
118
        for interface WinsysInfoForTabbed. The new class implements the old interface
119
        and also contains method informing the tabbed containers about the state
120
        of some of window system switches that may disable some of its functionality.
121
        (For example disable window sliding).
122
        </p>
123
      </description>
124
      <class package="org.netbeans.swing.tabcontrol" name="WinsysInfoForTabbedContainer"/>
125
      <issue number="136636"/>
126
    </change>
107
127
108
    <change id="slide_transparency">
128
    <change id="slide_transparency">
109
      <api name="tabcontrol"/>
129
      <api name="tabcontrol"/>
(-)a/o.n.swing.tabcontrol/manifest.mf (-1 / +1 lines)
Lines 1-6 Link Here
1
Manifest-Version: 1.0
1
Manifest-Version: 1.0
2
OpenIDE-Module-Localizing-Bundle: org/netbeans/swing/tabcontrol/Bundle.properties
2
OpenIDE-Module-Localizing-Bundle: org/netbeans/swing/tabcontrol/Bundle.properties
3
OpenIDE-Module: org.netbeans.swing.tabcontrol
3
OpenIDE-Module: org.netbeans.swing.tabcontrol
4
OpenIDE-Module-Specification-Version: 1.12
4
OpenIDE-Module-Specification-Version: 1.13
5
AutoUpdate-Essential-Module: true
5
AutoUpdate-Essential-Module: true
6
6
(-)a/o.n.swing.tabcontrol/src/org/netbeans/swing/tabcontrol/TabDisplayer.java (-2 / +17 lines)
Lines 221-226 Link Here
221
    private transient List<ActionListener> actionListenerList;
221
    private transient List<ActionListener> actionListenerList;
222
    
222
    
223
    private WinsysInfoForTabbed winsysInfo = null;
223
    private WinsysInfoForTabbed winsysInfo = null;
224
    private WinsysInfoForTabbedContainer containerWinsysInfo = null;
224
    
225
    
225
    @Deprecated
226
    @Deprecated
226
    private LocationInformer locationInformer = null;
227
    private LocationInformer locationInformer = null;
Lines 249-257 Link Here
249
    }
250
    }
250
        
251
        
251
    /**
252
    /**
253
     * Depreacated, please use constructor with WinsysInfoForTabbedContainer param.
254
     */
255
    @Deprecated
256
    public TabDisplayer(TabDataModel model, int type, WinsysInfoForTabbed winsysInfo) {
257
        this( model, type, WinsysInfoForTabbedContainer.getDefault(winsysInfo) );
258
    }
259
    /**
252
     * Creates a new instance of TabDisplayer
260
     * Creates a new instance of TabDisplayer
253
     */
261
     */
254
    public TabDisplayer(TabDataModel model, int type, WinsysInfoForTabbed winsysInfo) {
262
    public TabDisplayer(TabDataModel model, int type, WinsysInfoForTabbedContainer containerWinsysInfo) {
255
        switch (type) {
263
        switch (type) {
256
            case TYPE_VIEW:
264
            case TYPE_VIEW:
257
            case TYPE_EDITOR:
265
            case TYPE_EDITOR:
Lines 263-269 Link Here
263
        }
271
        }
264
        this.model = model;
272
        this.model = model;
265
        this.type = type;
273
        this.type = type;
266
        this.winsysInfo = winsysInfo;
274
        this.winsysInfo = containerWinsysInfo;
275
        this.containerWinsysInfo = containerWinsysInfo;
276
        showClose &= containerWinsysInfo.isTopComponentClosingEnabled();
267
        putClientProperty (PROP_ORIENTATION, ORIENTATION_NORTH);
277
        putClientProperty (PROP_ORIENTATION, ORIENTATION_NORTH);
268
        initialized = true;
278
        initialized = true;
269
        updateUI();
279
        updateUI();
Lines 552-559 Link Here
552
        return getUI().tabForCoordinate(p);
562
        return getUI().tabForCoordinate(p);
553
    }
563
    }
554
    
564
    
565
    @Deprecated
555
    public WinsysInfoForTabbed getWinsysInfo() {
566
    public WinsysInfoForTabbed getWinsysInfo() {
556
        return winsysInfo;
567
        return winsysInfo;
568
    }
569
    
570
    public WinsysInfoForTabbedContainer getContainerWinsysInfo() {
571
        return containerWinsysInfo;
557
    }
572
    }
558
    
573
    
559
    @Deprecated
574
    @Deprecated
(-)a/o.n.swing.tabcontrol/src/org/netbeans/swing/tabcontrol/TabbedContainer.java (-1 / +18 lines)
Lines 292-297 Link Here
292
    
292
    
293
    /** Winsys info needed for tab control or null if not available */
293
    /** Winsys info needed for tab control or null if not available */
294
    private WinsysInfoForTabbed winsysInfo = null;
294
    private WinsysInfoForTabbed winsysInfo = null;
295
    
296
    /** Winsys info needed for tab control or null if not available */
297
    private WinsysInfoForTabbedContainer containerWinsysInfo = null;
295
298
296
    @Deprecated
299
    @Deprecated
297
    private LocationInformer locationInformer = null;
300
    private LocationInformer locationInformer = null;
Lines 333-342 Link Here
333
    }
336
    }
334
        
337
        
335
    /**
338
    /**
339
     * Deprecated, please use constructor with WinsysInfoForTabbed instead.
340
     */
341
    @Deprecated
342
    public TabbedContainer(TabDataModel model, int type, WinsysInfoForTabbed winsysInfo) {
343
        this( model, type, WinsysInfoForTabbedContainer.getDefault( winsysInfo ) );
344
    }
345
        
346
    /**
336
     * Create a new pane with the specified model, displayer type and extra
347
     * Create a new pane with the specified model, displayer type and extra
337
     * information from winsys
348
     * information from winsys
338
     */
349
     */
339
    public TabbedContainer(TabDataModel model, int type, WinsysInfoForTabbed winsysInfo) {
350
    public TabbedContainer(TabDataModel model, int type, WinsysInfoForTabbedContainer winsysInfo) {
340
        switch (type) {
351
        switch (type) {
341
            case TYPE_VIEW:
352
            case TYPE_VIEW:
342
            case TYPE_EDITOR:
353
            case TYPE_EDITOR:
Lines 352-357 Link Here
352
        this.model = model;
363
        this.model = model;
353
        this.type = Boolean.getBoolean("nb.tabcontrol.alltoolbar") ? TYPE_TOOLBAR : type;
364
        this.type = Boolean.getBoolean("nb.tabcontrol.alltoolbar") ? TYPE_TOOLBAR : type;
354
        this.winsysInfo = winsysInfo;
365
        this.winsysInfo = winsysInfo;
366
        this.containerWinsysInfo = winsysInfo;
355
        initialized = true;
367
        initialized = true;
356
        updateUI();
368
        updateUI();
357
        //A few borders and such will check this
369
        //A few borders and such will check this
Lines 791-800 Link Here
791
        return locationInformer;
803
        return locationInformer;
792
    }
804
    }
793
    
805
    
806
    @Deprecated
794
    public WinsysInfoForTabbed getWinsysInfo() {
807
    public WinsysInfoForTabbed getWinsysInfo() {
795
        return winsysInfo;
808
        return winsysInfo;
796
    }
809
    }
797
810
811
    public WinsysInfoForTabbedContainer getContainerWinsysInfo() {
812
        return containerWinsysInfo;
813
    }
814
    
798
    static {
815
    static {
799
        //Support for experimenting with different content policies in NetBeans
816
        //Support for experimenting with different content policies in NetBeans
800
        String s = System.getProperty("nb.tabcontrol.contentpolicy"); //NOI18N
817
        String s = System.getProperty("nb.tabcontrol.contentpolicy"); //NOI18N
(-)a/o.n.swing.tabcontrol/src/org/netbeans/swing/tabcontrol/WinsysInfoForTabbed.java (-1 lines)
Lines 69-73 Link Here
69
     * false otherwise 
69
     * false otherwise 
70
     */
70
     */
71
    public boolean inMaximizedMode (Component comp);
71
    public boolean inMaximizedMode (Component comp);
72
    
73
}
72
}
(-)95cf9ddea4af (+88 lines)
Added Link Here
1
/*
2
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
3
 *
4
 * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
5
 *
6
 * The contents of this file are subject to the terms of either the GNU
7
 * General Public License Version 2 only ("GPL") or the Common
8
 * Development and Distribution License("CDDL") (collectively, the
9
 * "License"). You may not use this file except in compliance with the
10
 * License. You can obtain a copy of the License at
11
 * http://www.netbeans.org/cddl-gplv2.html
12
 * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
13
 * specific language governing permissions and limitations under the
14
 * License.  When distributing the software, include this License Header
15
 * Notice in each file and include the License file at
16
 * nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
17
 * particular file as subject to the "Classpath" exception as provided
18
 * by Sun in the GPL Version 2 section of the License file that
19
 * accompanied this code. If applicable, add the following below the
20
 * License Header, with the fields enclosed by brackets [] replaced by
21
 * your own identifying information:
22
 * "Portions Copyrighted [year] [name of copyright owner]"
23
 *
24
 * Contributor(s):
25
 *
26
 * The Original Software is NetBeans. The Initial Developer of the Original
27
 * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
28
 * Microsystems, Inc. All Rights Reserved.
29
 *
30
 * If you wish your version of this file to be governed by only the CDDL
31
 * or only the GPL Version 2, indicate your decision by adding
32
 * "[Contributor] elects to include this software in this distribution
33
 * under the [CDDL or GPL Version 2] license." If you do not indicate a
34
 * single choice of license, a recipient has the option to distribute
35
 * your version of this file under either the CDDL, the GPL Version 2 or
36
 * to extend the choice of license to its licensees as provided above.
37
 * However, if you add GPL Version 2 code and therefore, elected the GPL
38
 * Version 2 license, then the option applies only if the new code is
39
 * made subject to such option by the copyright holder.
40
 */
41
42
package org.netbeans.swing.tabcontrol;
43
44
import java.awt.Component;
45
46
47
/**
48
 * Interface that provides external information (provided by window system)
49
 * that TabbedContainers need to know in order to work fully.<p>
50
 *
51
 * Tab control uses info to provide for example tab buttons reacting on 
52
 * the position of the container or on maximization state.
53
 *
54
 * @see TabbedContainer#TabbedContainer
55
 *
56
 * @author S. Aubrecht
57
 */
58
public abstract class WinsysInfoForTabbedContainer implements WinsysInfoForTabbed {
59
60
    public boolean isTopComponentSlidingEnabled() {
61
        return true;
62
    }
63
    
64
    public boolean isTopComponentClosingEnabled() {
65
        return true;
66
    }
67
    
68
    public static WinsysInfoForTabbedContainer getDefault( WinsysInfoForTabbed winsysInfo ) {
69
        return new DefaultWinsysInfoForTabbedContainer( winsysInfo );
70
    }
71
    
72
    private static class DefaultWinsysInfoForTabbedContainer extends WinsysInfoForTabbedContainer {
73
        
74
        private WinsysInfoForTabbed delegate;
75
        
76
        public DefaultWinsysInfoForTabbedContainer( WinsysInfoForTabbed winsysInfo ) {
77
            this.delegate = winsysInfo;
78
        }
79
80
        public Object getOrientation(Component comp) {
81
            return null == delegate ? TabDisplayer.ORIENTATION_CENTER : delegate.getOrientation(comp);
82
        }
83
84
        public boolean inMaximizedMode(Component comp) {
85
            return null == delegate ? false : delegate.inMaximizedMode(comp);
86
        }
87
    }
88
}
(-)a/o.n.swing.tabcontrol/src/org/netbeans/swing/tabcontrol/plaf/AbstractViewTabDisplayerUI.java (-11 / +31 lines)
Lines 167-173 Link Here
167
            tabComponent = tab.getComponent();
167
            tabComponent = tab.getComponent();
168
        }
168
        }
169
        btnAutoHidePin.setVisible( tabComponent != null 
169
        btnAutoHidePin.setVisible( tabComponent != null 
170
                && !TabDisplayer.ORIENTATION_INVISIBLE.equals( displayer.getWinsysInfo().getOrientation( tabComponent ) ) );
170
                && !TabDisplayer.ORIENTATION_INVISIBLE.equals( displayer.getContainerWinsysInfo().getOrientation( tabComponent ) )
171
                && displayer.getContainerWinsysInfo().isTopComponentSlidingEnabled() );
171
    }
172
    }
172
    
173
    
173
    protected void installControlButtons() {
174
    protected void installControlButtons() {
Lines 199-205 Link Here
199
//            }
200
//            }
200
201
201
            //create autohide/pin button
202
            //create autohide/pin button
202
            if( null != displayer.getWinsysInfo() ) {
203
            if( null != displayer.getContainerWinsysInfo() ) {
203
                btnAutoHidePin = TabControlButtonFactory.createSlidePinButton( displayer );
204
                btnAutoHidePin = TabControlButtonFactory.createSlidePinButton( displayer );
204
                buttonsPanel.add( btnAutoHidePin );
205
                buttonsPanel.add( btnAutoHidePin );
205
206
Lines 210-225 Link Here
210
                width += icon.getIconWidth();
211
                width += icon.getIconWidth();
211
            }
212
            }
212
213
213
            //create close button
214
            if( null == displayer.getContainerWinsysInfo() 
214
            btnClose = TabControlButtonFactory.createCloseButton( displayer );
215
                    || displayer.getContainerWinsysInfo().isTopComponentClosingEnabled() ) {
215
            buttonsPanel.add( btnClose );
216
                //create close button
217
                btnClose = TabControlButtonFactory.createCloseButton( displayer );
218
                buttonsPanel.add( btnClose );
216
219
217
            Icon icon = btnClose.getIcon();
220
                Icon icon = btnClose.getIcon();
218
            if( 0 != width )
221
                if( 0 != width )
219
                width += ICON_X_PAD;
222
                    width += ICON_X_PAD;
220
            btnClose.setBounds( width, 0, icon.getIconWidth(), icon.getIconHeight() );
223
                btnClose.setBounds( width, 0, icon.getIconWidth(), icon.getIconHeight() );
221
            width += icon.getIconWidth();
224
                width += icon.getIconWidth();
222
            height = icon.getIconHeight();
225
                height = icon.getIconHeight();
226
            }
223
            
227
            
224
            Dimension size = new Dimension( width, height );
228
            Dimension size = new Dimension( width, height );
225
            buttonsPanel.setMinimumSize( size );
229
            buttonsPanel.setMinimumSize( size );
Lines 520-525 Link Here
520
        }
524
        }
521
        
525
        
522
        return -1;
526
        return -1;
527
    }
528
529
    @Override
530
    public Dimension getMinimumSize(JComponent c) {
531
        int index = displayer.getSelectionModel().getSelectedIndex();
532
        TabDataModel model = displayer.getModel();
533
        if( index < 0 || index >= model.size() )
534
            index = 0;
535
        Dimension minSize = null;
536
        if( index >= model.size() )
537
            minSize = new Dimension( 100, 10 );
538
        else
539
            minSize = model.getTab(index).getComponent().getMinimumSize();
540
        minSize.width = Math.max(minSize.width, 100);
541
        minSize.height = Math.max(minSize.height, 10);
542
        return minSize;
523
    }
543
    }
524
    
544
    
525
    protected int createRepaintPolicy () {
545
    protected int createRepaintPolicy () {
(-)a/o.n.swing.tabcontrol/src/org/netbeans/swing/tabcontrol/plaf/BasicScrollingTabDisplayerUI.java (-6 / +19 lines)
Lines 53-58 Link Here
53
import java.awt.event.*;
53
import java.awt.event.*;
54
import java.awt.image.BufferedImage;
54
import java.awt.image.BufferedImage;
55
import java.lang.ref.SoftReference;
55
import java.lang.ref.SoftReference;
56
import org.netbeans.swing.tabcontrol.TabDataModel;
56
57
57
/**
58
/**
58
 * Base class for tab displayers that have scrollable tabs.
59
 * Base class for tab displayers that have scrollable tabs.
Lines 188-194 Link Here
188
            height = Math.max ( height, prefDim.height );
189
            height = Math.max ( height, prefDim.height );
189
            
190
            
190
            //maximize / restore button
191
            //maximize / restore button
191
            if( null != displayer.getWinsysInfo() ) {
192
            if( null != displayer.getContainerWinsysInfo() ) {
192
                width += 3;
193
                width += 3;
193
                btnMaximizeRestore = TabControlButtonFactory.createMaximizeRestoreButton( displayer, isGTK );
194
                btnMaximizeRestore = TabControlButtonFactory.createMaximizeRestoreButton( displayer, isGTK );
194
                buttonsPanel.add( btnMaximizeRestore );
195
                buttonsPanel.add( btnMaximizeRestore );
Lines 242-251 Link Here
242
    protected void installControlButtons() {
243
    protected void installControlButtons() {
243
        displayer.setLayout(createLayout());
244
        displayer.setLayout(createLayout());
244
        displayer.add(getControlButtons());
245
        displayer.add(getControlButtons());
245
    }
246
247
    public Dimension getMinimumSize(JComponent c) {
248
        return getPreferredSize(c);
249
    }
246
    }
250
247
251
    /**
248
    /**
Lines 375-380 Link Here
375
        return new Rectangle( parent.getWidth()-c.getWidth(), 0, c.getWidth(), c.getHeight() );
372
        return new Rectangle( parent.getWidth()-c.getWidth(), 0, c.getWidth(), c.getHeight() );
376
    }
373
    }
377
    
374
    
375
    @Override
376
    public Dimension getMinimumSize(JComponent c) {
377
        int index = displayer.getSelectionModel().getSelectedIndex();
378
        TabDataModel model = displayer.getModel();
379
        if( index < 0 || index >= model.size() )
380
            index = 0;
381
        Dimension minSize = null;
382
        if( index >= model.size() )
383
            minSize = new Dimension( 100, 10 );
384
        else
385
            minSize = model.getTab(index).getComponent().getMinimumSize();
386
        minSize.width = Math.max(minSize.width, 100);
387
        minSize.height = Math.max(minSize.height, 10);
388
        return minSize;
389
    }
390
    
378
    /**
391
    /**
379
     * Layout manager for the tab displayer to make sure that control buttons
392
     * Layout manager for the tab displayer to make sure that control buttons
380
     * are always displayed at the end of the tab list.
393
     * are always displayed at the end of the tab list.
Lines 392-398 Link Here
392
        }
405
        }
393
406
394
        public Dimension minimumLayoutSize(Container parent) {
407
        public Dimension minimumLayoutSize(Container parent) {
395
            return getPreferredSize((JComponent) parent);
408
            return getMinimumSize((JComponent) parent);
396
        }
409
        }
397
410
398
        public Dimension preferredLayoutSize(Container parent) {
411
        public Dimension preferredLayoutSize(Container parent) {
(-)a/o.n.swing.tabcontrol/src/org/netbeans/swing/tabcontrol/plaf/BasicTabDisplayerUI.java (+3 lines)
Lines 141-146 Link Here
141
        super.install();
141
        super.install();
142
        tabState = createTabState();
142
        tabState = createTabState();
143
        defaultRenderer = createDefaultRenderer();
143
        defaultRenderer = createDefaultRenderer();
144
        if( null != displayer.getContainerWinsysInfo() ) {
145
            defaultRenderer.setShowCloseButton( displayer.getContainerWinsysInfo().isTopComponentClosingEnabled() );
146
        }
144
        layoutModel.setPadding (defaultRenderer.getPadding());
147
        layoutModel.setPadding (defaultRenderer.getPadding());
145
        pixelsToAdd = defaultRenderer.getPixelsToAddToSelection();
148
        pixelsToAdd = defaultRenderer.getPixelsToAddToSelection();
146
        repaintPolicy = createRepaintPolicy();
149
        repaintPolicy = createRepaintPolicy();
(-)a/o.n.swing.tabcontrol/src/org/netbeans/swing/tabcontrol/plaf/DefaultTabbedContainerUI.java (-2 / +2 lines)
Lines 88-94 Link Here
88
import org.netbeans.swing.tabcontrol.TabDisplayer;
88
import org.netbeans.swing.tabcontrol.TabDisplayer;
89
import org.netbeans.swing.tabcontrol.TabbedContainer;
89
import org.netbeans.swing.tabcontrol.TabbedContainer;
90
import org.netbeans.swing.tabcontrol.TabbedContainerUI;
90
import org.netbeans.swing.tabcontrol.TabbedContainerUI;
91
import org.netbeans.swing.tabcontrol.WinsysInfoForTabbed;
91
import org.netbeans.swing.tabcontrol.WinsysInfoForTabbedContainer;
92
import org.netbeans.swing.tabcontrol.event.ArrayDiff;
92
import org.netbeans.swing.tabcontrol.event.ArrayDiff;
93
import org.netbeans.swing.tabcontrol.event.ComplexListDataEvent;
93
import org.netbeans.swing.tabcontrol.event.ComplexListDataEvent;
94
import org.netbeans.swing.tabcontrol.event.ComplexListDataListener;
94
import org.netbeans.swing.tabcontrol.event.ComplexListDataListener;
Lines 427-433 Link Here
427
     */
427
     */
428
    protected TabDisplayer createTabDisplayer() {
428
    protected TabDisplayer createTabDisplayer() {
429
        TabDisplayer result = null;
429
        TabDisplayer result = null;
430
        WinsysInfoForTabbed winsysInfo = container.getWinsysInfo();
430
        WinsysInfoForTabbedContainer winsysInfo = container.getContainerWinsysInfo();
431
        if (winsysInfo != null) {
431
        if (winsysInfo != null) {
432
            result = new TabDisplayer(
432
            result = new TabDisplayer(
433
                    container.getModel(), container.getType(), winsysInfo);
433
                    container.getModel(), container.getType(), winsysInfo);
(-)a/o.n.swing.tabcontrol/src/org/netbeans/swing/tabcontrol/plaf/TabControlButtonFactory.java (-2 / +5 lines)
Lines 62-67 Link Here
62
import org.netbeans.swing.tabcontrol.TabDisplayer;
62
import org.netbeans.swing.tabcontrol.TabDisplayer;
63
import org.netbeans.swing.tabcontrol.TabListPopupAction;
63
import org.netbeans.swing.tabcontrol.TabListPopupAction;
64
import org.netbeans.swing.tabcontrol.WinsysInfoForTabbed;
64
import org.netbeans.swing.tabcontrol.WinsysInfoForTabbed;
65
import org.netbeans.swing.tabcontrol.WinsysInfoForTabbedContainer;
65
66
66
/**
67
/**
67
 * A factory to create tab control buttons.
68
 * A factory to create tab control buttons.
Lines 151-161 Link Here
151
            return TabDisplayer.COMMAND_ENABLE_AUTO_HIDE;
152
            return TabDisplayer.COMMAND_ENABLE_AUTO_HIDE;
152
        }
153
        }
153
154
155
        @Override
154
        protected int getButtonId() {
156
        protected int getButtonId() {
155
            int retValue = TabControlButton.ID_PIN_BUTTON;
157
            int retValue = TabControlButton.ID_PIN_BUTTON;
156
            Component currentTab = getActiveTab( getTabDisplayer() );
158
            Component currentTab = getActiveTab( getTabDisplayer() );
157
            if( null != currentTab ) {
159
            if( null != currentTab ) {
158
                WinsysInfoForTabbed winsysInfo = getTabDisplayer().getWinsysInfo();
160
                WinsysInfoForTabbedContainer winsysInfo = getTabDisplayer().getContainerWinsysInfo();
159
                if( null != winsysInfo ) {
161
                if( null != winsysInfo ) {
160
                    Object orientation = winsysInfo.getOrientation( currentTab );
162
                    Object orientation = winsysInfo.getOrientation( currentTab );
161
                    if( TabDisplayer.ORIENTATION_EAST.equals( orientation ) ) 
163
                    if( TabDisplayer.ORIENTATION_EAST.equals( orientation ) ) 
Lines 189-199 Link Here
189
            return TabDisplayer.COMMAND_MAXIMIZE;
191
            return TabDisplayer.COMMAND_MAXIMIZE;
190
        }
192
        }
191
193
194
        @Override
192
        protected int getButtonId() {
195
        protected int getButtonId() {
193
            int retValue = TabControlButton.ID_MAXIMIZE_BUTTON;
196
            int retValue = TabControlButton.ID_MAXIMIZE_BUTTON;
194
            Component currentTab = getActiveTab( getTabDisplayer() );
197
            Component currentTab = getActiveTab( getTabDisplayer() );
195
            if( null != currentTab ) {
198
            if( null != currentTab ) {
196
                WinsysInfoForTabbed winsysInfo = getTabDisplayer().getWinsysInfo();
199
                WinsysInfoForTabbedContainer winsysInfo = getTabDisplayer().getContainerWinsysInfo();
197
                if( null != winsysInfo ) {
200
                if( null != winsysInfo ) {
198
                    if( winsysInfo.inMaximizedMode( currentTab ) ) {
201
                    if( winsysInfo.inMaximizedMode( currentTab ) ) {
199
                        retValue = TabControlButton.ID_RESTORE_BUTTON;
202
                        retValue = TabControlButton.ID_RESTORE_BUTTON;
(-)a/openide.windows/apichanges.xml (+26 lines)
Lines 47-52 Link Here
47
<apidef name="winsys">Window System API</apidef>
47
<apidef name="winsys">Window System API</apidef>
48
</apidefs>
48
</apidefs>
49
<changes>
49
<changes>
50
51
<change id="winsys_customizations">
52
    <api name="winsys"/>
53
    <summary>Added a group of resource bundle properties for customization
54
    of window system behavior.</summary>
55
    <version major="6" minor="23"/>
56
    <date day="6" month="6" year="2008"/>
57
    <author login="saubrecht"/>
58
    <compatibility addition="yes" binary="compatible" source="compatible" semantic="compatible" deprecation="no" deletion="no" modification="no"/>
59
    <description>
60
	<p>There is a set of new properties defined in resource bundle which platform 
61
        developers can use to customize the behavior of NetBeans' window system:</p>
62
        <ul>
63
            <li>Disable window drag and drop</li>
64
            <li>Disable window undocking (floating windows)</li>
65
            <li>Disable window sliding</li>
66
            <li>Disable window resizing</li>
67
            <li>Disable window maximization</li>
68
            <li>Disable closing of non-editor windows (views)</li>
69
            <li>Disable closing of editor windows</li>
70
            <li>Force window system into respecting window minimum sizes when resizing windows using splitter bars</li>
71
        </ul>
72
        <p>The features above can be turned on/off simply by branding of core.windows module.</p>
73
    </description>
74
    <issue number="136636"/>
75
</change>
50
76
51
<change id="keep_preferred_size_when_slided_in">
77
<change id="keep_preferred_size_when_slided_in">
52
    <api name="winsys"/>
78
    <api name="winsys"/>
(-)a/openide.windows/arch.xml (+67 lines)
Lines 578-583 Link Here
578
                will receive the keystroke.
578
                will receive the keystroke.
579
            </p>
579
            </p>
580
        </api>
580
        </api>
581
    
582
    <api type="export" group="property" name="org.netbeans.core.windows.TopComponent.DragAndDrop.Enabled" category="stable">
583
         Name of resource bundle property which disables the drag and drop of window
584
         TopComponents when its value is set to <code>false</code>, the default value is <code>true</code>.
585
         The property value can be adjusted by branding of <code>org.netbeans.core.windows</code> module.
586
    </api>
587
    
588
    <api type="export" group="property" name="org.netbeans.core.windows.TopComponent.Undocking.Enabled" category="stable">
589
         Name of resource bundle property which disables undocking of window
590
         TopComponents when its value is set to <code>false</code>, the default value is <code>true</code>.
591
         When this feature is disabled then there is no 'Undock' item in TopComponent popup menu
592
         and 'Undock Window' action the main menu is disabled.
593
         The property value can be adjusted by branding of <code>org.netbeans.core.windows</code> module.
594
    </api>
595
    
596
    <api type="export" group="property" name="org.netbeans.core.windows.TopComponent.Sliding.Enabled" category="stable">
597
         Name of resource bundle property which disables sliding of window
598
         TopComponents when its value is set to <code>false</code>, the default value is <code>true</code>.
599
         When this feature is disabled then there is no 'Minimize Window' item in TopComponent popup menu
600
         and also the Minimize button in TopComponent's header is hidden.
601
         The property value can be adjusted by branding of <code>org.netbeans.core.windows</code> module.
602
    </api>
603
    
604
    <api type="export" group="property" name="org.netbeans.core.windows.TopComponent.Resizing.Enabled" category="stable">
605
         Name of resource bundle property which disables resizing of window
606
         TopComponents when its value is set to <code>false</code>, the default value is <code>true</code>.
607
         When this feature is disabled then it is not possible to drag splitter bars
608
         to change the size of TopComponents.
609
         The property value can be adjusted by branding of <code>org.netbeans.core.windows</code> module.
610
    </api>
611
612
    <api type="export" group="property" name="org.netbeans.core.windows.View.TopComponent.Closing.Enabled" category="stable">
613
         Name of resource bundle property which disables closing of view TopComponents (non-editor windows)
614
         when its value is set to <code>false</code>, the default value is <code>true</code>.
615
         When this feature is disabled then there is no 'Close Window' item in view's popup menu,
616
         there is no close button in TopComponent's header and also 'Close Window' action in 
617
         the main menu is disabled when a view TopComponent is activated.
618
         The property value can be adjusted by branding of <code>org.netbeans.core.windows</code> module.
619
    </api>
620
621
    <api type="export" group="property" name="org.netbeans.core.windows.Editor.TopComponent.Closing.Enabled" category="stable">
622
         Name of resource bundle property which disables closing of editor TopComponents (document windows)
623
         when its value is set to <code>false</code>, the default value is <code>true</code>.
624
         When this feature is disabled then there are no 'Close Window', 'Close All Documents' and 
625
         'Close Other Documents' items in editor's popup menu,
626
         there is no close button in editor's header and also Close actions in 
627
         the main menu are disabled when an editor TopComponent is activated.
628
         The property value can be adjusted by branding of <code>org.netbeans.core.windows</code> module.
629
    </api>
630
631
    <api type="export" group="property" name="org.netbeans.core.windows.TopComponent.Maximization.Enabled" category="stable">
632
         Name of resource bundle property which disables maximization of TopComponents 
633
         when its value is set to <code>false</code>, the default value is <code>true</code>.
634
         When this feature is disabled then there is no 'Maximize Window' item 
635
         in TopComponent's popup menu and also 'Maximize Window' action in 
636
         the main menu is disabled.
637
         The property value can be adjusted by branding of <code>org.netbeans.core.windows</code> module.
638
    </api>
639
640
    <api type="export" group="property" name="org.netbeans.core.windows.Splitter.Respect.MinimumSize.Enabled" category="stable">
641
         Name of resource bundle property which forces splitter to respect TopComponent 
642
         minimum size when resizing when its value is set to <code>true</code>, 
643
         the default value is <code>false</code>.
644
         When this feature is enabled then the splitter bars will not move beyond
645
         the minimum size of its TopComponents.
646
         The property value can be adjusted by branding of <code>org.netbeans.core.windows</code> module.
647
    </api>
581
</answer>
648
</answer>
582
649
583
650
(-)a/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.22
3
OpenIDE-Module-Specification-Version: 6.23
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

Return to bug 136647