int offs = lhi.getOffset(); if (offs>=0 && offs<=docLen) { int y = textArea.yForLineContaining(offs); if (y>vr.y-lineHeight) { if (y<vr.y+vr.height) {
/** * Repaints the line pointed to by the specified highlight information. * * @param lhi The highlight information. */ private void repaintLine(LineHighlightInfo lhi) { int offs = lhi.getOffset(); // May be > length if they deleted text including the highlight if (offs>=0 && offs<=textArea.getDocument().getLength()) { try { int y = textArea.yForLineContaining(offs); if (y>-1) { textArea.repaint(0, y, textArea.getWidth(), textArea.getLineHeight()); } } catch (BadLocationException ble) { ble.printStackTrace(); // Never happens } } }
int y = textArea.yForLineContaining(dot); if (y!=lastY) { lastY = y;
int offs = lhi.getOffset(); if (offs>=0 && offs<=docLen) { int y = textArea.yForLineContaining(offs); if (y>vr.y-lineHeight) { if (y<vr.y+vr.height) {
int offs = lhi.getOffset(); if (offs>=0 && offs<=docLen) { int y = textArea.yForLineContaining(offs); if (y>vr.y-lineHeight) { if (y<vr.y+vr.height) {
int offs = lhi.getOffset(); if (offs>=0 && offs<=docLen) { int y = textArea.yForLineContaining(offs); if (y>vr.y-lineHeight) { if (y<vr.y+vr.height) {
/** * Repaints the line pointed to by the specified highlight information. * * @param lhi The highlight information. */ private void repaintLine(LineHighlightInfo lhi) { int offs = lhi.getOffset(); // May be > length if they deleted text including the highlight if (offs>=0 && offs<=textArea.getDocument().getLength()) { try { int y = textArea.yForLineContaining(offs); if (y>-1) { textArea.repaint(0, y, textArea.getWidth(), textArea.getLineHeight()); } } catch (BadLocationException ble) { ble.printStackTrace(); // Never happens } } }
/** * Repaints the line pointed to by the specified highlight information. * * @param lhi The highlight information. */ private void repaintLine(LineHighlightInfo lhi) { int offs = lhi.getOffset(); // May be > length if they deleted text including the highlight if (offs>=0 && offs<=textArea.getDocument().getLength()) { try { int y = textArea.yForLineContaining(offs); if (y>-1) { textArea.repaint(0, y, textArea.getWidth(), textArea.getLineHeight()); } } catch (BadLocationException ble) { ble.printStackTrace(); // Never happens } } }
/** * Repaints the line pointed to by the specified highlight information. * * @param lhi The highlight information. */ private void repaintLine(LineHighlightInfo lhi) { int offs = lhi.getOffset(); // May be > length if they deleted text including the highlight if (offs>=0 && offs<=textArea.getDocument().getLength()) { try { int y = textArea.yForLineContaining(offs); if (y>-1) { textArea.repaint(0, y, textArea.getWidth(), textArea.getLineHeight()); } } catch (BadLocationException ble) { ble.printStackTrace(); // Never happens } } }
int y = textArea.yForLineContaining(dot); if (y!=lastY) { lastY = y;
int y = textArea.yForLineContaining(dot); if (y!=lastY) { lastY = y;
int y = textArea.yForLineContaining(dot); if (y!=lastY) { lastY = y;