if (e.getId() == MapEvent.REMOVE) {
removeFromHistory(e);
}
for (EventListener listener : listenerList.getListeners(DomainListener.class)) {
DomainListener temp = (DomainListener) listener;
switch (e.getId()) {
case MapEvent.CHANGE:
temp.domainChanged(e);
break;
default:
throw new IllegalArgumentException("Invalid DomainEvent type: " + e.getId());
}
}