public void selectCellsForEvent(Object[] cells,MouseEvent event){
  if (isToggleEvent(event)) {
    graph.addSelectionCells(cells);
  }
 else {
    graph.setSelectionCells(cells);
  }
}

public void selectCellsForEvent ( Object [ ] cells , MouseEvent event ) { if ( isToggleEvent ( event ) ) { graph . addSelectionCells ( cells ) ; } else { graph . setSelectionCells ( cells ) ; } }
selects the cells for the given event .
