if (element instanceof WayPoint) {
WayPoint wayPoint = (WayPoint)element;
switch (columnIndex) {
case 0:
return wayPoint.getName();
case 1:
return String.format("%.6f", wayPoint.getLongitude());
case 2:
return String.format("%.6f", wayPoint.getLatitude());
case 3:
if (wayPoint.hasElevation()) {
return String.format("%.1f", wayPoint.getElevation());
} else {
return "-";
}
case 4:
return wayPoint.getDescription();
}
}
return null;