public boolean targetOffsetReached(int offset, char ch, int x, int charWidth, DrawContext ctx) { JTextComponent c = BaseCaret.this.component; if (c != null) { BaseCaret.this.beforeCaretFont = (offset == ctx.getFragmentOffset()) ? previousFont : ctx.getFont(); BaseCaret.this.afterCaretFont = ctx.getFont(); BaseCaret.this.x = x; BaseCaret.this.y = this.getY(); BaseCaret.this.width = charWidth; BaseCaret.this.height = Utilities.getEditorUI(c).getLineHeight(); BaseCaret.this.textForeColor = ctx.getForeColor(); BaseCaret.this.textBackColor = ctx.getBackColor(); BaseCaret.this.dotChar[0] = ch; } return false; }
Color origForeColor = ctx.getForeColor(); if (origForeColor != null) { synchronized (fontAndForeColorCache) {
Color origForeColor = ctx.getForeColor(); if (origForeColor != null) { synchronized (fontAndForeColorCache) {