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 |
} |