Lines Matching refs:p0

96      * @param p0 the starting document location to use >= 0
104 protected void drawLine(int p0, int p1, Graphics g, int x, int y) {
106 Element line = lineMap.getElement(lineMap.getElementIndex(p0));
111 drawText(line, p0, p1, g, x, y);
114 int idx = line.getElementIndex(p0);
118 int start = Math.max(elem.getStartOffset(), p0);
124 throw new StateInvariantError("Can't render: " + p0 + "," + p1);
128 private int drawText(Element elem, int p0, int p1, Graphics g, int x, int y) throws BadLocationException {
135 p0-elem.getStartOffset(),
140 x = drawUnselectedText(g, x, y, p0, p1);
141 } else if ((p0 >= sel0 && p0 <= sel1) && (p1 >= sel0 && p1 <= sel1)) {
142 x = drawSelectedText(g, x, y, p0, p1);
143 } else if (sel0 >= p0 && sel0 <= p1) {
144 if (sel1 >= p0 && sel1 <= p1) {
145 x = drawUnselectedText(g, x, y, p0, sel0);
149 x = drawUnselectedText(g, x, y, p0, sel0);
152 } else if (sel1 >= p0 && sel1 <= p1) {
153 x = drawSelectedText(g, x, y, p0, sel1);
156 x = drawUnselectedText(g, x, y, p0, p1);
170 * @param p0 the beginning position in the model >= 0
171 * @param p1 the ending position in the model >= p0
176 int p0, int p1) throws BadLocationException {
180 doc.getText(p0, p1 - p0, segment);
181 int ret = Utilities.drawTabbedText(this, segment, x, y, g, this, p0);
195 * @param p0 the beginning position in the model >= 0
196 * @param p1 the ending position in the model >= p0
201 int y, int p0, int p1) throws BadLocationException {
205 doc.getText(p0, p1 - p0, segment);
206 int ret = Utilities.drawTabbedText(this, segment, x, y, g, this, p0);
232 protected int calculateBreakPosition(int p0, int p1) {
235 loadText(segment, p0, p1);
238 p = p0 + Utilities.getBreakLocation(segment, metrics,
240 this, p0);
242 p = p0 + Utilities.getTabbedTextOffset(segment, metrics,
244 this, p0, false);
306 final void loadText(Segment segment, int p0, int p1) {
309 doc.getText(p0, p1 - p0, segment);
590 int p0 = start;
599 dh.paintLayeredHighlights(g, p0, hOffset, a, host, this);
601 drawLine(p0, p1, g, x, y);
603 p0 = p1;
625 int p0 = getStartOffset();
626 if (pos < p0 || pos > getEndOffset()) {
631 Math.max(p0, pos - 1);
635 line = findLine(testP - p0);
637 p0 += lineEnds[line - 1];
642 if (pos > p0) {
644 loadText(segment, p0, pos);
646 alloc.x, WrappedPlainView.this, p0);
690 int p0 = getStartOffset();
696 p1 = p0 + lineEnds[line];
698 p0 += lineEnds[line - 1];
704 return p0;
711 loadText(segment, p0, p1);
714 WrappedPlainView.this, p0);
716 return Math.min(p0 + n, p1 - 1);
779 int p0 = (lineIndex == 0) ? start : start + lineEnds[lineIndex - 1];
781 while (p0 < p1) {
782 int p = calculateBreakPosition(p0, p1);
783 p0 = (p == p0) ? ++p : p; // 4410243
785 if (lineIndex == 0 && p0 >= p1) {
794 double growFactor = ((double)(p1 - start) / (p0 - start));
803 lineEnds[lineIndex++] = p0 - start;