use of org.apache.cayenne.modeler.event.ProcedureDisplayListener in project cayenne by apache.
the class ProjectController method fireProcedureDisplayEvent.
public void fireProcedureDisplayEvent(ProcedureDisplayEvent e) {
boolean changed = e.getProcedure() != currentState.procedure;
if (!e.isRefired()) {
e.setProcedureChanged(changed);
if (changed) {
clearState();
currentState.domain = e.getDomain();
currentState.map = e.getDataMap();
currentState.procedure = e.getProcedure();
}
}
if (changed) {
saveState(e);
}
for (EventListener eventListener : listenerList.getListeners(ProcedureDisplayListener.class)) {
ProcedureDisplayListener listener = (ProcedureDisplayListener) eventListener;
listener.currentProcedureChanged(e);
}
}
Aggregations