Graphics2D g2 = (Graphics2D) g;
Iterator<RadarPlaneObject> it = atmcModel.getRadarPlaneObjects().values().iterator();
int planeCount = 0;
while (it.hasNext()) {
RadarPlaneObject current = it.next();
Float cAltitude = 0f;
try {
cAltitude = current.getAltitude();
} catch (NumberFormatException e) {
}
if (cAltitude > atmcModel.getMinHeight() && cAltitude < atmcModel.getMaxHeight()) {
if (!lastPlanePosition.containsKey(current.getIp())) {
lastPlanePosition.put(current.getIp(), null);
}
PlaneDataObject lastPos = lastPlanePosition.get(current.getIp());
PlaneDataObject currentPos = (PlaneDataObject) current.getCurrentPos();
if (currentPos != null && !currentPos.equals(lastPlanePosition.get(current.getIp()))) {
lastPlanePosition.put(current.getIp(), currentPos);
}
if (currentPos != null) {
drawHistoryList(g2, current);
drawPlaneShape(g2, current);