Lines 573-578
Link Here
|
573 |
* @since 2.3 |
573 |
* @since 2.3 |
574 |
*/ |
574 |
*/ |
575 |
public void setToolTipVisible(boolean visible) { |
575 |
public void setToolTipVisible(boolean visible) { |
|
|
576 |
setToolTipVisible(true, true); |
577 |
} |
578 |
|
579 |
/** |
580 |
* Set the visibility of the tooltip. |
581 |
* Behaves like {@link #setToolTipVisible(boolean)}, except that it can skip |
582 |
* forwarding the tooltip request to the view hierarchy. This is useful when |
583 |
* tooltips are actively displayed by the code, not initiated by user's mouse hover |
584 |
* or gesture. This call should be then followed by a call to {@code setTooltip} |
585 |
* to actually set the tooltip's value and position. |
586 |
* <p/> |
587 |
* Use {@link #setToolTipVisible(boolean)} to display a tooltip relevant to the |
588 |
* mouse position. |
589 |
* |
590 |
* @param visible whether tooltip should become visible or not. |
591 |
* @param updateFromView if true, ask DocumentView to build a tooltip. |
592 |
* |
593 |
* @since 2.3 |
594 |
*/ |
595 |
public final void setToolTipVisible(boolean visible, boolean updateFromView) { |
576 |
LOG.log(Level.FINE, "setToolTipVisible: visible={0}, status={1}, enabled={2}", new Object [] { //NOI18N |
596 |
LOG.log(Level.FINE, "setToolTipVisible: visible={0}, status={1}, enabled={2}", new Object [] { //NOI18N |
577 |
visible, status, enabled |
597 |
visible, status, enabled |
578 |
}); |
598 |
}); |
Lines 588-594
Link Here
|
588 |
if (visible) { // try to show the tooltip |
608 |
if (visible) { // try to show the tooltip |
589 |
if (enabled) { |
609 |
if (enabled) { |
590 |
setStatus(STATUS_VISIBILITY_ENABLED); |
610 |
setStatus(STATUS_VISIBILITY_ENABLED); |
591 |
updateToolTip(); |
611 |
if (updateFromView) { |
|
|
612 |
updateToolTip(); |
613 |
} |
592 |
} |
614 |
} |
593 |
|
615 |
|
594 |
} else { // hide tip |
616 |
} else { // hide tip |