private void check(DocumentEvent evt) { //System.out.println("check"); // NOI18N if (evt.getDocument() instanceof BaseDocument) { BaseDocument doc = (BaseDocument)evt.getDocument(); BaseDocumentEvent bevt = (BaseDocumentEvent)evt; int offset = evt.getOffset(); doc.repaintBlock(offset-3, offset); } }
/** Notify view that it is necessary to redraw the line of the document */ protected void refreshLine(int line) { fireChangedLine(line); int start = Utilities.getRowStartFromLineOffset(doc, line); int end = Utilities.getRowStartFromLineOffset(doc, line+1); if (end == -1) end = doc.getLength(); doc.repaintBlock(start, end); }
/** Notify view that it is necessary to redraw the line of the document */ protected void refreshLine(int line) { fireChangedLine(line); int start = Utilities.getRowStartFromLineOffset(doc, line); int end = Utilities.getRowStartFromLineOffset(doc, line + 1); if (end == -1) end = doc.getLength(); doc.repaintBlock(start, end); }
/** Invalidate the state-infos in all the syntax-marks * in the whole document. The Syntax can call this method * if it changes its internal state in the way that affects * the future returned tokens. The syntax-state-info in all * the marks is reset and it will be lazily restored when necessary. */ public void invalidateSyntaxMarks() { extWriteLock(); try { FixLineSyntaxState.invalidateAllSyntaxStateInfos(this); repaintBlock(0, getLength()); } finally { extWriteUnlock(); } }
/** * Invalidate the state-infos in all the syntax-marks in the whole document. * The Syntax can call this method if it changes its internal state in the * way that affects the future returned tokens. The syntax-state-info in all * the marks is reset and it will be lazily restored when necessary. */ public void invalidateSyntaxMarks() { extWriteLock(); try { op.invalidateSyntaxMarks(); repaintBlock(0, getLength()); } finally { extWriteUnlock(); } }
doc.repaintBlock(redrawOffset, offset);
doc.repaintBlock(redrawOffset, offset);