< prev index next >
src/com/sun/interview/wizard/EditableList.java
Print this page
rev 145 : 7902237: Fixing raw use of parameterized class
Reviewed-by: jjg
*** 118,128 ****
/**
* Get the items currently in the list, in an array of a specific type.
* @param c the component type of the array to be returned
* @return an array containing the items currently in the list
*/
! public Object[] getItems(Class c) {
Object[] items = (Object[]) (Array.newInstance(c, listModel.size()));
listModel.copyInto(items);
return items;
}
--- 118,128 ----
/**
* Get the items currently in the list, in an array of a specific type.
* @param c the component type of the array to be returned
* @return an array containing the items currently in the list
*/
! public Object[] getItems(Class<?> c) {
Object[] items = (Object[]) (Array.newInstance(c, listModel.size()));
listModel.copyInto(items);
return items;
}
*** 279,289 ****
JOptionPane.INFORMATION_MESSAGE);
}
protected class Renderer
extends DefaultListCellRenderer {
! public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) {
return super.getListCellRendererComponent(list,
getDisplayValue(value),
index,
isSelected,
cellHasFocus);
--- 279,289 ----
JOptionPane.INFORMATION_MESSAGE);
}
protected class Renderer
extends DefaultListCellRenderer {
! public Component getListCellRendererComponent(JList<?> list, Object value, int index, boolean isSelected, boolean cellHasFocus) {
return super.getListCellRendererComponent(list,
getDisplayValue(value),
index,
isSelected,
cellHasFocus);
< prev index next >