public void addDiagramChangeListener(mxDiagramChangeListener listener){
  if (diagramChangeListeners == null) {
    diagramChangeListeners=new ArrayList<mxDiagramChangeListener>();
  }
  diagramChangeListeners.add(listener);
}

public void addDiagramChangeListener ( mxDiagramChangeListener listener ) { if ( diagramChangeListeners == null ) { diagramChangeListeners = new ArrayList < mxDiagramChangeListener > ( ) ; } diagramChangeListeners . add ( listener ) ; }
adds the given listener to the list of diagram change listeners .
