src/share/classes/javax/swing/table/DefaultTableColumnModel.java

Print this page

        

*** 267,282 **** public int getColumnIndex(Object identifier) { if (identifier == null) { throw new IllegalArgumentException("Identifier is null"); } ! Enumeration enumeration = getColumns(); TableColumn aColumn; int index = 0; while (enumeration.hasMoreElements()) { ! aColumn = (TableColumn)enumeration.nextElement(); // Compare them this way in case the column's identifier is null. if (identifier.equals(aColumn.getIdentifier())) return index; index++; } --- 267,282 ---- public int getColumnIndex(Object identifier) { if (identifier == null) { throw new IllegalArgumentException("Identifier is null"); } ! Enumeration<TableColumn> enumeration = getColumns(); TableColumn aColumn; int index = 0; while (enumeration.hasMoreElements()) { ! aColumn = enumeration.nextElement(); // Compare them this way in case the column's identifier is null. if (identifier.equals(aColumn.getIdentifier())) return index; index++; }
*** 726,739 **** /** * Recalculates the total combined width of all columns. Updates the * <code>totalColumnWidth</code> property. */ protected void recalcWidthCache() { ! Enumeration enumeration = getColumns(); totalColumnWidth = 0; while (enumeration.hasMoreElements()) { ! totalColumnWidth += ((TableColumn)enumeration.nextElement()).getWidth(); } } private void invalidateWidthCache() { totalColumnWidth = -1; --- 726,739 ---- /** * Recalculates the total combined width of all columns. Updates the * <code>totalColumnWidth</code> property. */ protected void recalcWidthCache() { ! Enumeration<TableColumn> enumeration = getColumns(); totalColumnWidth = 0; while (enumeration.hasMoreElements()) { ! totalColumnWidth += enumeration.nextElement().getWidth(); } } private void invalidateWidthCache() { totalColumnWidth = -1;