/**
* @see javax.swing.table.TableModel#getValueAt(int, int)
*/
public Object getValueAt(final int rowIndex, final int columnIndex) {
GulvsponPackageV gulvsponPackageV = (GulvsponPackageV) objectSelectionList
.getElementAt(table.convertRowIndexToModel(rowIndex));
DecimalFormat decimalFormat = new DecimalFormat();
decimalFormat.setDecimalSeparatorAlwaysShown(false);
decimalFormat.setParseIntegerOnly(true);
switch (columnIndex) {
case 0:
return gulvsponPackageV.getTransportDetails();
case 1:
StringBuffer buffer = new StringBuffer(gulvsponPackageV
.getCustomerDetails());
buffer.append(" - ").append(gulvsponPackageV.getOrderNr())
.append(", ").append(gulvsponPackageV.getAddress())
.append(" ,").append(
gulvsponPackageV.getConstructionTypeName())
.append(",").append(gulvsponPackageV.getInfo());
return buffer.toString();
case 2:
return gulvsponPackageV.getNumberOfItems();
case 3:
if (gulvsponPackageV.getTransportDetails() != null) {
Date loadingDate = gulvsponPackageV.getLoadingDate();
if (loadingDate != null) {
return Util.SHORT_DATE_FORMAT.format(loadingDate);
}
return null;
}
return null;
case 4:
if (gulvsponPackageV.getColli() != null) {
return "X";
}
return "";
default:
throw new IllegalStateException("Unknown column");