if (e.getId() == MapEvent.REMOVE) {
removeFromHistory(e);
}
for (EventListener listener : listenerList.getListeners(ObjEntityListener.class)) {
ObjEntityListener temp = (ObjEntityListener) listener;
switch (e.getId()) {
case MapEvent.ADD:
temp.objEntityAdded(e);
break;
case MapEvent.CHANGE:
temp.objEntityChanged(e);
break;
case MapEvent.REMOVE:
temp.objEntityRemoved(e);
break;
default:
throw new IllegalArgumentException("Invalid EntityEvent type: " + e.getId());
}
}