Logo Search packages:      
Sourcecode: jedit version File versions  Download package

void org::gjt::sp::jedit::textarea::TextArea::invalidateLine ( int  line  )  [inline]

Marks a line as needing a repaint.

Parameters:
line The physical line to invalidate

Definition at line 1148 of file TextArea.java.

References getFirstPhysicalLine(), org::gjt::sp::jedit::textarea::ChunkCache::getLineInfo(), invalidateScreenLineRange(), org::gjt::sp::jedit::textarea::DisplayManager::isLineVisible(), org::gjt::sp::jedit::buffer::JEditBuffer::isLoading(), org::gjt::sp::jedit::textarea::ChunkCache::needFullRepaint, physLastLine, and visibleLines.

Referenced by blinkCaret(), invalidateSelectedLines(), org::gjt::sp::jedit::textarea::TextAreaPainter::setBlockCaretEnabled(), setCaretBlinkEnabled(), org::gjt::sp::jedit::textarea::TextAreaPainter::setCaretColor(), org::gjt::sp::jedit::textarea::TextAreaPainter::setLineHighlightColor(), setOverwriteEnabled(), and org::gjt::sp::jedit::textarea::TextAreaPainter::setThickCaretEnabled().

      {
            if(!isShowing()
                  || buffer.isLoading()
                  || line < getFirstPhysicalLine()
                  || line > physLastLine
                  || !displayManager.isLineVisible(line))
                  return;

            int startLine = -1;
            int endLine = -1;

            for(int i = 0; i < visibleLines; i++)
            {
                  ChunkCache.LineInfo info = chunkCache.getLineInfo(i);

                  if((info.physicalLine >= line || info.physicalLine == -1)
                        && startLine == -1)
                  {
                        startLine = i;
                  }

                  if((info.physicalLine >= line && info.lastSubregion)
                        || info.physicalLine == -1)
                  {
                        endLine = i;
                        break;
                  }
            }

            if(chunkCache.needFullRepaint() || endLine == -1)
                  endLine = visibleLines;

            invalidateScreenLineRange(startLine,endLine);
      } //}}}


Generated by  Doxygen 1.6.0   Back to index