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

(-)a/o.n.swing.tabcontrol/src/org/netbeans/swing/tabcontrol/Bundle.properties (-1 / +3 lines)
Lines 45-48 Link Here
45
45
46
46
47
ACS_TabbedContainer=Tab Control
47
ACS_TabbedContainer=Tab Control
48
ACSD_TabbedContainer=Tab control to switch between tabs.
48
ACSD_TabbedContainer=Tab control to switch between tabs.
49
50
TT_TabDisplayer_Close=Shift + click to close all documents, Alt + click to close other documents.
(-)a/o.n.swing.tabcontrol/src/org/netbeans/swing/tabcontrol/TabDisplayer.java (-2 / +15 lines)
Lines 62-67 Link Here
62
import javax.accessibility.AccessibleContext;
62
import javax.accessibility.AccessibleContext;
63
import javax.accessibility.AccessibleSelection;
63
import javax.accessibility.AccessibleSelection;
64
import javax.swing.event.ChangeListener;
64
import javax.swing.event.ChangeListener;
65
import org.netbeans.swing.tabcontrol.plaf.AbstractTabCellRenderer;
66
import org.netbeans.swing.tabcontrol.plaf.BasicScrollingTabDisplayerUI;
67
import org.netbeans.swing.tabcontrol.plaf.BasicTabDisplayerUI;
65
import org.netbeans.swing.tabcontrol.plaf.ToolbarTabDisplayerUI;
68
import org.netbeans.swing.tabcontrol.plaf.ToolbarTabDisplayerUI;
66
import org.netbeans.swing.tabcontrol.plaf.WinXPEditorTabDisplayerUI;
69
import org.netbeans.swing.tabcontrol.plaf.WinXPEditorTabDisplayerUI;
67
import org.netbeans.swing.tabcontrol.plaf.WinXPViewTabDisplayerUI;
70
import org.netbeans.swing.tabcontrol.plaf.WinXPViewTabDisplayerUI;
Lines 460-466 Link Here
460
     * Gets tooltip for the tab corresponding to the mouse event, or if no
463
     * Gets tooltip for the tab corresponding to the mouse event, or if no
461
     * tab, delegates to the default implementation.
464
     * tab, delegates to the default implementation.
462
     */
465
     */
463
    public final String getToolTipText(MouseEvent event) {
466
    public final String getToolTipText(MouseEvent event) {        
464
        if (ui != null) {
467
        if (ui != null) {
465
            Point p = event.getPoint();
468
            Point p = event.getPoint();
466
            if (event.getSource() != this) {
469
            if (event.getSource() != this) {
Lines 468-474 Link Here
468
                p = SwingUtilities.convertPoint(c, p, this);
471
                p = SwingUtilities.convertPoint(c, p, this);
469
            }
472
            }
470
            int index = getUI().tabForCoordinate(p);
473
            int index = getUI().tabForCoordinate(p);
471
            if (index != -1) {
474
            if (index != -1) {                
475
                if( TYPE_EDITOR == getType() ) {
476
                   TabDisplayerUI tabDisplayerUI = getUI();
477
                   BasicTabDisplayerUI basicUI =
478
                           (BasicScrollingTabDisplayerUI)tabDisplayerUI;
479
                   AbstractTabCellRenderer cellRenderer =
480
                           (AbstractTabCellRenderer) basicUI.getTabCellRenderer(index);
481
                   if( cellRenderer.inCloseButton() ) {
482
                       return org.openide.util.NbBundle.getMessage(TabDisplayer.class, "TT_TabDisplayer_Close");
483
                   }                    
484
                }
472
                return getModel().getTab(index).tip;
485
                return getModel().getTab(index).tip;
473
            }
486
            }
474
        }
487
        }
(-)a/o.n.swing.tabcontrol/src/org/netbeans/swing/tabcontrol/plaf/AbstractTabCellRenderer.java (-1 / +1 lines)
Lines 632-638 Link Here
632
        return UIManager.getColor("TabRenderer.selectedForeground");
632
        return UIManager.getColor("TabRenderer.selectedForeground");
633
    }
633
    }
634
634
635
    protected boolean inCloseButton() {
635
    public boolean inCloseButton() {
636
        return (state & TabState.CLOSE_BUTTON_ARMED) != 0;
636
        return (state & TabState.CLOSE_BUTTON_ARMED) != 0;
637
    }
637
    }
638
638
(-)a/o.n.swing.tabcontrol/src/org/netbeans/swing/tabcontrol/plaf/BasicTabDisplayerUI.java (-1 / +1 lines)
Lines 204-210 Link Here
204
     * Get the cell renderer for a given tab.  The default implementation simply
204
     * Get the cell renderer for a given tab.  The default implementation simply
205
     * returns the renderer created by createDefaultRenderer().
205
     * returns the renderer created by createDefaultRenderer().
206
     */
206
     */
207
    protected TabCellRenderer getTabCellRenderer(int tab) {
207
    public TabCellRenderer getTabCellRenderer(int tab) {
208
        return defaultRenderer;
208
        return defaultRenderer;
209
    }
209
    }
210
210

Return to bug 78896