use of org.apache.cayenne.modeler.event.EmbeddableDisplayListener in project cayenne by apache.
the class ProjectController method fireEmbeddableDisplayEvent.
public void fireEmbeddableDisplayEvent(EmbeddableDisplayEvent e) {
boolean changed = e.getEmbeddable() != currentState.embeddable;
if (!e.isRefired()) {
e.setEmbeddableChanged(changed);
if (changed) {
clearState();
currentState.domain = e.getDomain();
currentState.node = e.getDataNode();
currentState.map = e.getDataMap();
currentState.embeddable = e.getEmbeddable();
}
}
if (changed) {
saveState(e);
}
for (EventListener listener : listenerList.getListeners(EmbeddableDisplayListener.class)) {
EmbeddableDisplayListener temp = (EmbeddableDisplayListener) listener;
temp.currentEmbeddableChanged(e);
}
}
Aggregations