Lines Matching defs:p1

97      * @param p1 the ending document location to use >= p1
104 protected void drawLine(int p0, int p1, Graphics g, int x, int y) {
111 drawText(line, p0, p1, g, x, y);
115 int lastIdx = line.getElementIndex(p1);
119 int end = Math.min(elem.getEndOffset(), p1);
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 {
129 p1 = Math.min(getDocument().getLength(), p1);
136 p1-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) {
147 x = drawUnselectedText(g, x, y, sel1, p1);
150 x = drawSelectedText(g, x, y, sel0, p1);
152 } else if (sel1 >= p0 && sel1 <= p1) {
154 x = drawUnselectedText(g, x, y, sel1, p1);
156 x = drawUnselectedText(g, x, y, p0, p1);
171 * @param p1 the ending position in the model >= p0
176 int p0, int p1) throws BadLocationException {
180 doc.getText(p0, p1 - p0, segment);
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);
232 protected int calculateBreakPosition(int p0, int p1) {
235 loadText(segment, p0, p1);
306 final void loadText(Segment segment, int p0, int p1) {
309 doc.getText(p0, p1 - p0, segment);
593 int p1 = (lineEnds == null) ? end :
596 int hOffset = (p1 == end)
597 ? (p1 - 1)
598 : p1;
601 drawLine(p0, p1, g, x, y);
603 p0 = p1;
691 int p1;
693 p1 = getEndOffset();
696 p1 = p0 + lineEnds[line];
707 return p1 - 1;
711 loadText(segment, p0, p1);
716 return Math.min(p0 + n, p1 - 1);
780 int p1 = getEndOffset();
781 while (p0 < p1) {
782 int p = calculateBreakPosition(p0, p1);
785 if (lineIndex == 0 && p0 >= p1) {
794 double growFactor = ((double)(p1 - start) / (p0 - start));