src/share/classes/javax/swing/plaf/basic/BasicTableUI.java

Print this page

        

@@ -1708,13 +1708,13 @@
      * row height times the number of rows.
      * The minimum width is the sum of the minimum widths of each column.
      */
     public Dimension getMinimumSize(JComponent c) {
         long width = 0;
-        Enumeration enumeration = table.getColumnModel().getColumns();
+        Enumeration<TableColumn> enumeration = table.getColumnModel().getColumns();
         while (enumeration.hasMoreElements()) {
-            TableColumn aColumn = (TableColumn)enumeration.nextElement();
+            TableColumn aColumn = enumeration.nextElement();
             width = width + aColumn.getMinWidth();
         }
         return createTableSize(width);
     }
 

@@ -1723,13 +1723,13 @@
      * row height times the number of rows.
      * The preferred width is the sum of the preferred widths of each column.
      */
     public Dimension getPreferredSize(JComponent c) {
         long width = 0;
-        Enumeration enumeration = table.getColumnModel().getColumns();
+        Enumeration<TableColumn> enumeration = table.getColumnModel().getColumns();
         while (enumeration.hasMoreElements()) {
-            TableColumn aColumn = (TableColumn)enumeration.nextElement();
+            TableColumn aColumn = enumeration.nextElement();
             width = width + aColumn.getPreferredWidth();
         }
         return createTableSize(width);
     }
 

@@ -1738,13 +1738,13 @@
      * row heighttimes the number of rows.
      * The maximum width is the sum of the maximum widths of each column.
      */
     public Dimension getMaximumSize(JComponent c) {
         long width = 0;
-        Enumeration enumeration = table.getColumnModel().getColumns();
+        Enumeration<TableColumn> enumeration = table.getColumnModel().getColumns();
         while (enumeration.hasMoreElements()) {
-            TableColumn aColumn = (TableColumn)enumeration.nextElement();
+            TableColumn aColumn = enumeration.nextElement();
             width = width + aColumn.getMaxWidth();
         }
         return createTableSize(width);
     }