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 169099
Collapse All | Expand All

(-)core.windows/manifest.mf (-1 / +1 lines)
Lines 6-10 Link Here
6
OpenIDE-Module-Recommends: org.netbeans.core.windows.nativeaccess.NativeWindowSystem
6
OpenIDE-Module-Recommends: org.netbeans.core.windows.nativeaccess.NativeWindowSystem
7
AutoUpdate-Show-In-Client: false
7
AutoUpdate-Show-In-Client: false
8
AutoUpdate-Essential-Module: true
8
AutoUpdate-Essential-Module: true
9
OpenIDE-Module-Specification-Version: 2.42
9
OpenIDE-Module-Specification-Version: 2.43
10
10
(-)core.windows/nbproject/project.xml (-1 / +1 lines)
Lines 85-91 Link Here
85
                    <build-prerequisite/>
85
                    <build-prerequisite/>
86
                    <compile-dependency/>
86
                    <compile-dependency/>
87
                    <run-dependency>
87
                    <run-dependency>
88
                        <specification-version>1.27</specification-version>
88
                        <specification-version>1.33</specification-version>
89
                    </run-dependency>
89
                    </run-dependency>
90
                </dependency>
90
                </dependency>
91
                <dependency>
91
                <dependency>
(-)core.windows/src/org/netbeans/core/windows/view/dnd/DragAndDropFeedbackVisualizer.java (-1 / +1 lines)
Lines 59-65 Link Here
59
import javax.swing.SwingUtilities;
59
import javax.swing.SwingUtilities;
60
import org.netbeans.core.windows.nativeaccess.NativeWindowSystem;
60
import org.netbeans.core.windows.nativeaccess.NativeWindowSystem;
61
import org.netbeans.core.windows.options.WinSysPrefs;
61
import org.netbeans.core.windows.options.WinSysPrefs;
62
import org.netbeans.core.windows.view.ui.Tabbed;
62
import org.netbeans.swing.tabcontrol.customtabs.Tabbed;
63
63
64
/**
64
/**
65
 *
65
 *
(-)core.windows/src/org/netbeans/core/windows/view/dnd/DragWindow.java (-1 / +1 lines)
Lines 62-68 Link Here
62
import javax.swing.SwingUtilities;
62
import javax.swing.SwingUtilities;
63
import javax.swing.Timer;
63
import javax.swing.Timer;
64
import org.netbeans.core.windows.options.WinSysPrefs;
64
import org.netbeans.core.windows.options.WinSysPrefs;
65
import org.netbeans.core.windows.view.ui.Tabbed;
65
import org.netbeans.swing.tabcontrol.customtabs.Tabbed;
66
66
67
/**
67
/**
68
 *
68
 *
(-)core.windows/src/org/netbeans/core/windows/view/dnd/TopComponentDragSupport.java (-11 / +2 lines)
Lines 47-52 Link Here
47
47
48
48
49
49
50
import org.netbeans.swing.tabcontrol.customtabs.Tabbed;
50
import java.awt.AWTEvent;
51
import java.awt.AWTEvent;
51
import java.awt.Color;
52
import java.awt.Color;
52
import java.awt.Component;
53
import java.awt.Component;
Lines 273-291 Link Here
273
        TopComponent tc = null;
274
        TopComponent tc = null;
274
        Tabbed tabbed;
275
        Tabbed tabbed;
275
276
276
        if(srcComp instanceof Tabbed) {
277
            tabbed = (Tabbed)srcComp;
278
        } else {
279
            tabbed = (Tabbed)SwingUtilities.getAncestorOfClass(Tabbed.class, srcComp);
280
        }
281
        if (tabbed == null) {
282
            if(srcComp instanceof Tabbed.Accessor) {
277
            if(srcComp instanceof Tabbed.Accessor) {
283
                tabbed = ((Tabbed.Accessor)srcComp).getTabbed();
278
                tabbed = ((Tabbed.Accessor)srcComp).getTabbed();
284
            } else {
279
            } else {
285
                Tabbed.Accessor acc = (Tabbed.Accessor)SwingUtilities.getAncestorOfClass(Tabbed.Accessor.class, srcComp);
280
                Tabbed.Accessor acc = (Tabbed.Accessor)SwingUtilities.getAncestorOfClass(Tabbed.Accessor.class, srcComp);
286
                tabbed = acc != null ? acc.getTabbed() : null;
281
                tabbed = acc != null ? acc.getTabbed() : null;
287
            }
282
            }
288
        }
289
        if(tabbed == null) {
283
        if(tabbed == null) {
290
            return;
284
            return;
291
        }
285
        }
Lines 396-408 Link Here
396
        addListening();
390
        addListening();
397
        hackESC = false;
391
        hackESC = false;
398
        
392
        
399
        Tabbed tabbed = (Tabbed) SwingUtilities.getAncestorOfClass (Tabbed.class,
393
        Tabbed tabbed = null;
400
            startingComp);
401
        if (tabbed == null) {
402
            Tabbed.Accessor acc = (Tabbed.Accessor) SwingUtilities.getAncestorOfClass (Tabbed.Accessor.class,
394
            Tabbed.Accessor acc = (Tabbed.Accessor) SwingUtilities.getAncestorOfClass (Tabbed.Accessor.class,
403
                                                                                       startingComp);
395
                                                                                       startingComp);
404
            tabbed = acc != null ? acc.getTabbed() : null;
396
            tabbed = acc != null ? acc.getTabbed() : null;
405
        }
406
        
397
        
407
        int tabIndex = -1;
398
        int tabIndex = -1;
408
        Image img = createDragImage();
399
        Image img = createDragImage();
(-)core.windows/src/org/netbeans/core/windows/view/ui/AbstractModeContainer.java (-1 / +2 lines)
Lines 46-51 Link Here
46
package org.netbeans.core.windows.view.ui;
46
package org.netbeans.core.windows.view.ui;
47
47
48
48
49
import org.netbeans.swing.tabcontrol.customtabs.Tabbed;
49
import org.netbeans.core.windows.Constants;
50
import org.netbeans.core.windows.Constants;
50
import org.netbeans.core.windows.WindowManagerImpl;
51
import org.netbeans.core.windows.WindowManagerImpl;
51
import org.netbeans.core.windows.view.ModeContainer;
52
import org.netbeans.core.windows.view.ModeContainer;
Lines 206-212 Link Here
206
    // Support for TopComponentDroppable
207
    // Support for TopComponentDroppable
207
    protected Shape getIndicationForLocation(Point location) {
208
    protected Shape getIndicationForLocation(Point location) {
208
        return tabbedHandler.getIndicationForLocation(location,
209
        return tabbedHandler.getIndicationForLocation(location,
209
            windowDnDManager.getStartingTransfer(),
210
            windowDnDManager.getStartingTransfer().getTopComponent(),
210
            windowDnDManager.getStartingPoint(),
211
            windowDnDManager.getStartingPoint(),
211
            isAttachingPossible());
212
            isAttachingPossible());
212
    }
213
    }
(-)core.windows/src/org/netbeans/core/windows/view/ui/DefaultSeparateContainer.java (-7 / +7 lines)
Lines 46-51 Link Here
46
package org.netbeans.core.windows.view.ui;
46
package org.netbeans.core.windows.view.ui;
47
47
48
48
49
import org.netbeans.swing.tabcontrol.customtabs.Tabbed;
49
import java.text.MessageFormat;
50
import java.text.MessageFormat;
50
import javax.swing.plaf.basic.BasicHTML;
51
import javax.swing.plaf.basic.BasicHTML;
51
import org.netbeans.core.windows.Constants;
52
import org.netbeans.core.windows.Constants;
Lines 68-73 Link Here
68
import java.util.logging.Logger;
69
import java.util.logging.Logger;
69
import org.netbeans.core.windows.options.WinSysPrefs;
70
import org.netbeans.core.windows.options.WinSysPrefs;
70
import org.netbeans.core.windows.view.dnd.TopComponentDraggable;
71
import org.netbeans.core.windows.view.dnd.TopComponentDraggable;
72
import org.netbeans.swing.tabcontrol.customtabs.TabbedComponentFactory;
73
import org.netbeans.swing.tabcontrol.customtabs.TabbedType;
74
import org.openide.util.Lookup;
71
import org.openide.windows.WindowManager;
75
import org.openide.windows.WindowManager;
72
76
73
77
Lines 118-131 Link Here
118
    
122
    
119
    @Override
123
    @Override
120
    protected Tabbed createTabbed() {
124
    protected Tabbed createTabbed() {
121
        Tabbed tabbed;
125
        TabbedComponentFactory factory = Lookup.getDefault().lookup(TabbedComponentFactory.class);
122
        if(getKind() == Constants.MODE_KIND_EDITOR) {
126
        TabbedType type = getKind() == Constants.MODE_KIND_EDITOR ? TabbedType.Editor : TabbedType.View;
123
            tabbed = new TabbedAdapter(Constants.MODE_KIND_EDITOR);
127
        return factory.createTabbedComponent( type, new TabbedAdapter.WinsysInfo(getKind())).getTabbed();
124
        } else {
125
            tabbed = new TabbedAdapter(Constants.MODE_KIND_VIEW);
126
        }
128
        }
127
        return tabbed;    
128
    }    
129
    
129
    
130
    @Override
130
    @Override
131
    protected void updateTitle (String title) {
131
    protected void updateTitle (String title) {
(-)core.windows/src/org/netbeans/core/windows/view/ui/DefaultSplitContainer.java (-7 / +8 lines)
Lines 46-51 Link Here
46
package org.netbeans.core.windows.view.ui;
46
package org.netbeans.core.windows.view.ui;
47
47
48
48
49
import org.netbeans.swing.tabcontrol.customtabs.Tabbed;
49
import org.netbeans.core.windows.Constants;
50
import org.netbeans.core.windows.Constants;
50
import org.netbeans.core.windows.WindowManagerImpl;
51
import org.netbeans.core.windows.WindowManagerImpl;
51
import org.netbeans.core.windows.view.ModeView;
52
import org.netbeans.core.windows.view.ModeView;
Lines 59-64 Link Here
59
import java.awt.*;
60
import java.awt.*;
60
import org.netbeans.core.windows.ModeImpl;
61
import org.netbeans.core.windows.ModeImpl;
61
import org.netbeans.core.windows.view.dnd.TopComponentDraggable;
62
import org.netbeans.core.windows.view.dnd.TopComponentDraggable;
63
import org.netbeans.swing.tabcontrol.customtabs.TabbedComponentFactory;
64
import org.netbeans.swing.tabcontrol.customtabs.TabbedType;
65
import org.openide.util.Lookup;
62
import org.openide.windows.Mode;
66
import org.openide.windows.Mode;
63
67
64
68
Lines 96-110 Link Here
96
        return panel;
100
        return panel;
97
    }
101
    }
98
    
102
    
103
    @Override
99
    protected Tabbed createTabbed() {
104
    protected Tabbed createTabbed() {
100
        Tabbed tabbed;
105
        TabbedComponentFactory factory = Lookup.getDefault().lookup(TabbedComponentFactory.class);
101
        if(getKind() == Constants.MODE_KIND_EDITOR) {
106
        TabbedType type = getKind() == Constants.MODE_KIND_EDITOR ? TabbedType.Editor : TabbedType.View;
102
            tabbed = new TabbedAdapter(Constants.MODE_KIND_EDITOR);
107
        return factory.createTabbedComponent( type, new TabbedAdapter.WinsysInfo(getKind())).getTabbed();
103
        } else {
104
            tabbed = new TabbedAdapter(Constants.MODE_KIND_VIEW);
105
        }
108
        }
106
        return tabbed;    
107
    }    
108
    
109
    
109
    protected void updateTitle(String title) {
110
    protected void updateTitle(String title) {
110
        // no op
111
        // no op
(-)core.windows/src/org/netbeans/core/windows/view/ui/DefaultTabbedComponentFactory.java (+65 lines)
Line 0 Link Here
1
/*
2
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
3
 *
4
 * Copyright 2012 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 2012 Sun Microsystems, Inc.
41
 */
42
package org.netbeans.core.windows.view.ui;
43
44
import org.netbeans.core.windows.view.ui.tabcontrol.TabbedAdapter;
45
import org.netbeans.swing.tabcontrol.WinsysInfoForTabbedContainer;
46
import org.netbeans.swing.tabcontrol.customtabs.Tabbed.Accessor;
47
import org.netbeans.swing.tabcontrol.customtabs.TabbedComponentFactory;
48
import org.netbeans.swing.tabcontrol.customtabs.TabbedType;
49
import org.openide.util.lookup.ServiceProvider;
50
51
/**
52
 * Factory to create default tab containers.
53
 * 
54
 * @since 2.43
55
 * 
56
 * @author S. Aubrecht
57
 */
58
@ServiceProvider(service=TabbedComponentFactory.class)
59
public class DefaultTabbedComponentFactory implements TabbedComponentFactory {
60
61
    @Override
62
    public Accessor createTabbedComponent( TabbedType type, WinsysInfoForTabbedContainer info ) {
63
        return new TabbedAdapter( type.toInt(), info );
64
    }
65
}
(-)core.windows/src/org/netbeans/core/windows/view/ui/slides/CommandManager.java (-1 / +1 lines)
Lines 459-465 Link Here
459
     * winsys through Tabbed instance
459
     * winsys through Tabbed instance
460
     */
460
     */
461
    private void postEvent(ActionEvent evt) {
461
    private void postEvent(ActionEvent evt) {
462
        ((TabbedSlideAdapter)slideBar.getTabbed()).postActionEvent(evt);
462
        slideBar.getTabbedAdapter().postActionEvent(evt);
463
    }
463
    }
464
    
464
    
465
    private final Action escapeAction = new EscapeAction();
465
    private final Action escapeAction = new EscapeAction();
(-)core.windows/src/org/netbeans/core/windows/view/ui/slides/SlideBar.java (-1 / +5 lines)
Lines 79-85 Link Here
79
import org.netbeans.core.windows.ModeImpl;
79
import org.netbeans.core.windows.ModeImpl;
80
import org.netbeans.core.windows.Switches;
80
import org.netbeans.core.windows.Switches;
81
import org.netbeans.core.windows.WindowManagerImpl;
81
import org.netbeans.core.windows.WindowManagerImpl;
82
import org.netbeans.core.windows.view.ui.Tabbed;
82
import org.netbeans.swing.tabcontrol.customtabs.Tabbed;
83
import org.netbeans.core.windows.view.ui.tabcontrol.TabbedAdapter;
83
import org.netbeans.core.windows.view.ui.tabcontrol.TabbedAdapter;
84
import org.netbeans.swing.tabcontrol.SlideBarDataModel;
84
import org.netbeans.swing.tabcontrol.SlideBarDataModel;
85
import org.netbeans.swing.tabcontrol.SlidingButton;
85
import org.netbeans.swing.tabcontrol.SlidingButton;
Lines 405-410 Link Here
405
    
405
    
406
    @Override
406
    @Override
407
    public Tabbed getTabbed () {
407
    public Tabbed getTabbed () {
408
        return tabbed.getTabbed();
409
    }
410
    
411
    TabbedSlideAdapter getTabbedAdapter() {
408
        return tabbed;
412
        return tabbed;
409
    }
413
    }
410
    
414
    
(-)core.windows/src/org/netbeans/core/windows/view/ui/slides/SlideBarContainer.java (-2 / +2 lines)
Lines 69-75 Link Here
69
import org.netbeans.core.windows.view.ui.AbstractModeContainer;
69
import org.netbeans.core.windows.view.ui.AbstractModeContainer;
70
import org.netbeans.core.windows.view.ui.ModeComponent;
70
import org.netbeans.core.windows.view.ui.ModeComponent;
71
import org.netbeans.core.windows.view.dnd.TopComponentDroppable;
71
import org.netbeans.core.windows.view.dnd.TopComponentDroppable;
72
import org.netbeans.core.windows.view.ui.Tabbed;
72
import org.netbeans.swing.tabcontrol.customtabs.Tabbed;
73
import org.openide.windows.TopComponent;
73
import org.openide.windows.TopComponent;
74
74
75
75
Lines 123-129 Link Here
123
    
123
    
124
    @Override
124
    @Override
125
    protected Tabbed createTabbed() {
125
    protected Tabbed createTabbed() {
126
        return new TabbedSlideAdapter(((SlidingView)modeView).getSide());
126
        return new TabbedSlideAdapter(((SlidingView)modeView).getSide()).getTabbed();
127
    }
127
    }
128
    
128
    
129
    @Override
129
    @Override
(-)core.windows/src/org/netbeans/core/windows/view/ui/slides/TabbedSlideAdapter.java (-118 / +97 lines)
Lines 65-74 Link Here
65
import org.netbeans.core.windows.ModeImpl;
65
import org.netbeans.core.windows.ModeImpl;
66
import org.netbeans.core.windows.WindowManagerImpl;
66
import org.netbeans.core.windows.WindowManagerImpl;
67
import org.netbeans.core.windows.actions.ActionUtils;
67
import org.netbeans.core.windows.actions.ActionUtils;
68
import org.netbeans.core.windows.view.ui.Tabbed;
68
import org.netbeans.swing.tabcontrol.customtabs.Tabbed;
69
import org.netbeans.swing.tabcontrol.DefaultTabDataModel;
69
import org.netbeans.swing.tabcontrol.DefaultTabDataModel;
70
import org.netbeans.core.windows.view.dnd.DragAndDropFeedbackVisualizer;
70
import org.netbeans.core.windows.view.dnd.DragAndDropFeedbackVisualizer;
71
import org.netbeans.core.windows.view.dnd.TopComponentDraggable;
72
import org.netbeans.swing.tabcontrol.SlideBarDataModel;
71
import org.netbeans.swing.tabcontrol.SlideBarDataModel;
73
import org.netbeans.swing.tabcontrol.TabData;
72
import org.netbeans.swing.tabcontrol.TabData;
74
import org.netbeans.swing.tabcontrol.TabDataModel;
73
import org.netbeans.swing.tabcontrol.TabDataModel;
Lines 83-89 Link Here
83
 *
82
 *
84
 * @author Dafe Simonek
83
 * @author Dafe Simonek
85
 */
84
 */
86
public final class TabbedSlideAdapter implements Tabbed {
85
public final class TabbedSlideAdapter implements Tabbed.Accessor {
87
    
86
    
88
    /** data model of informations about top components in container */
87
    /** data model of informations about top components in container */
89
    private TabDataModel dataModel;
88
    private TabDataModel dataModel;
Lines 106-217 Link Here
106
        slidingMode = findSlidingMode();
105
        slidingMode = findSlidingMode();
107
    }
106
    }
108
    
107
    
108
    private final Tabbed tabbedImpl = new Tabbed() {
109
109
    @Override
110
    @Override
110
    public void requestAttention (TopComponent tc) {
111
        public void requestAttention( TopComponent tc ) {
111
        slideBar.setBlinking(tc, true);
112
        slideBar.setBlinking(tc, true);
112
    }
113
    }
113
    
114
    
114
    @Override
115
    @Override
115
    public void cancelRequestAttention (TopComponent tc) {
116
        public void cancelRequestAttention( TopComponent tc ) {
116
        slideBar.setBlinking(tc, false);
117
        slideBar.setBlinking(tc, false);
117
    }
118
    }
118
    
119
    
119
120
        @Override
120
    private void setSide (String side) {
121
        public void addTopComponent( String name, Icon icon, TopComponent tc, String toolTip ) {
121
        int orientation = SlideBarDataModel.WEST;
122
            dataModel.addTab(dataModel.size(), new TabData(tc, icon, name, toolTip));
122
        if (Constants.LEFT.equals(side)) {
123
            orientation = SlideBarDataModel.WEST;
124
        } else if (Constants.RIGHT.equals(side)) {
125
            orientation = SlideBarDataModel.EAST;
126
        } else if (Constants.BOTTOM.equals(side)) {
127
            orientation = SlideBarDataModel.SOUTH;
128
        } else if (Constants.TOP.equals(side)) {
129
            orientation = SlideBarDataModel.NORTH;
130
        }
123
        }
131
        ((SlideBarDataModel)dataModel).setOrientation(orientation);
132
    }
133
124
134
    @Override
125
    @Override
135
    public final synchronized void addActionListener(ActionListener listener) {
126
        public TopComponent getTopComponentAt(int index) {
136
        if (actionListeners == null) {
127
            return (TopComponent)dataModel.getTab(index).getComponent();
137
            actionListeners = new ArrayList<ActionListener>();
138
        }
128
        }
139
        actionListeners.add(listener);
140
    }
141
129
142
    /**
143
     * Remove an action listener.
144
     *
145
     * @param listener The listener to remove.
146
     */
147
    @Override
130
    @Override
148
    public final synchronized void removeActionListener(ActionListener listener) {
131
        public TopComponent[] getTopComponents() {
149
        if (actionListeners != null) {
132
            int size = dataModel.size();
150
            actionListeners.remove(listener);
133
            TopComponent[] result = new TopComponent[size];
151
            if (actionListeners.isEmpty()) {
134
            for (int i=0; i < size; i++) {
152
                actionListeners = null;
135
                result[i] = (TopComponent) dataModel.getTab(i).getComponent();
153
            }
136
            }
137
            return result;
154
        }
138
        }
155
    }
156
139
157
    final void postActionEvent(ActionEvent event) {
140
        @Override
158
        List<ActionListener> list;
141
        public TopComponent getSelectedTopComponent() {
159
        synchronized (this) {
142
            int index = selModel.getSelectedIndex();
160
            if (actionListeners == null)
143
            return index < 0 ? null : (TopComponent)dataModel.getTab(index).getComponent();
161
                return;
162
            list = Collections.unmodifiableList(actionListeners);
163
        }
144
        }
164
        for (int i = 0; i < list.size(); i++) {
165
            list.get(i).actionPerformed(event);
166
        }
167
    }
168
    
145
    
169
    @Override
146
    @Override
170
    public void addChangeListener(ChangeListener listener) {
147
        public void addChangeListener( ChangeListener listener ) {
171
        cs.addChangeListener(listener);
148
        cs.addChangeListener(listener);
172
    }    
149
    }    
173
    
150
    
174
    @Override
151
    @Override
175
    public void removeChangeListener(ChangeListener listener) {
152
        public void removeChangeListener( ChangeListener listener ) {
176
        cs.removeChangeListener(listener);
153
        cs.removeChangeListener(listener);
177
    }
154
    }
178
    
155
    
179
    final void postSelectionEvent() {
180
        cs.fireChange();
181
    }
182
    
183
    public void addPropertyChangeListener(String name, PropertyChangeListener listener) {
184
        slideBar.addPropertyChangeListener(name, listener);
185
    }
186
    
187
    public void removePropertyChangeListener(String name, PropertyChangeListener listener) {
188
        slideBar.removePropertyChangeListener(name, listener);
189
    }
190
    
191
    @Override
156
    @Override
192
    public void addTopComponent(String name, Icon icon, TopComponent tc, String toolTip) {
157
        public void addActionListener( ActionListener al ) {
193
        dataModel.addTab(dataModel.size(), new TabData(tc, icon, name, toolTip));
158
            if (actionListeners == null) {
159
                actionListeners = new ArrayList<ActionListener>();
194
    }
160
    }
195
    
161
            actionListeners.add(al);
196
    @Override
197
    public TopComponent getSelectedTopComponent() {
198
        int index = selModel.getSelectedIndex();
199
        return index < 0 ? null : (TopComponent)dataModel.getTab(index).getComponent();
200
    }
162
    }
201
    
163
    
202
    @Override
164
    @Override
203
    public TopComponent getTopComponentAt(int index) {
165
        public void removeActionListener( ActionListener al ) {
204
        return (TopComponent)dataModel.getTab(index).getComponent();
166
            if (actionListeners != null) {
167
                actionListeners.remove(al);
168
                if (actionListeners.isEmpty()) {
169
                    actionListeners = null;
205
    }
170
    }
206
    
207
    @Override
208
    public TopComponent[] getTopComponents() {
209
        int size = dataModel.size();
210
        TopComponent[] result = new TopComponent[size];
211
        for (int i=0; i < size; i++) {
212
            result[i] = (TopComponent) dataModel.getTab(i).getComponent();
213
        }
171
        }
214
        return result;
215
    }
172
    }
216
    
173
    
217
    @Override
174
    @Override
Lines 304-311 Link Here
304
        return slideBar;
261
        return slideBar;
305
    }
262
    }
306
263
307
/*************** No DnD support yet **************/
308
    
309
    @Override
264
    @Override
310
    public Object getConstraintForLocation(Point location, boolean attachingPossible) {
265
    public Object getConstraintForLocation(Point location, boolean attachingPossible) {
311
        int tab = slideBar.nextTabForCoordinate(location.x, location.y);
266
        int tab = slideBar.nextTabForCoordinate(location.x, location.y);
Lines 313-319 Link Here
313
    }
268
    }
314
    
269
    
315
    @Override
270
    @Override
316
    public Shape getIndicationForLocation(Point location, TopComponentDraggable startingTransfer, 
271
        public Shape getIndicationForLocation(Point location, TopComponent startingTransfer, 
317
                            Point startingPoint, boolean attachingPossible) {
272
                            Point startingPoint, boolean attachingPossible) {
318
        
273
        
319
//        int tab = tabForCoordinate(location);
274
//        int tab = tabForCoordinate(location);
Lines 376-409 Link Here
376
        return null;
331
        return null;
377
    }
332
    }
378
    
333
    
379
    public DragAndDropFeedbackVisualizer getDragAndDropFeedbackVisualizer( int tabIndex ) {
334
        @Override
380
        slideBar.getSelectionModel().setSelectedIndex(tabIndex);
335
        public Rectangle getTabBounds(int tabIndex) {
381
        return new DragAndDropFeedbackVisualizer( this, tabIndex );
336
            return slideBar.getTabBounds(tabIndex);
382
//        TabData dt = slideBar.getModel().getTab(tabIndex);
383
//        if (dt.getComponent() instanceof TopComponent) {
384
//            DefaultTabDataModel tempModel = new DefaultTabDataModel( new TabData[] { dt } );
385
//            TabbedContainer temp = new TabbedContainer( tempModel, TabbedContainer.TYPE_VIEW );
386
//JWindow w = new JWindow();
387
//w.setBounds(-2000, -2000, 300, 300);
388
//w.getContentPane().add( temp );     
389
//w.setVisible(true);       
390
////temp.setSize( 300,300 );
391
////temp.setLocation( -10000,-10000);
392
////temp.setVisible(true);
393
////temp.invalidate();
394
////temp.revalidate();
395
////temp.repaint();
396
////            temp.updateUI();
397
////temp.getSelectionModel().setSelectedIndex(0);
398
//            
399
//    Window drag = temp.createDragWindow(0);
400
////    w.dispose();
401
//return drag;
402
//        }
403
//        
404
//        return null;
405
    }
337
    }
406
    
338
    
339
        @Override
340
        public boolean isTransparent() {
341
            return false;
342
        }
343
344
        @Override
345
        public void setTransparent(boolean transparent) {
346
            throw new UnsupportedOperationException("Not supported yet.");
347
        }
348
349
        @Override
350
        public Rectangle getTabsArea() {
351
            Rectangle res = slideBar.getBounds();
352
            res.setLocation( 0, 0 );
353
            return res;
354
        }
355
407
    /** Add action for disabling slide */
356
    /** Add action for disabling slide */
408
    @Override
357
    @Override
409
    public Action[] getPopupActions(Action[] defaultActions, int tabIndex) {
358
    public Action[] getPopupActions(Action[] defaultActions, int tabIndex) {
Lines 419-447 Link Here
419
        }
368
        }
420
        return result;
369
        return result;
421
    }
370
    }
371
    };
422
    
372
    
423
    @Override
373
    private void setSide (String side) {
424
    public Rectangle getTabBounds(int tabIndex) {
374
        int orientation = SlideBarDataModel.WEST;
425
        return slideBar.getTabBounds(tabIndex);
375
        if (Constants.LEFT.equals(side)) {
376
            orientation = SlideBarDataModel.WEST;
377
        } else if (Constants.RIGHT.equals(side)) {
378
            orientation = SlideBarDataModel.EAST;
379
        } else if (Constants.BOTTOM.equals(side)) {
380
            orientation = SlideBarDataModel.SOUTH;
381
        } else if (Constants.TOP.equals(side)) {
382
            orientation = SlideBarDataModel.NORTH;
426
    }
383
    }
384
        ((SlideBarDataModel)dataModel).setOrientation(orientation);
385
    }
427
386
428
    @Override
387
    final void postActionEvent(ActionEvent event) {
429
    public boolean isTransparent() {
388
        List<ActionListener> list;
430
        return false;
389
        synchronized (this) {
390
            if (actionListeners == null)
391
                return;
392
            list = Collections.unmodifiableList(actionListeners);
431
    }
393
    }
394
        for (int i = 0; i < list.size(); i++) {
395
            list.get(i).actionPerformed(event);
396
        }
397
    }
432
398
433
    @Override
399
    final void postSelectionEvent() {
434
    public void setTransparent(boolean transparent) {
400
        cs.fireChange();
435
        throw new UnsupportedOperationException("Not supported yet.");
436
    }
401
    }
437
402
438
    @Override
403
    public void addPropertyChangeListener(String name, PropertyChangeListener listener) {
439
    public Rectangle getTabsArea() {
404
        slideBar.addPropertyChangeListener(name, listener);
440
        Rectangle res = slideBar.getBounds();
441
        res.setLocation( 0, 0 );
442
        return res;
443
    }
405
    }
444
    
406
    
407
    public void removePropertyChangeListener(String name, PropertyChangeListener listener) {
408
        slideBar.removePropertyChangeListener(name, listener);
409
    }
410
    
411
    
412
    
413
    public DragAndDropFeedbackVisualizer getDragAndDropFeedbackVisualizer( int tabIndex ) {
414
        slideBar.getSelectionModel().setSelectedIndex(tabIndex);
415
        return new DragAndDropFeedbackVisualizer( tabbedImpl, tabIndex );
416
    }
417
    
418
    
445
    final ModeImpl getSlidingMode() {
419
    final ModeImpl getSlidingMode() {
446
        return slidingMode;
420
        return slidingMode;
447
    }
421
    }
Lines 470-474 Link Here
470
        return ((SlideBarDataModel)dataModel).getOrientation() == SlideBarDataModel.SOUTH 
444
        return ((SlideBarDataModel)dataModel).getOrientation() == SlideBarDataModel.SOUTH 
471
                || ((SlideBarDataModel)dataModel).getOrientation() == SlideBarDataModel.NORTH;
445
                || ((SlideBarDataModel)dataModel).getOrientation() == SlideBarDataModel.NORTH;
472
    }
446
    }
447
448
    @Override
449
    public Tabbed getTabbed() {
450
        return tabbedImpl;
473
}
451
}
452
}
474
453
(-)core.windows/src/org/netbeans/core/windows/view/ui/Tabbed.java (-144 lines)
Lines 1-144 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
 * 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
 * Contributor(s):
28
 *
29
 * The Original Software is NetBeans. The Initial Developer of the Original
30
 * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
31
 * Microsystems, Inc. All Rights Reserved.
32
 *
33
 * If you wish your version of this file to be governed by only the CDDL
34
 * or only the GPL Version 2, indicate your decision by adding
35
 * "[Contributor] elects to include this software in this distribution
36
 * under the [CDDL or GPL Version 2] license." If you do not indicate a
37
 * single choice of license, a recipient has the option to distribute
38
 * your version of this file under either the CDDL, the GPL Version 2 or
39
 * to extend the choice of license to its licensees as provided above.
40
 * However, if you add GPL Version 2 code and therefore, elected the GPL
41
 * Version 2 license, then the option applies only if the new code is
42
 * made subject to such option by the copyright holder.
43
 */
44
45
46
package org.netbeans.core.windows.view.ui;
47
48
49
import org.openide.windows.TopComponent;
50
51
import javax.swing.*;
52
import javax.swing.event.ChangeListener;
53
import java.awt.*;
54
import java.awt.event.ActionListener;
55
import org.netbeans.core.windows.view.dnd.TopComponentDraggable;
56
57
58
/**
59
 * Interface describing component which is used inside <code>SimpleContainer</code>.
60
 * There will be at two implementations one for view and second one for editor type.
61
 *
62
 * @author  Peter Zavadsky
63
 */
64
public interface Tabbed {
65
66
    public void requestAttention(TopComponent tc);
67
68
    public void cancelRequestAttention(TopComponent tc);
69
    
70
    public void addTopComponent(String name, Icon icon, TopComponent tc, String toolTip);
71
72
    public void insertComponent(String name, Icon icon, Component comp, String toolTip, int position);
73
    
74
    public void setTopComponents(TopComponent[] tcs, TopComponent selected);
75
    
76
    public int getTabCount();
77
    
78
    public TopComponent[] getTopComponents();
79
    
80
    public TopComponent getTopComponentAt(int index);
81
    
82
    public int indexOf(Component tc);
83
    
84
    public void removeComponent(Component comp);
85
    
86
    public void setTitleAt(int index, String title);
87
    
88
    public void setIconAt(int index, Icon icon);
89
    
90
    public void setToolTipTextAt(int index, String toolTip);
91
    
92
    public void setSelectedComponent(Component comp);
93
    
94
    public TopComponent getSelectedTopComponent();
95
96
    public void addChangeListener(ChangeListener listener);
97
    
98
    public void removeChangeListener(ChangeListener listener);
99
100
    public void addActionListener (ActionListener al);
101
102
    public void removeActionListener (ActionListener al);
103
104
    public void setActive(boolean active);
105
    
106
    public int tabForCoordinate(Point p);
107
   
108
    public Shape getIndicationForLocation(Point location, TopComponentDraggable startingTransfer,
109
            Point startingPoint, boolean attachingPossible);
110
    
111
    public Object getConstraintForLocation(Point location, boolean attachingPossible);
112
    
113
    public Image createImageOfTab (int tabIndex);
114
    
115
    /** Accessor for visual component holding components */
116
    public Component getComponent();
117
    
118
    /** Allows tabbed implementors to speficy content of popup menu on tab
119
     * with given index. Incoming actions are default set by winsys
120
     */
121
    public Action[] getPopupActions(Action[] defaultActions, int tabIndex);
122
    
123
    /** Returns bounds of tab with given index */
124
    public Rectangle getTabBounds(int tabIndex);
125
    
126
    /**
127
     * @return Bounds of the area which displays the tab headers.
128
     * @since 2.32
129
     */
130
    public Rectangle getTabsArea();
131
    
132
    public boolean isTransparent();
133
    
134
    public void setTransparent( boolean transparent );
135
    
136
    /** Interface for simple accessing of Tabbed instance */
137
    public interface Accessor {
138
139
        public Tabbed getTabbed ();
140
141
    } // end of Accessor
142
143
}
144
(-)core.windows/src/org/netbeans/core/windows/view/ui/TabbedHandler.java (-4 / +4 lines)
Lines 46-51 Link Here
46
package org.netbeans.core.windows.view.ui;
46
package org.netbeans.core.windows.view.ui;
47
47
48
48
49
import org.netbeans.swing.tabcontrol.customtabs.Tabbed;
49
import org.netbeans.core.windows.Constants;
50
import org.netbeans.core.windows.Constants;
50
import org.netbeans.core.windows.actions.ActionUtils;
51
import org.netbeans.core.windows.actions.ActionUtils;
51
import org.netbeans.core.windows.actions.MaximizeWindowAction;
52
import org.netbeans.core.windows.actions.MaximizeWindowAction;
Lines 69-75 Link Here
69
import java.util.logging.Logger;
70
import java.util.logging.Logger;
70
import org.netbeans.core.windows.ModeImpl;
71
import org.netbeans.core.windows.ModeImpl;
71
import org.netbeans.core.windows.Switches;
72
import org.netbeans.core.windows.Switches;
72
import org.netbeans.core.windows.view.dnd.TopComponentDraggable;
73
import org.netbeans.core.windows.view.ui.slides.SlideBar;
73
import org.netbeans.core.windows.view.ui.slides.SlideBar;
74
import org.netbeans.core.windows.view.ui.slides.SlideBarActionEvent;
74
import org.netbeans.core.windows.view.ui.slides.SlideBarActionEvent;
75
import org.netbeans.core.windows.view.ui.slides.SlideOperationFactory;
75
import org.netbeans.core.windows.view.ui.slides.SlideOperationFactory;
Lines 299-305 Link Here
299
    }
299
    }
300
    
300
    
301
    // DnD>>
301
    // DnD>>
302
    public Shape getIndicationForLocation(Point location, TopComponentDraggable startingTransfer,
302
    public Shape getIndicationForLocation(Point location, TopComponent startingTransfer,
303
    Point startingPoint, boolean attachingPossible) {
303
    Point startingPoint, boolean attachingPossible) {
304
        return tabbed.getIndicationForLocation(location, startingTransfer,
304
        return tabbed.getIndicationForLocation(location, startingTransfer,
305
                                            startingPoint, attachingPossible);
305
                                            startingPoint, attachingPossible);
Lines 463-475 Link Here
463
    /** Possibly invokes the (un)maximization. */
463
    /** Possibly invokes the (un)maximization. */
464
    public static void handleMaximization(TabActionEvent tae) {
464
    public static void handleMaximization(TabActionEvent tae) {
465
        Component c = (Component) tae.getSource();
465
        Component c = (Component) tae.getSource();
466
        while (c != null && !(c instanceof Tabbed))
466
        while (c != null && !(c instanceof Tabbed.Accessor))
467
            c = c.getParent();
467
            c = c.getParent();
468
        if (c == null) {
468
        if (c == null) {
469
            return;
469
            return;
470
        }
470
        }
471
        
471
        
472
        final Tabbed tab = (Tabbed) c;
472
        final Tabbed tab = ((Tabbed.Accessor) c).getTabbed();
473
        TopComponent tc = tab.getTopComponentAt(tae.getTabIndex());
473
        TopComponent tc = tab.getTopComponentAt(tae.getTabIndex());
474
        // perform action
474
        // perform action
475
        MaximizeWindowAction mwa = new MaximizeWindowAction(tc);
475
        MaximizeWindowAction mwa = new MaximizeWindowAction(tc);
(-)core.windows/src/org/netbeans/core/windows/view/ui/tabcontrol/TabbedAdapter.java (-244 / +306 lines)
Lines 52-58 Link Here
52
import org.netbeans.core.windows.Constants;
52
import org.netbeans.core.windows.Constants;
53
import org.netbeans.core.windows.Debug;
53
import org.netbeans.core.windows.Debug;
54
import org.netbeans.core.windows.WindowManagerImpl;
54
import org.netbeans.core.windows.WindowManagerImpl;
55
import org.netbeans.core.windows.view.ui.Tabbed;
55
import org.netbeans.swing.tabcontrol.customtabs.Tabbed;
56
import org.netbeans.swing.tabcontrol.ComponentConverter;
56
import org.netbeans.swing.tabcontrol.ComponentConverter;
57
import org.netbeans.swing.tabcontrol.TabData;
57
import org.netbeans.swing.tabcontrol.TabData;
58
import org.netbeans.swing.tabcontrol.TabbedContainer;
58
import org.netbeans.swing.tabcontrol.TabbedContainer;
Lines 64-75 Link Here
64
import javax.swing.event.ChangeEvent;
64
import javax.swing.event.ChangeEvent;
65
import javax.swing.event.ChangeListener;
65
import javax.swing.event.ChangeListener;
66
import java.awt.*;
66
import java.awt.*;
67
import java.util.ArrayList;
67
import java.awt.event.ActionListener;
68
import java.util.Arrays;
68
import java.util.Arrays;
69
import org.netbeans.core.windows.ModeImpl;
69
import org.netbeans.core.windows.ModeImpl;
70
import org.netbeans.core.windows.Switches;
70
import org.netbeans.core.windows.Switches;
71
import org.netbeans.core.windows.actions.ActionUtils;
71
import org.netbeans.core.windows.actions.ActionUtils;
72
import org.netbeans.core.windows.view.dnd.TopComponentDraggable;
73
import org.netbeans.swing.tabcontrol.TabDisplayer;
72
import org.netbeans.swing.tabcontrol.TabDisplayer;
74
import org.netbeans.swing.tabcontrol.WinsysInfoForTabbedContainer;
73
import org.netbeans.swing.tabcontrol.WinsysInfoForTabbedContainer;
75
import org.netbeans.swing.tabcontrol.event.TabActionEvent;
74
import org.netbeans.swing.tabcontrol.event.TabActionEvent;
Lines 81-87 Link Here
81
 *
80
 *
82
 * @author  Tim Boudreau
81
 * @author  Tim Boudreau
83
 */
82
 */
84
public class TabbedAdapter extends TabbedContainer implements Tabbed, Tabbed.Accessor, SlideController {
83
public class TabbedAdapter extends TabbedContainer implements Tabbed.Accessor, SlideController {
85
    
84
    
86
    public static final int DOCUMENT = 1;
85
    public static final int DOCUMENT = 1;
87
    
86
    
Lines 93-100 Link Here
93
    private PropertyChangeListener tooltipListener, weakTooltipListener;
92
    private PropertyChangeListener tooltipListener, weakTooltipListener;
94
93
95
    /** Creates a new instance of TabbedAdapter */
94
    /** Creates a new instance of TabbedAdapter */
96
    public TabbedAdapter (int type) {
95
    public TabbedAdapter (int type, WinsysInfoForTabbedContainer winsysInfo) {
97
        super (null, type, new WinsysInfo(type));
96
        super (null, type, winsysInfo);
98
        getSelectionModel().addChangeListener(new ChangeListener() {
97
        getSelectionModel().addChangeListener(new ChangeListener() {
99
            @Override
98
            @Override
100
            public void stateChanged (ChangeEvent ce) {
99
            public void stateChanged (ChangeEvent ce) {
Lines 104-114 Link Here
104
                }
103
                }
105
            }
104
            }
106
        });
105
        });
107
//        Color fillC = (Color)UIManager.get("nb_workplace_fill"); //NOI18N
108
//        if (fillC != null) setBackground (fillC);
109
    }
106
    }
110
    
107
    
108
109
    public void addComponents(Component[] comps, String[] names, javax.swing.Icon[] icons, String[] tips) {
110
        TabData[] data = new TabData[comps.length];
111
        for (int i=0; i < comps.length; i++) {
112
            TabData td = new TabData (comps[i], icons[i], names[i], tips[i]);
113
            data[i] = td;
114
            comps[i].addPropertyChangeListener(JComponent.TOOL_TIP_TEXT_KEY, getTooltipListener(comps[i]));
115
        }
116
        getModel().addTabs (0, data);
117
    }
118
119
120
    /** Removes tooltip listeners from given tabs */
121
    private void detachTooltipListeners(List tabs) {
122
        JComponent curComp;
123
        for (Iterator iter = tabs.iterator(); iter.hasNext(); ) {
124
            curComp = (JComponent)((TabData)iter.next()).getComponent();
125
            curComp.removePropertyChangeListener(JComponent.TOOL_TIP_TEXT_KEY,
126
                                                 getTooltipListener(curComp));
127
        }
128
    }
129
    
130
131
    private String getSideForLocation(Point location) {
132
        Rectangle bounds = getBounds();
133
        bounds.setLocation(0, 0);
134
        
135
        final int TOP_HEIGHT = 10;
136
        final int BOTTOM_HEIGHT = (int)(0.25 * bounds.height);
137
        
138
        final int LEFT_WIDTH = Math.max (getWidth() / 8, 40);
139
        final int RIGHT_WIDTH = LEFT_WIDTH;
140
        
141
        if(DEBUG) {
142
            debugLog(""); // NOI18N
143
            debugLog("TOP_HEIGHT    =" + TOP_HEIGHT); // NOI18N
144
            debugLog("BOTTOM_HEIGHT =" + BOTTOM_HEIGHT); // NOI18N
145
            debugLog("LEFT_WIDTH    =" + LEFT_WIDTH); // NOI18N
146
            debugLog("RIGHT_WIDTH   =" + RIGHT_WIDTH); // NOI18N
147
        }
148
        
149
        // Size of area which indicates creation of new split.
150
//        int delta = Constants.DROP_AREA_SIZE;
151
        Rectangle top = new Rectangle(0, 0, bounds.width, BOTTOM_HEIGHT);
152
        if(top.contains(location)) {
153
            return Constants.TOP;
154
        }
155
        
156
        Polygon left = new EqualPolygon(
157
            new int[] {0, LEFT_WIDTH, LEFT_WIDTH, 0},
158
            new int[] {TOP_HEIGHT, TOP_HEIGHT, bounds.height - BOTTOM_HEIGHT, bounds.height},
159
            4
160
        );
161
        if(left.contains(location)) {
162
            return Constants.LEFT;
163
        }
164
        
165
        Polygon right = new EqualPolygon(
166
            new int[] {bounds.width - RIGHT_WIDTH, bounds.width, bounds.width, bounds.width - RIGHT_WIDTH},
167
            new int[] {TOP_HEIGHT, TOP_HEIGHT, bounds.height, bounds.height - BOTTOM_HEIGHT},
168
            4
169
        );
170
        if(right.contains(location)) {
171
            return Constants.RIGHT;
172
        }
173
174
        Polygon bottom = new EqualPolygon(
175
            new int[] {LEFT_WIDTH, bounds.width - RIGHT_WIDTH, bounds.width, 0},
176
            new int[] {bounds.height - BOTTOM_HEIGHT, bounds.height - BOTTOM_HEIGHT, bounds.height, bounds.height},
177
            4
178
        );
179
        if(bottom.contains(location)) {
180
            return Constants.BOTTOM;
181
        }
182
            
183
        return null;
184
    }
185
186
    private Shape getStartingIndication(Point startingPoint, Point location) {
187
        Rectangle rect = getBounds();
188
        rect.setLocation(location.x - startingPoint.x, location.y - startingPoint.y);
189
        return rect;
190
    }
191
    // DnD<<
192
193
    
194
    /** Notifies all registered listeners about the event. */
195
    private void fireStateChanged() {
196
        if (!SwingUtilities.isEventDispatchThread()) {
197
            Logger.getAnonymousLogger().warning(
198
                "All state changes to the tab component must happen on the event thread!"); //NOI18N
199
            Exception e = new Exception();
200
            e.fillInStackTrace();
201
            Logger.getAnonymousLogger().warning(e.getStackTrace()[1].toString());
202
        }
203
204
        //Note: Firing the events while holding the tree lock avoids many
205
        //gratuitous repaints that slow down switching tabs.  To demonstrate this,
206
        //comment this code out and run the IDE with -J-Dawt.nativeDoubleBuffering=true
207
        //so you'll really see every repaint.  When switching between a form
208
        //tab and an editor tab, you will see the property sheet get repainted
209
        //8 times due to changes in the component hierarchy, before the 
210
        //selected node is even changed to the appropriate one for the new tab.
211
        //Synchronizing here ensures that never happens.
212
        
213
        // [dafe]: Firing under tree lock is bad practice and causes deadlocking,
214
        // see http://www.netbeans.org/issues/show_bug.cgi?id=120874
215
        // Comments above seems not to be valid anymore in JDK 1.5 and
216
        // newer. Even if running with -J-Dawt.nativeDoubleBuffering=true, there
217
        // is no difference in number of repaints no matter if holding the tree
218
        // lock or not. Repeated redrawing seems to be coalesced well, so removing
219
        // AWT tree lock
220
        
221
        cs.fireChange();
222
    }
223
    
224
    private static void debugLog(String message) {
225
        Debug.log(TabbedAdapter.class, message);
226
    }
227
    
228
    private ModeImpl getModeImpl() {
229
        TopComponent[] topComponents = tabbedImpl.getTopComponents();
230
        if( topComponents.length < 1 )
231
            return null;
232
        return ( ModeImpl ) WindowManagerImpl.getInstance().findMode( topComponents[0] );
233
    }
234
235
    /** Finds out in what state is window system mode containing given component.
236
     * 
237
     * @return true if given component is inside mode which is in maximized state,
238
     * false otherwise 
239
     */
240
    public static boolean isInMaximizedMode (Component comp) {
241
        ModeImpl maxMode = WindowManagerImpl.getInstance().getCurrentMaximizedMode();
242
        if (maxMode == null) {
243
            return false;
244
        }
245
        return maxMode.containsTopComponent((TopComponent)comp);
246
    }
247
    
248
    /********** implementation of SlideController *****************/
249
    
111
    @Override
250
    @Override
251
    public void userToggledAutoHide(int tabIndex, boolean enabled) {
252
        postActionEvent(new TabActionEvent(this, TabbedContainer.COMMAND_ENABLE_AUTO_HIDE, tabIndex));
253
    }    
254
255
    @Override
256
    public void userToggledTransparency(int tabIndex) {
257
        postActionEvent(new TabActionEvent(this, TabbedContainer.COMMAND_TOGGLE_TRANSPARENCY, tabIndex));
258
    }    
259
    
260
    /********* implementation of Tabbed.Accessor **************/
261
    
262
    @Override
263
    public Tabbed getTabbed() {
264
        return tabbedImpl;
265
    }
266
267
    /********* implementation of WinsysInfoForTabbed ********/
268
    
269
    public static class WinsysInfo extends WinsysInfoForTabbedContainer {
270
        private int containerType;
271
        public WinsysInfo( int containerType ) {
272
            this.containerType = containerType;
273
        }
274
        
275
        @Override
276
        public Object getOrientation (Component comp) {
277
            WindowManagerImpl wmi = WindowManagerImpl.getInstance();
278
            // don't show pin button in separate views
279
            if (!wmi.isDocked((TopComponent)comp)) {
280
                return TabDisplayer.ORIENTATION_INVISIBLE;
281
            }
282
283
            String side = wmi.guessSlideSide((TopComponent)comp);
284
            Object result = null;
285
            if (side.equals(Constants.LEFT)) {
286
                result = TabDisplayer.ORIENTATION_WEST;
287
            } else if (side.equals(Constants.RIGHT)) {
288
                result = TabDisplayer.ORIENTATION_EAST;
289
            } else if (side.equals(Constants.BOTTOM)) {
290
                result = TabDisplayer.ORIENTATION_SOUTH;
291
            } else if (side.equals(Constants.TOP)) {
292
                result = TabDisplayer.ORIENTATION_NORTH;
293
            } else {
294
                result = TabDisplayer.ORIENTATION_CENTER;
295
            }
296
            return result;   
297
        }
298
299
        @Override
300
        public boolean inMaximizedMode (Component comp) {
301
            return isInMaximizedMode(comp);
302
        }    
303
        
304
        @Override
305
        public boolean isTopComponentSlidingEnabled() {
306
            return Switches.isTopComponentSlidingEnabled();
307
        }
308
        
309
        @Override
310
        public boolean isTopComponentClosingEnabled() {
311
            if( containerType == Constants.MODE_KIND_EDITOR )
312
                return Switches.isEditorTopComponentClosingEnabled();
313
            else
314
                return Switches.isViewTopComponentClosingEnabled();
315
        }
316
        
317
        @Override
318
        public boolean isTopComponentMaximizationEnabled() {
319
            return Switches.isTopComponentMaximizationEnabled();
320
        }
321
322
        @Override
323
        public boolean isTopComponentClosingEnabled(TopComponent tc) {
324
            return !Boolean.TRUE.equals(tc.getClientProperty(TopComponent.PROP_CLOSING_DISABLED))
325
                    && isTopComponentClosingEnabled();
326
        }
327
328
        @Override
329
        public boolean isTopComponentMaximizationEnabled(TopComponent tc) {
330
            return !Boolean.TRUE.equals(tc.getClientProperty(TopComponent.PROP_MAXIMIZATION_DISABLED))
331
                    && isTopComponentMaximizationEnabled();
332
        }
333
334
        @Override
335
        public boolean isTopComponentSlidingEnabled(TopComponent tc) {
336
            return !Boolean.TRUE.equals(tc.getClientProperty(TopComponent.PROP_SLIDING_DISABLED))
337
                    && isTopComponentSlidingEnabled();
338
        }
339
340
        @Override
341
        public boolean isModeSlidingEnabled() {
342
            return Switches.isModeSlidingEnabled();
343
        }
344
    } // end of LocInfo
345
346
    /** Returns instance of weak property change listener used to listen to 
347
     * tooltip changes. Weak listener is needed, in some situations (close of 
348
     * whole mode), our class is not notified from winsys.
349
     */
350
    private PropertyChangeListener getTooltipListener(Component comp) {
351
        if (tooltipListener == null) {
352
            tooltipListener = new ToolTipListener();
353
            weakTooltipListener = WeakListeners.propertyChange(tooltipListener, comp);
354
        }
355
        return weakTooltipListener;
356
    }
357
    
358
    private final Tabbed tabbedImpl = new Tabbed() {
359
360
        @Override
112
    public void addTopComponent(String name, javax.swing.Icon icon, TopComponent tc, String toolTip) {
361
    public void addTopComponent(String name, javax.swing.Icon icon, TopComponent tc, String toolTip) {
113
        insertComponent (name, icon, tc, toolTip, getTabCount());
362
        insertComponent (name, icon, tc, toolTip, getTabCount());
114
    }
363
    }
Lines 131-137 Link Here
131
    public void requestAttention (TopComponent tc) {
380
    public void requestAttention (TopComponent tc) {
132
        int idx = indexOf(tc);
381
        int idx = indexOf(tc);
133
        if (idx >= 0) {
382
        if (idx >= 0) {
134
            requestAttention(idx);
383
                TabbedAdapter.this.requestAttention(idx);
135
        } else {
384
        } else {
136
            Logger.getAnonymousLogger().fine(
385
            Logger.getAnonymousLogger().fine(
137
                "RequestAttention on component unknown to container: " + tc); //NOI18N
386
                "RequestAttention on component unknown to container: " + tc); //NOI18N
Lines 142-148 Link Here
142
    public void cancelRequestAttention (TopComponent tc) {
391
    public void cancelRequestAttention (TopComponent tc) {
143
        int idx = indexOf(tc);
392
        int idx = indexOf(tc);
144
        if (idx >= 0) {
393
        if (idx >= 0) {
145
            cancelRequestAttention(idx);
394
                TabbedAdapter.this.cancelRequestAttention(idx);
146
        } else {
395
        } else {
147
            throw new IllegalArgumentException ("TopComponent " + tc 
396
            throw new IllegalArgumentException ("TopComponent " + tc 
148
                + " is not a child of this container"); //NOI18N
397
                + " is not a child of this container"); //NOI18N
Lines 194-208 Link Here
194
        }
443
        }
195
    }
444
    }
196
445
197
    public void addComponents(Component[] comps, String[] names, javax.swing.Icon[] icons, String[] tips) {
446
        @Override
198
        ArrayList al = new ArrayList (comps.length);
447
        public Rectangle getTabBounds(int tabIndex) {
199
        TabData[] data = new TabData[comps.length];
448
            return getTabRect(tabIndex, new Rectangle());
200
        for (int i=0; i < comps.length; i++) {
201
            TabData td = new TabData (comps[i], icons[i], names[i], tips[i]);
202
            data[i] = td;
203
            comps[i].addPropertyChangeListener(JComponent.TOOL_TIP_TEXT_KEY, getTooltipListener(comps[i]));
204
        }
449
        }
205
        getModel().addTabs (0, data);
450
451
        @Override
452
        public Rectangle getTabsArea() {
453
            return getUI().getTabsArea();
206
    }
454
    }
207
455
208
    @Override
456
    @Override
Lines 264-280 Link Here
264
            repaint();
512
            repaint();
265
        }
513
        }
266
    }
514
    }
267
268
    /** Removes tooltip listeners from given tabs */
269
    private void detachTooltipListeners(List tabs) {
270
        JComponent curComp;
271
        for (Iterator iter = tabs.iterator(); iter.hasNext(); ) {
272
            curComp = (JComponent)((TabData)iter.next()).getComponent();
273
            curComp.removePropertyChangeListener(JComponent.TOOL_TIP_TEXT_KEY,
274
                                                 getTooltipListener(curComp));
275
        }
276
    }
277
    
278
    // DnD>>
515
    // DnD>>
279
    /** Finds tab which contains x coordinate of given location point.
516
    /** Finds tab which contains x coordinate of given location point.
280
     * @param location The point for which a constraint is required
517
     * @param location The point for which a constraint is required
Lines 308-319 Link Here
308
     */
545
     */
309
    @Override
546
    @Override
310
    public Shape getIndicationForLocation(Point location,
547
    public Shape getIndicationForLocation(Point location,
311
        TopComponentDraggable startingTransfer, Point startingPoint, boolean attachingPossible) {
548
            TopComponent startingTransfer, Point startingPoint, boolean attachingPossible) {
312
549
313
        Rectangle rect = getBounds();
550
        Rectangle rect = getBounds();
314
        rect.setLocation(0, 0);
551
        rect.setLocation(0, 0);
315
        
552
        
316
        TopComponent draggedTC = startingTransfer.getTopComponent();
553
            TopComponent draggedTC = startingTransfer;
317
        //#47909
554
        //#47909
318
        int tab = tabForCoordinate(location);
555
        int tab = tabForCoordinate(location);
319
        // first process the tabs when mouse is inside the tabs area..
556
        // first process the tabs when mouse is inside the tabs area..
Lines 349-425 Link Here
349
            return s;
586
            return s;
350
        }
587
        }
351
        
588
        
352
        if( startingTransfer.isTopComponentTransfer() && startingPoint != null 
589
            if( null != startingTransfer && startingPoint != null 
353
            && indexOf(startingTransfer.getTopComponent()) != -1) {
590
                && indexOf(startingTransfer) != -1) {
354
            return getStartingIndication(startingPoint, location);
591
            return getStartingIndication(startingPoint, location);
355
        }
592
        }
356
        
593
        
357
        return rect;
594
        return rect;
358
    }
595
    }
359
596
360
    private String getSideForLocation(Point location) {
597
        @Override
361
        Rectangle bounds = getBounds();
598
        public Component getComponent() {
362
        bounds.setLocation(0, 0);
599
            return TabbedAdapter.this;
363
        
364
        final int TOP_HEIGHT = 10;
365
        final int BOTTOM_HEIGHT = (int)(0.25 * bounds.height);
366
        
367
        final int LEFT_WIDTH = Math.max (getWidth() / 8, 40);
368
        final int RIGHT_WIDTH = LEFT_WIDTH;
369
        
370
        if(DEBUG) {
371
            debugLog(""); // NOI18N
372
            debugLog("TOP_HEIGHT    =" + TOP_HEIGHT); // NOI18N
373
            debugLog("BOTTOM_HEIGHT =" + BOTTOM_HEIGHT); // NOI18N
374
            debugLog("LEFT_WIDTH    =" + LEFT_WIDTH); // NOI18N
375
            debugLog("RIGHT_WIDTH   =" + RIGHT_WIDTH); // NOI18N
376
        }
600
        }
377
        
601
        
378
        // Size of area which indicates creation of new split.
602
        /** Add action for enabling auto hide of views */
379
//        int delta = Constants.DROP_AREA_SIZE;
603
        @Override
380
        Rectangle top = new Rectangle(0, 0, bounds.width, BOTTOM_HEIGHT);
604
        public Action[] getPopupActions(Action[] defaultActions, int tabIndex) {
381
        if(top.contains(location)) {
605
            if( tabIndex < 0 ) {
382
            return Constants.TOP;
606
                ModeImpl mode = getModeImpl();
383
        }
607
                if( null != mode )
384
        
608
                    return ActionUtils.createDefaultPopupActions( mode );
385
        Polygon left = new EqualPolygon(
386
            new int[] {0, LEFT_WIDTH, LEFT_WIDTH, 0},
387
            new int[] {TOP_HEIGHT, TOP_HEIGHT, bounds.height - BOTTOM_HEIGHT, bounds.height},
388
            4
389
        );
390
        if(left.contains(location)) {
391
            return Constants.LEFT;
392
        }
393
        
394
        Polygon right = new EqualPolygon(
395
            new int[] {bounds.width - RIGHT_WIDTH, bounds.width, bounds.width, bounds.width - RIGHT_WIDTH},
396
            new int[] {TOP_HEIGHT, TOP_HEIGHT, bounds.height, bounds.height - BOTTOM_HEIGHT},
397
            4
398
        );
399
        if(right.contains(location)) {
400
            return Constants.RIGHT;
401
        }
402
403
        Polygon bottom = new EqualPolygon(
404
            new int[] {LEFT_WIDTH, bounds.width - RIGHT_WIDTH, bounds.width, 0},
405
            new int[] {bounds.height - BOTTOM_HEIGHT, bounds.height - BOTTOM_HEIGHT, bounds.height, bounds.height},
406
            4
407
        );
408
        if(bottom.contains(location)) {
409
            return Constants.BOTTOM;
410
        }
411
            
412
        return null;
609
        return null;
413
    }
610
    }
414
611
            return defaultActions;
415
    private Shape getStartingIndication(Point startingPoint, Point location) {
416
        Rectangle rect = getBounds();
417
        rect.setLocation(location.x - startingPoint.x, location.y - startingPoint.y);
418
        return rect;
419
    }
612
    }
420
    // DnD<<
421
613
422
    
423
    /** Registers ChangeListener to receive events.
614
    /** Registers ChangeListener to receive events.
424
     * @param listener The listener to register.
615
     * @param listener The listener to register.
425
     *
616
     *
Lines 438-634 Link Here
438
        cs.removeChangeListener(listener);
629
        cs.removeChangeListener(listener);
439
    }
630
    }
440
    
631
    
441
    /** Notifies all registered listeners about the event. */
442
    private void fireStateChanged() {
443
        if (!SwingUtilities.isEventDispatchThread()) {
444
            Logger.getAnonymousLogger().warning(
445
                "All state changes to the tab component must happen on the event thread!"); //NOI18N
446
            Exception e = new Exception();
447
            e.fillInStackTrace();
448
            Logger.getAnonymousLogger().warning(e.getStackTrace()[1].toString());
449
        }
450
451
        //Note: Firing the events while holding the tree lock avoids many
452
        //gratuitous repaints that slow down switching tabs.  To demonstrate this,
453
        //comment this code out and run the IDE with -J-Dawt.nativeDoubleBuffering=true
454
        //so you'll really see every repaint.  When switching between a form
455
        //tab and an editor tab, you will see the property sheet get repainted
456
        //8 times due to changes in the component hierarchy, before the 
457
        //selected node is even changed to the appropriate one for the new tab.
458
        //Synchronizing here ensures that never happens.
459
        
460
        // [dafe]: Firing under tree lock is bad practice and causes deadlocking,
461
        // see http://www.netbeans.org/issues/show_bug.cgi?id=120874
462
        // Comments above seems not to be valid anymore in JDK 1.5 and
463
        // newer. Even if running with -J-Dawt.nativeDoubleBuffering=true, there
464
        // is no difference in number of repaints no matter if holding the tree
465
        // lock or not. Repeated redrawing seems to be coalesced well, so removing
466
        // AWT tree lock
467
        
468
        cs.fireChange();
469
    }
470
    
471
    private static void debugLog(String message) {
472
        Debug.log(TabbedAdapter.class, message);
473
    }
474
    
475
    @Override
632
    @Override
476
    public Component getComponent() {
633
        public int getTabCount() {
477
        return this;
634
            return TabbedAdapter.this.getTabCount();
478
    }
635
    }
479
    
636
    
480
    /** Add action for enabling auto hide of views */
481
    @Override
637
    @Override
482
    public Action[] getPopupActions(Action[] defaultActions, int tabIndex) {
638
        public int indexOf( Component tc ) {
483
        if( tabIndex < 0 ) {
639
            return TabbedAdapter.this.indexOf( tc );
484
            ModeImpl mode = getModeImpl();
485
            if( null != mode )
486
                return ActionUtils.createDefaultPopupActions( mode );
487
            return null;
488
        }
640
        }
489
        return defaultActions;
490
    }
491
    
641
    
492
    private ModeImpl getModeImpl() {
493
        TopComponent[] topComponents = getTopComponents();
494
        if( topComponents.length < 1 )
495
            return null;
496
        return ( ModeImpl ) WindowManagerImpl.getInstance().findMode( topComponents[0] );
497
    }
498
499
    /** Finds out in what state is window system mode containing given component.
500
     * 
501
     * @return true if given component is inside mode which is in maximized state,
502
     * false otherwise 
503
     */
504
    public static boolean isInMaximizedMode (Component comp) {
505
        ModeImpl maxMode = WindowManagerImpl.getInstance().getCurrentMaximizedMode();
506
        if (maxMode == null) {
507
            return false;
508
        }
509
        return maxMode.containsTopComponent((TopComponent)comp);
510
    }
511
    
512
    /********** implementation of SlideController *****************/
513
    
514
    @Override
642
    @Override
515
    public void userToggledAutoHide(int tabIndex, boolean enabled) {
643
        public void setTitleAt( int index, String title ) {
516
        postActionEvent(new TabActionEvent(this, TabbedContainer.COMMAND_ENABLE_AUTO_HIDE, tabIndex));
644
            TabbedAdapter.this.setTitleAt( index, title );
517
    }    
645
    }    
518
646
519
    @Override
647
    @Override
520
    public void userToggledTransparency(int tabIndex) {
648
        public void setIconAt( int index, Icon icon ) {
521
        postActionEvent(new TabActionEvent(this, TabbedContainer.COMMAND_TOGGLE_TRANSPARENCY, tabIndex));
649
            TabbedAdapter.this.setIconAt( index, icon );
522
    }    
650
    }    
523
    
651
    
524
    /********* implementation of Tabbed.Accessor **************/
525
    
526
    @Override
652
    @Override
527
    public Tabbed getTabbed() {
653
        public void setToolTipTextAt( int index, String toolTip ) {
528
        return this;
654
            TabbedAdapter.this.setToolTipTextAt( index, toolTip );
529
    }
655
    }
530
    
656
    
531
    @Override
657
    @Override
532
    public Rectangle getTabBounds(int tabIndex) {
658
        public void addActionListener( ActionListener al ) {
533
        return getTabRect(tabIndex, new Rectangle());
659
            TabbedAdapter.this.addActionListener( al );
534
    }
660
    }
535
    
661
    
536
    @Override
662
    @Override
537
    public Rectangle getTabsArea() {
663
        public void removeActionListener( ActionListener al ) {
538
        return getUI().getTabsArea();
664
            TabbedAdapter.this.removeActionListener( al );
539
    }
665
    }
540
666
541
    /********* implementation of WinsysInfoForTabbed ********/
542
    
543
    static class WinsysInfo extends WinsysInfoForTabbedContainer {
544
        private int containerType;
545
        public WinsysInfo( int containerType ) {
546
            this.containerType = containerType;
547
        }
548
        
549
        @Override
667
        @Override
550
        public Object getOrientation (Component comp) {
668
        public void setActive( boolean active ) {
551
            WindowManagerImpl wmi = WindowManagerImpl.getInstance();
669
            TabbedAdapter.this.setActive( active );
552
            // don't show pin button in separate views
553
            if (!wmi.isDocked((TopComponent)comp)) {
554
                return TabDisplayer.ORIENTATION_INVISIBLE;
555
            }
670
            }
556
671
557
            String side = wmi.guessSlideSide((TopComponent)comp);
558
            Object result = null;
559
            if (side.equals(Constants.LEFT)) {
560
                result = TabDisplayer.ORIENTATION_WEST;
561
            } else if (side.equals(Constants.RIGHT)) {
562
                result = TabDisplayer.ORIENTATION_EAST;
563
            } else if (side.equals(Constants.BOTTOM)) {
564
                result = TabDisplayer.ORIENTATION_SOUTH;
565
            } else if (side.equals(Constants.TOP)) {
566
                result = TabDisplayer.ORIENTATION_NORTH;
567
            } else {
568
                result = TabDisplayer.ORIENTATION_CENTER;
569
            }
570
            return result;   
571
        }
572
573
        @Override
672
        @Override
574
        public boolean inMaximizedMode (Component comp) {
673
        public int tabForCoordinate( Point p ) {
575
            return isInMaximizedMode(comp);
674
            return TabbedAdapter.this.tabForCoordinate( p );
576
        }    
675
        }    
577
        
676
        
578
        @Override
677
        @Override
579
        public boolean isTopComponentSlidingEnabled() {
678
        public Image createImageOfTab( int tabIndex ) {
580
            return Switches.isTopComponentSlidingEnabled();
679
            return TabbedAdapter.this.createImageOfTab( tabIndex );
581
        }
680
        }
582
        
681
        
583
        @Override
682
        @Override
584
        public boolean isTopComponentClosingEnabled() {
683
        public boolean isTransparent() {
585
            if( containerType == Constants.MODE_KIND_EDITOR )
684
            return TabbedAdapter.this.isTransparent();
586
                return Switches.isEditorTopComponentClosingEnabled();
587
            else
588
                return Switches.isViewTopComponentClosingEnabled();
589
        }
685
        }
590
        
686
        
591
        @Override
687
        @Override
592
        public boolean isTopComponentMaximizationEnabled() {
688
        public void setTransparent( boolean transparent ) {
593
            return Switches.isTopComponentMaximizationEnabled();
689
            TabbedAdapter.this.setTransparent( transparent );
594
        }
690
        }
595
691
596
        @Override
692
    };
597
        public boolean isTopComponentClosingEnabled(TopComponent tc) {
598
            return !Boolean.TRUE.equals(tc.getClientProperty(TopComponent.PROP_CLOSING_DISABLED))
599
                    && isTopComponentClosingEnabled();
600
        }
601
693
602
        @Override
603
        public boolean isTopComponentMaximizationEnabled(TopComponent tc) {
604
            return !Boolean.TRUE.equals(tc.getClientProperty(TopComponent.PROP_MAXIMIZATION_DISABLED))
605
                    && isTopComponentMaximizationEnabled();
606
        }
607
608
        @Override
609
        public boolean isTopComponentSlidingEnabled(TopComponent tc) {
610
            return !Boolean.TRUE.equals(tc.getClientProperty(TopComponent.PROP_SLIDING_DISABLED))
611
                    && isTopComponentSlidingEnabled();
612
        }
613
614
        @Override
615
        public boolean isModeSlidingEnabled() {
616
            return Switches.isModeSlidingEnabled();
617
        }
618
    } // end of LocInfo
619
620
    /** Returns instance of weak property change listener used to listen to 
621
     * tooltip changes. Weak listener is needed, in some situations (close of 
622
     * whole mode), our class is not notified from winsys.
623
     */
624
    private PropertyChangeListener getTooltipListener(Component comp) {
625
        if (tooltipListener == null) {
626
            tooltipListener = new ToolTipListener();
627
            weakTooltipListener = WeakListeners.propertyChange(tooltipListener, comp);
628
        }
629
        return weakTooltipListener;
630
    }
631
632
    /** Listening to changes of tooltips of currently asociated top components */
694
    /** Listening to changes of tooltips of currently asociated top components */
633
    private class ToolTipListener implements PropertyChangeListener {
695
    private class ToolTipListener implements PropertyChangeListener {
634
        
696
        

Return to bug 169099