if (element instanceof Track) {
Track track = (Track)element;
switch (columnIndex) {
case 0:
return track.getName();
case 1:
return Integer.toString(track.getPointCount());
case 2:
long time = track.getFirstPointTime();
if (time != -1) {
return new Date(time).toString();
}
break;
case 3:
time = track.getLastPointTime();
if (time != -1) {
return new Date(time).toString();
}
break;
case 4:
return track.getComment();
}
}
return null;