Methods Summary |
---|
public void | addRow(RestaurantInfo info)
rows.add(info);
fireTableDataChanged();
|
public java.lang.Class | getColumnClass(int columnIndex)
return String.class;
|
public int | getColumnCount()
return columnNames.size();
|
public java.lang.String | getColumnName(int columnIndex)
return columnNames.get(columnIndex).toString();
|
public int | getRowCount()
return rows.size();
|
public java.lang.Object | getValueAt(int rowIndex, int columnIndex)
RestaurantInfo restaurantInfo = (RestaurantInfo) rows.get(rowIndex);
if (columnIndex == 0){ // name
return restaurantInfo.getName();
} else if (columnIndex == 1){ // category
return restaurantInfo.getType();
} else if (columnIndex == 2){ // phone
return restaurantInfo.getPhone();
} else if (columnIndex == 3){ // street
return restaurantInfo.getStreet();
} else if (columnIndex == 4){ // city
return restaurantInfo.getCity();
} else if (columnIndex == 5){ // state
return restaurantInfo.getState();
} else if (columnIndex == 6){ // zip
return restaurantInfo.getZip();
} else {
return "";
}
|
public boolean | isCellEditable(int rowIndex, int columnIndex)
return false;
|
public void | removeRow(RestaurantInfo info)
rows.remove(info);
fireTableDataChanged();
|
public void | setValueAt(java.lang.Object aValue, int rowIndex, int columnIndex)
//no op
|