/** * Toggles whether this caret should always be visible (as opposed to * blinking, or not visible when the editor's window is not focused). * This can be used by popup windows that want the caret's location * to still be visible for contextual purposes while they are displayed. * * @param alwaysVisible Whether this caret should always be visible. * @see #isAlwaysVisible() */ public void setAlwaysVisible(boolean alwaysVisible) { if (alwaysVisible != this.alwaysVisible) { this.alwaysVisible = alwaysVisible; if (!isVisible()) { // Force painting of caret since super class's "flasher" timer // won't fire when the window doesn't have focus repaint(); } } }
if (isVisible() || alwaysVisible) {
/** * Toggles whether this caret should always be visible (as opposed to * blinking, or not visible when the editor's window is not focused). * This can be used by popup windows that want the caret's location * to still be visible for contextual purposes while they are displayed. * * @param alwaysVisible Whether this caret should always be visible. * @see #isAlwaysVisible() */ public void setAlwaysVisible(boolean alwaysVisible) { if (alwaysVisible != this.alwaysVisible) { this.alwaysVisible = alwaysVisible; if (!isVisible()) { // Force painting of caret since super class's "flasher" timer // won't fire when the window doesn't have focus repaint(); } } }
if (isVisible() || alwaysVisible) {