public void cellsRemoved(Object[] cells){
  if (cells != null && cells.length > 0) {
    double scale=view.getScale();
    mxPoint tr=view.getTranslate();
    model.beginUpdate();
    try {
      Collection<Object> cellSet=new HashSet<Object>();
      cellSet.addAll(Arrays.asList(cells));
      for (int i=0; i < cells.length; i++) {
        mxCell cell=(mxCell)cells[i];
        Object[] edges=getConnections(cell);
        for (int j=0; j < edges.length; j++) {
          if (!cellSet.contains(edges[j])) {
            mxGeometry geo=model.getGeometry(edges[j]);
            if (geo != null) {
              mxCellState state=view.getState(edges[j]);
              if (state != null) {
                geo=(mxGeometry)geo.clone();
                boolean source=view.getVisibleTerminal(edges[j],true) == cell;
                int n=(source) ? 0 : state.getAbsolutePointCount() - 1;
                mxPoint pt=state.getAbsolutePoint(n);
                geo.setTerminalPoint(new mxPoint(pt.getX() / scale - tr.getX(),pt.getY() / scale - tr.getY()),source);
                model.setTerminal(edges[j],null,source);
                model.setGeometry(edges[j],geo);
              }
            }
          }
        }
        model.remove(cell);
      }
      fireEvent(new mxEventObject(mxEvent.CELLS_REMOVED,"cells",cells));
    }
  finally {
      model.endUpdate();
    }
  }
}

public void cellsRemoved ( Object [ ] cells ) { if ( cells != null && cells . length > 0 ) { double scale = view . getScale ( ) ; mxPoint tr = view . getTranslate ( ) ; model . beginUpdate ( ) ; try { Collection < Object > cellSet = new HashSet < Object > ( ) ; cellSet . addAll ( Arrays . asList ( cells ) ) ; for ( int i = 0 ; i < cells . length ; i ++ ) { mxCell cell = ( mxCell ) cells [ i ] ; Object [ ] edges = getConnections ( cell ) ; for ( int j = 0 ; j < edges . length ; j ++ ) { if ( ! cellSet . contains ( edges [ j ] ) ) { mxGeometry geo = model . getGeometry ( edges [ j ] ) ; if ( geo != null ) { mxCellState state = view . getState ( edges [ j ] ) ; if ( state != null ) { geo = ( mxGeometry ) geo . clone ( ) ; boolean source = view . getVisibleTerminal ( edges [ j ] , true ) == cell ; int n = ( source ) ? 0 : state . getAbsolutePointCount ( ) - 1 ; mxPoint pt = state . getAbsolutePoint ( n ) ; geo . setTerminalPoint ( new mxPoint ( pt . getX ( ) / scale - tr . getX ( ) , pt . getY ( ) / scale - tr . getY ( ) ) , source ) ; model . setTerminal ( edges [ j ] , null , source ) ; model . setGeometry ( edges [ j ] , geo ) ; } } } } model . remove ( cell ) ; } fireEvent ( new mxEventObject ( mxEvent . CELLS_REMOVED , "cells" , cells ) ) ; } finally { model . endUpdate ( ) ; } } }
removes the given cells from the model . this method fires mxevent . cells_removed while the transaction is in progress .
