mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
cleanup, reuse getItem
This commit is contained in:
@@ -108,21 +108,18 @@ public class ListTableModel<Item> extends TableViewModel<Item> implements ItemRe
|
||||
|
||||
@Override
|
||||
public Object getValueAt(int rowIndex, int columnIndex) {
|
||||
return myColumnInfos[columnIndex].valueOf(myItems.get(rowIndex));
|
||||
return myColumnInfos[columnIndex].valueOf(getItem(rowIndex));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setValueAt(Object aValue, int rowIndex, int columnIndex) {
|
||||
if (rowIndex < myItems.size()) {
|
||||
myColumnInfos[columnIndex].setValue(myItems.get(rowIndex), aValue);
|
||||
myColumnInfos[columnIndex].setValue(getItem(rowIndex), aValue);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* true if changed
|
||||
*
|
||||
* @param columnInfos
|
||||
* @return
|
||||
*/
|
||||
public boolean setColumnInfos(ColumnInfo[] columnInfos) {
|
||||
if (myColumnInfos != null && Arrays.equals(columnInfos, myColumnInfos)) {
|
||||
|
||||
Reference in New Issue
Block a user