int getLineHeight(int lineIndex) { if (lineHeight[lineIndex] == -1) { calculate(lineIndex, 1); } return lineHeight[lineIndex]; } int getLineIndent(int index, int defaultIndent) {
void resetCache(int firstLine, int count) { int maxLineIndex = renderer.maxWidthLineIndex; renderer.reset(firstLine, count); renderer.calculateClientArea(); if (0 <= maxLineIndex && maxLineIndex < content.getLineCount()) { renderer.calculate(maxLineIndex, 1); } setScrollBars(true); if (!isFixedLineHeight()) { if (topIndex > firstLine) { verticalScrollOffset = -1; } renderer.calculateIdle(); } } /**
void resetCache(int firstLine, int count) { int maxLineIndex = renderer.maxWidthLineIndex; renderer.reset(firstLine, count); renderer.calculateClientArea(); if (0 <= maxLineIndex && maxLineIndex < content.getLineCount()) { renderer.calculate(maxLineIndex, 1); } setScrollBars(true); if (!isFixedLineHeight()) { if (topIndex > firstLine) { verticalScrollOffset = -1; } renderer.calculateIdle(); } } /**
int getLineHeight(int lineIndex) { if (lineHeight[lineIndex] == -1) { calculate(lineIndex, 1); } return lineHeight[lineIndex]; } int getLineIndent(int index, int defaultIndent) {
void resetCache(int firstLine, int count) { int maxLineIndex = renderer.maxWidthLineIndex; renderer.reset(firstLine, count); renderer.calculateClientArea(); if (0 <= maxLineIndex && maxLineIndex < content.getLineCount()) { renderer.calculate(maxLineIndex, 1); } setScrollBars(true); if (!isFixedLineHeight()) { if (topIndex > firstLine) { verticalScrollOffset = -1; } renderer.calculateIdle(); } } /**
int getLineHeight(int lineIndex) { if (lineHeight[lineIndex] == -1) { calculate(lineIndex, 1); } return lineHeight[lineIndex]; } int getLineIndent(int index, int defaultIndent) {
void resetCache(int firstLine, int count) { int maxLineIndex = renderer.maxWidthLineIndex; renderer.reset(firstLine, count); renderer.calculateClientArea(); if (0 <= maxLineIndex && maxLineIndex < content.getLineCount()) { renderer.calculate(maxLineIndex, 1); } setScrollBars(true); if (!isFixedLineHeight()) { if (topIndex > firstLine) { verticalScrollOffset = -1; } renderer.calculateIdle(); } } /**
int getLineHeight(int lineIndex) { if (lineHeight[lineIndex] == -1) { calculate(lineIndex, 1); } return lineHeight[lineIndex]; } int getLineIndent(int index, int defaultIndent) {
void resetCache(int firstLine, int count) { int maxLineIndex = renderer.maxWidthLineIndex; renderer.reset(firstLine, count); renderer.calculateClientArea(); if (0 <= maxLineIndex && maxLineIndex < content.getLineCount()) { renderer.calculate(maxLineIndex, 1); } setScrollBars(true); if (!isFixedLineHeight()) { if (topIndex > firstLine) { verticalScrollOffset = -1; } renderer.calculateIdle(); } } /**
int getLineHeight(int lineIndex) { if (lineHeight[lineIndex] == -1) { calculate(lineIndex, 1); } return lineHeight[lineIndex]; } int getLineIndent(int index, int defaultIndent) {
int getVerticalScrollOffset() { if (verticalScrollOffset == -1) { renderer.calculate(0, topIndex); int height = 0; for (int i = 0; i < topIndex; i++) { height += renderer.getLineHeight(i); } height -= topIndexY; verticalScrollOffset = height; } return verticalScrollOffset; } int getVisualLineIndex(TextLayout layout, int offsetInLine) {
int getVerticalScrollOffset() { if (verticalScrollOffset == -1) { renderer.calculate(0, topIndex); int height = 0; for (int i = 0; i < topIndex; i++) { height += renderer.getLineHeight(i); } height -= topIndexY; verticalScrollOffset = height; } return verticalScrollOffset; } int getVisualLineIndex(TextLayout layout, int offsetInLine) {
int getVerticalScrollOffset() { if (verticalScrollOffset == -1) { renderer.calculate(0, topIndex); int height = 0; for (int i = 0; i < topIndex; i++) { height += renderer.getLineHeight(i); } height -= topIndexY; verticalScrollOffset = height; } return verticalScrollOffset; } int getVisualLineIndex(TextLayout layout, int offsetInLine) {
int getVerticalScrollOffset() { if (verticalScrollOffset == -1) { renderer.calculate(0, topIndex); int height = 0; for (int i = 0; i < topIndex; i++) { height += renderer.getLineHeight(i); } height -= topIndexY; verticalScrollOffset = height; } return verticalScrollOffset; } int getVisualLineIndex(TextLayout layout, int offsetInLine) {
int getVerticalScrollOffset() { if (verticalScrollOffset == -1) { renderer.calculate(0, topIndex); int height = 0; for (int i = 0; i < topIndex; i++) { height += renderer.getLineHeight(i); } height -= topIndexY; verticalScrollOffset = height; } return verticalScrollOffset; } int getVisualLineIndex(TextLayout layout, int offsetInLine) {
void calculateClientArea () { int index = Math.max (0, styledText.getTopIndex()); int lineCount = content.getLineCount(); int height = styledText.getClientArea().height; int y = 0; /* * There exists a possibility of ArrayIndexOutOfBounds Exception in * below code, exact scenario not known. To avoid this exception added * check for 'index' value, refer Bug 471192. */ while (height > y && lineCount > index && lineHeight.length > index) { calculate(index, 1); y += lineHeight[index++]; } } void calculateIdle () {
void calculateClientArea () { int index = Math.max (0, styledText.getTopIndex()); int lineCount = content.getLineCount(); int height = styledText.getClientArea().height; int y = 0; /* * There exists a possibility of ArrayIndexOutOfBounds Exception in * below code, exact scenario not known. To avoid this exception added * check for 'index' value, refer Bug 471192. */ while (height > y && lineCount > index && lineHeight.length > index) { calculate(index, 1); y += lineHeight[index++]; } } void calculateIdle () {
void calculateClientArea () { int index = Math.max (0, styledText.getTopIndex()); int lineCount = content.getLineCount(); int height = styledText.getClientArea().height; int y = 0; /* * There exists a possibility of ArrayIndexOutOfBounds Exception in * below code, exact scenario not known. To avoid this exception added * check for 'index' value, refer Bug 471192. */ while (height > y && lineCount > index && lineHeight.length > index) { calculate(index, 1); y += lineHeight[index++]; } } void calculateIdle () {
void calculateClientArea () { int index = Math.max (0, styledText.getTopIndex()); int lineCount = content.getLineCount(); int height = styledText.getClientArea().height; int y = 0; /* * There exists a possibility of ArrayIndexOutOfBounds Exception in * below code, exact scenario not known. To avoid this exception added * check for 'index' value, refer Bug 471192. */ while (height > y && lineCount > index && lineHeight.length > index) { calculate(index, 1); y += lineHeight[index++]; } } void calculateIdle () {
void calculateClientArea () { int index = styledText.getTopIndex(); int lineCount = content.getLineCount(); int height = styledText.getClientArea().height; int y = 0; while (height > y && lineCount > index) { calculate(index, 1); y += lineHeight[index++]; } } void calculateIdle () {