use of org.apache.cayenne.modeler.event.ObjAttributeDisplayListener in project cayenne by apache.
the class ProjectController method fireObjAttributeDisplayEvent.
public void fireObjAttributeDisplayEvent(AttributeDisplayEvent e) {
boolean changed = !Arrays.equals(e.getAttributes(), currentState.objAttrs);
if (changed) {
if (e.getEntity() != currentState.objEntity) {
clearState();
currentState.domain = e.getDomain();
currentState.map = e.getDataMap();
currentState.objEntity = (ObjEntity) e.getEntity();
}
currentState.objAttrs = new ObjAttribute[e.getAttributes().length];
System.arraycopy(e.getAttributes(), 0, currentState.objAttrs, 0, currentState.objAttrs.length);
}
EventListener[] list = listenerList.getListeners(ObjAttributeDisplayListener.class);
for (EventListener listener : list) {
ObjAttributeDisplayListener temp = (ObjAttributeDisplayListener) listener;
temp.currentObjAttributeChanged(e);
}
}
Aggregations