Merged gcj-eclipse branch to trunk.

From-SVN: r120621
This commit is contained in:
Tom Tromey 2007-01-09 19:58:05 +00:00
parent c648dedbde
commit 97b8365caf
17478 changed files with 606493 additions and 100744 deletions

View file

@ -125,7 +125,7 @@ public abstract class AbstractTableModel implements TableModel, Serializable
*
* @return The class.
*/
public Class getColumnClass(int columnIndex)
public Class<?> getColumnClass(int columnIndex)
{
return Object.class;
}
@ -294,7 +294,7 @@ public abstract class AbstractTableModel implements TableModel, Serializable
*
* @return An array of listeners (possibly empty).
*/
public EventListener[] getListeners(Class listenerType)
public <T extends EventListener> T[] getListeners(Class<T> listenerType)
{
return listenerList.getListeners(listenerType);
}

View file

@ -71,7 +71,7 @@ public class DefaultTableColumnModel
/**
* Storage for the table columns.
*/
protected Vector tableColumns;
protected Vector<TableColumn> tableColumns;
/**
* A selection model that keeps track of column selections.
@ -187,7 +187,7 @@ public class DefaultTableColumnModel
throw new IllegalArgumentException("Index 'i' out of range.");
if (j < 0 || j >= columnCount)
throw new IllegalArgumentException("Index 'j' out of range.");
Object column = tableColumns.remove(i);
TableColumn column = tableColumns.remove(i);
tableColumns.add(j, column);
fireColumnMoved(new TableColumnModelEvent(this, i, j));
}
@ -221,7 +221,7 @@ public class DefaultTableColumnModel
*
* @return An enumeration of the columns in the model.
*/
public Enumeration getColumns()
public Enumeration<TableColumn> getColumns()
{
return tableColumns.elements();
}
@ -597,7 +597,7 @@ public class DefaultTableColumnModel
* @return An array containing the listeners (of the specified type) that
* are registered with this model.
*/
public EventListener[] getListeners(Class listenerType)
public <T extends EventListener> T[] getListeners(Class<T> listenerType)
{
return listenerList.getListeners(listenerType);
}

View file

@ -625,7 +625,7 @@ public class DefaultTableModel extends AbstractTableModel
if (columnCount > columnIdentifiers.size())
columnIdentifiers.setSize(columnCount);
if (rowCount > dataVector.size())
if (dataVector != null && rowCount > dataVector.size())
{
int rowsToAdd = rowCount - dataVector.size();
addExtraRows(rowsToAdd, columnCount);

View file

@ -102,7 +102,7 @@ public interface TableColumnModel
*
* @return An enumeration of the columns in the model.
*/
Enumeration getColumns();
Enumeration<TableColumn> getColumns();
/**
* Returns the index of the {@link TableColumn} with the given identifier.

View file

@ -84,7 +84,7 @@ public interface TableModel
*
* @return The class.
*/
Class getColumnClass(int columnIndex);
Class<?> getColumnClass(int columnIndex);
/**
* Returns <code>true</code> if the cell is editable, and <code>false</code>