/** * Changes the width of the cells in the JList so you can see every digit * of each. */ void updateCellWidths() { int oldCellWidth = cellWidth; cellWidth = getRhsBorderWidth(); // Adjust the amount of space the line numbers take up, if necessary. if (textArea!=null) { Font font = getFont(); if (font!=null) { FontMetrics fontMetrics = getFontMetrics(font); int count = 0; int lineCount = textArea.getLineCount() + getLineNumberingStartIndex() - 1; do { lineCount = lineCount/10; count++; } while (lineCount >= 10); cellWidth += fontMetrics.charWidth('9')*(count+1) + 3; } } if (cellWidth!=oldCellWidth) { // Always true revalidate(); } }
visibleEditorRect); int y = r.y; final int rhsBorderWidth = getRhsBorderWidth(); int rhs; boolean ltr = getComponentOrientation().isLeftToRight();
topLine += fm.getHiddenLineCountAbove(topLine, true); final int rhsBorderWidth = getRhsBorderWidth();
/** * Changes the width of the cells in the JList so you can see every digit * of each. */ void updateCellWidths() { int oldCellWidth = cellWidth; cellWidth = getRhsBorderWidth(); // Adjust the amount of space the line numbers take up, if necessary. if (textArea!=null) { Font font = getFont(); if (font!=null) { FontMetrics fontMetrics = getFontMetrics(font); int count = 0; int lineCount = textArea.getLineCount() + getLineNumberingStartIndex() - 1; do { lineCount = lineCount/10; count++; } while (lineCount >= 10); cellWidth += fontMetrics.charWidth('9')*(count+1) + 3; } } if (cellWidth!=oldCellWidth) { // Always true revalidate(); } }
visibleEditorRect); int y = r.y; final int rhsBorderWidth = getRhsBorderWidth(); int rhs; boolean ltr = getComponentOrientation().isLeftToRight();
topLine += fm.getHiddenLineCountAbove(topLine, true); final int rhsBorderWidth = getRhsBorderWidth();