this.accessible = accessible;
}
public String getToolTipTextAt(MouseEvent e, int index, String defaultTip) {
if (index != -1) {
CompositeIcon compositeIcon = (CompositeIcon) ((CompositeIcon) getContentIcon()).getRightIcon();
Point point = SwingUtilities.convertPoint(tabbedPane, e.getPoint(), getDestination());
if (isDetachable()) {
Rectangle detachIconRect = compositeIcon.getLastPaintedLeftRec();
if (point.getX() > detachIconRect.x && point.getX() < detachIconRect.x + detachIconRect.width) {
return ResourceBoundles.getResourceBundle().getString("@@tab.content.detach");
}
}
if (isCloseable()) {
Rectangle closeIconRect = compositeIcon.getLastPaintedRightRec();
if (point.getX() > closeIconRect.x && point.getX() < closeIconRect.x + closeIconRect.width) {
return ResourceBoundles.getResourceBundle().getString("@@tab.content.close");
}
}
return (defaultTip.equals("")) ? null : defaultTip;