diff options
author | tromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-01-09 19:58:05 +0000 |
---|---|---|
committer | tromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-01-09 19:58:05 +0000 |
commit | 65bf3316cf384588453604be6b4f0ed3751a8b0f (patch) | |
tree | 996a5f57d4a68c53473382e45cb22f574cb3e4db /libjava/classpath/javax/swing/table | |
parent | 8fc56618a84446beccd45b80381cdfe0e94050df (diff) | |
download | ppe42-gcc-65bf3316cf384588453604be6b4f0ed3751a8b0f.tar.gz ppe42-gcc-65bf3316cf384588453604be6b4f0ed3751a8b0f.zip |
Merged gcj-eclipse branch to trunk.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@120621 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/classpath/javax/swing/table')
5 files changed, 9 insertions, 9 deletions
diff --git a/libjava/classpath/javax/swing/table/AbstractTableModel.java b/libjava/classpath/javax/swing/table/AbstractTableModel.java index 7914e0b3f46..66b6a0743b6 100644 --- a/libjava/classpath/javax/swing/table/AbstractTableModel.java +++ b/libjava/classpath/javax/swing/table/AbstractTableModel.java @@ -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); } diff --git a/libjava/classpath/javax/swing/table/DefaultTableColumnModel.java b/libjava/classpath/javax/swing/table/DefaultTableColumnModel.java index 33e68ea9fcd..e4e7201b184 100644 --- a/libjava/classpath/javax/swing/table/DefaultTableColumnModel.java +++ b/libjava/classpath/javax/swing/table/DefaultTableColumnModel.java @@ -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); } diff --git a/libjava/classpath/javax/swing/table/DefaultTableModel.java b/libjava/classpath/javax/swing/table/DefaultTableModel.java index 79285903c00..1b68ce2be81 100644 --- a/libjava/classpath/javax/swing/table/DefaultTableModel.java +++ b/libjava/classpath/javax/swing/table/DefaultTableModel.java @@ -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); diff --git a/libjava/classpath/javax/swing/table/TableColumnModel.java b/libjava/classpath/javax/swing/table/TableColumnModel.java index 986c0253323..7e8a70c3a5b 100644 --- a/libjava/classpath/javax/swing/table/TableColumnModel.java +++ b/libjava/classpath/javax/swing/table/TableColumnModel.java @@ -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. diff --git a/libjava/classpath/javax/swing/table/TableModel.java b/libjava/classpath/javax/swing/table/TableModel.java index 016ae171dd4..7629fa4e404 100644 --- a/libjava/classpath/javax/swing/table/TableModel.java +++ b/libjava/classpath/javax/swing/table/TableModel.java @@ -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> |