protected void cellAdded(Object cell){
  if (cell instanceof mxICell) {
    mxICell mxc=(mxICell)cell;
    if (mxc.getId() == null && isCreateIds()) {
      mxc.setId(createId(cell));
    }
    if (mxc.getId() != null) {
      Object collision=getCell(mxc.getId());
      if (collision != cell) {
        while (collision != null) {
          mxc.setId(createId(cell));
          collision=getCell(mxc.getId());
        }
        if (cells == null) {
          cells=new Hashtable<String,Object>();
        }
        cells.put(mxc.getId(),cell);
      }
    }
    try {
      int id=Integer.parseInt(mxc.getId());
      nextId=Math.max(nextId,id + 1);
    }
 catch (    NumberFormatException e) {
    }
    int childCount=mxc.getChildCount();
    for (int i=0; i < childCount; i++) {
      cellAdded(mxc.getChildAt(i));
    }
  }
}

protected void cellAdded ( Object cell ) { if ( cell instanceof mxICell ) { mxICell mxc = ( mxICell ) cell ; if ( mxc . getId ( ) == null && isCreateIds ( ) ) { mxc . setId ( createId ( cell ) ) ; } if ( mxc . getId ( ) != null ) { Object collision = getCell ( mxc . getId ( ) ) ; if ( collision != cell ) { while ( collision != null ) { mxc . setId ( createId ( cell ) ) ; collision = getCell ( mxc . getId ( ) ) ; } if ( cells == null ) { cells = new Hashtable < String , Object > ( ) ; } cells . put ( mxc . getId ( ) , cell ) ; } } try { int id = Integer . parseInt ( mxc . getId ( ) ) ; nextId = Math . max ( nextId , id + 1 ) ; } catch ( NumberFormatException e ) { } int childCount = mxc . getChildCount ( ) ; for ( int i = 0 ; i < childCount ; i ++ ) { cellAdded ( mxc . getChildAt ( i ) ) ; } } }
invoked after a cell has been added to a parent . this recursively creates an id for the new cell and / or resolves id collisions .
