/** * Set the visibility of the tooltip. * * @param visible * whether tooltip should become visible or not. If true the * status is changed to {@link { #STATUS_VISIBILITY_ENABLED} and * @link #updateToolTip()} is called.<BR> * It is still possible that the tooltip will not be showing on the * screen in case the tooltip or tooltip text are left unchanged. */ protected void setToolTipVisible(boolean visible) { if (!visible) { // ensure the timers are stopped enterTimer.stop(); exitTimer.stop(); } if (visible && status < STATUS_VISIBILITY_ENABLED || !visible && status >= STATUS_VISIBILITY_ENABLED) { if (visible) { // try to show the tooltip if (enabled) { setStatus(STATUS_VISIBILITY_ENABLED); updateToolTip(); } } else { // hide tip if (toolTip != null) { toolTip.setVisible(false); } setStatus(STATUS_HIDDEN); } } }
setStatus(STATUS_VISIBILITY_ENABLED); updateToolTip();