int lineCount= fTextLayout.getLineCount(); int textWidth= 0; for (int i= 0; i < lineCount; i++) {
int lineCount= textLayout.getLineCount(); if (lineCount < 5) gridData.heightHint= textLayout.getLineBounds(0).height * 6;
int lineCount= textLayout.getLineCount(); if (lineCount < 5) gridData.heightHint= textLayout.getLineBounds(0).height * 6;
Rectangle [] getRectanglesInPixels (int linkIndex) { int lineCount = layout.getLineCount (); Rectangle [] rects = new Rectangle [lineCount]; int [] lineOffsets = layout.getLineOffsets (); Point point = offsets [linkIndex]; int lineStart = 1; while (point.x > lineOffsets [lineStart]) lineStart++; int lineEnd = 1; while (point.y > lineOffsets [lineEnd]) lineEnd++; int index = 0; if (lineStart == lineEnd) { rects [index++] = DPIUtil.autoScaleUp(layout.getBounds (point.x, point.y)); } else { rects [index++] = DPIUtil.autoScaleUp(layout.getBounds (point.x, lineOffsets [lineStart]-1)); rects [index++] = DPIUtil.autoScaleUp(layout.getBounds (lineOffsets [lineEnd-1], point.y)); if (lineEnd - lineStart > 1) { for (int i = lineStart; i < lineEnd - 1; i++) { rects [index++] = DPIUtil.autoScaleUp(layout.getLineBounds (i)); } } } if (rects.length != index) { Rectangle [] tmp = new Rectangle [index]; System.arraycopy (rects, 0, tmp, 0, index); rects = tmp; } return rects; }
Rectangle [] getRectanglesInPixels (int linkIndex) { int lineCount = layout.getLineCount (); Rectangle [] rects = new Rectangle [lineCount]; int [] lineOffsets = layout.getLineOffsets (); Point point = offsets [linkIndex]; int lineStart = 1; while (point.x > lineOffsets [lineStart]) lineStart++; int lineEnd = 1; while (point.y > lineOffsets [lineEnd]) lineEnd++; int index = 0; if (lineStart == lineEnd) { rects [index++] = DPIUtil.autoScaleUp (layout.getBounds (point.x, point.y)); } else { rects [index++] = DPIUtil.autoScaleUp (layout.getBounds (point.x, lineOffsets [lineStart]-1)); rects [index++] = DPIUtil.autoScaleUp (layout.getBounds (lineOffsets [lineEnd-1], point.y)); if (lineEnd - lineStart > 1) { for (int i = lineStart; i < lineEnd - 1; i++) { rects [index++] = DPIUtil.autoScaleUp (layout.getLineBounds (i)); } } } if (rects.length != index) { Rectangle [] tmp = new Rectangle [index]; System.arraycopy (rects, 0, tmp, 0, index); rects = tmp; } return rects; }
Rectangle [] getRectanglesInPixels (int linkIndex) { int lineCount = layout.getLineCount (); Rectangle [] rects = new Rectangle [lineCount]; int [] lineOffsets = layout.getLineOffsets (); Point point = offsets [linkIndex]; int lineStart = 1; while (point.x > lineOffsets [lineStart]) lineStart++; int lineEnd = 1; while (point.y > lineOffsets [lineEnd]) lineEnd++; int index = 0; if (lineStart == lineEnd) { rects [index++] = DPIUtil.autoScaleUp (layout.getBounds (point.x, point.y)); } else { rects [index++] = DPIUtil.autoScaleUp (layout.getBounds (point.x, lineOffsets [lineStart]-1)); rects [index++] = DPIUtil.autoScaleUp (layout.getBounds (lineOffsets [lineEnd-1], point.y)); if (lineEnd - lineStart > 1) { for (int i = lineStart; i < lineEnd - 1; i++) { rects [index++] = DPIUtil.autoScaleUp (layout.getLineBounds (i)); } } } if (rects.length != index) { Rectangle [] tmp = new Rectangle [index]; System.arraycopy (rects, 0, tmp, 0, index); rects = tmp; } return rects; }
Rectangle [] getRectanglesInPixels (int linkIndex) { int lineCount = layout.getLineCount (); Rectangle [] rects = new Rectangle [lineCount]; int [] lineOffsets = layout.getLineOffsets (); Point point = offsets [linkIndex]; int lineStart = 1; while (point.x > lineOffsets [lineStart]) lineStart++; int lineEnd = 1; while (point.y > lineOffsets [lineEnd]) lineEnd++; int index = 0; if (lineStart == lineEnd) { rects [index++] = DPIUtil.autoScaleUp (layout.getBounds (point.x, point.y)); } else { rects [index++] = DPIUtil.autoScaleUp (layout.getBounds (point.x, lineOffsets [lineStart]-1)); rects [index++] = DPIUtil.autoScaleUp (layout.getBounds (lineOffsets [lineEnd-1], point.y)); if (lineEnd - lineStart > 1) { for (int i = lineStart; i < lineEnd - 1; i++) { rects [index++] = DPIUtil.autoScaleUp (layout.getLineBounds (i)); } } } if (rects.length != index) { Rectangle [] tmp = new Rectangle [index]; System.arraycopy (rects, 0, tmp, 0, index); rects = tmp; } return rects; }
TextLayout layout = renderer.getTextLayout(lineIndex); int y = (clientAreaHeight - bottomMargin) - getLinePixel(lineIndex); int index = layout.getLineCount() - 1; while (index >= 0) { Rectangle bounds = layout.getLineBounds(index);
TextLayout layout = renderer.getTextLayout(lineIndex); int y = (clientAreaHeight - bottomMargin) - getLinePixel(lineIndex); int index = layout.getLineCount() - 1; while (index >= 0) { Rectangle bounds = layout.getLineBounds(index);
TextLayout layout = renderer.getTextLayout(lineIndex); int y = (clientAreaHeight - bottomMargin) - getLinePixel(lineIndex); int index = layout.getLineCount() - 1; while (index >= 0) { Rectangle bounds = layout.getLineBounds(index);
TextLayout layout = renderer.getTextLayout(lineIndex); int y = (clientAreaHeight - bottomMargin) - getLinePixel(lineIndex); int index = layout.getLineCount() - 1; while (index >= 0) { Rectangle bounds = layout.getLineBounds(index);
TextLayout layout = renderer.getTextLayout(lineIndex); int y = (clientAreaHeight - bottomMargin) - getLinePixel(lineIndex); int index = layout.getLineCount() - 1; while (index >= 0) { Rectangle bounds = layout.getLineBounds(index);
try { computeRuns(); int lineCount = getLineCount(); if (!(0 <= lineIndex && lineIndex < lineCount)) SWT.error(SWT.ERROR_INVALID_RANGE); int length = text.length();
int lineCount = layout.getLineCount(); while (index < lineCount) { Rectangle bounds = layout.getLineBounds(index);
int lineCount = layout.getLineCount(); while (index < lineCount) { Rectangle bounds = layout.getLineBounds(index);
int lineCount = layout.getLineCount(); while (index < lineCount) { Rectangle bounds = layout.getLineBounds(index);
int lineCount = layout.getLineCount(); while (index < lineCount) { Rectangle bounds = layout.getLineBounds(index);
int lineCount = layout.getLineCount(); while (index < lineCount) { Rectangle bounds = layout.getLineBounds(index);
TextLayout layout = renderer.getTextLayout(caretLine); int lineIndex = getVisualLineIndex(layout, offsetInLine); int layoutLineCount = layout.getLineCount(); if (lineIndex == layoutLineCount - 1) { lastLine = caretLine == lineCount - 1;
TextLayout layout = renderer.getTextLayout(caretLine); int lineIndex = getVisualLineIndex(layout, offsetInLine); int layoutLineCount = layout.getLineCount(); if (lineIndex == layoutLineCount - 1) { lastLine = caretLine == lineCount - 1;