public void translateCell(Object cell,double dx,double dy){
  mxGeometry geo=model.getGeometry(cell);
  if (geo != null) {
    geo=(mxGeometry)geo.clone();
    geo.translate(dx,dy);
    if (!geo.isRelative() && model.isVertex(cell) && !isAllowNegativeCoordinates()) {
      geo.setX(Math.max(0,geo.getX()));
      geo.setY(Math.max(0,geo.getY()));
    }
    if (geo.isRelative() && !model.isEdge(cell)) {
      if (geo.getOffset() == null) {
        geo.setOffset(new mxPoint(dx,dy));
      }
 else {
        mxPoint offset=geo.getOffset();
        offset.setX(offset.getX() + dx);
        offset.setY(offset.getY() + dy);
      }
    }
    model.setGeometry(cell,geo);
  }
}

public void translateCell ( Object cell , double dx , double dy ) { mxGeometry geo = model . getGeometry ( cell ) ; if ( geo != null ) { geo = ( mxGeometry ) geo . clone ( ) ; geo . translate ( dx , dy ) ; if ( ! geo . isRelative ( ) && model . isVertex ( cell ) && ! isAllowNegativeCoordinates ( ) ) { geo . setX ( Math . max ( 0 , geo . getX ( ) ) ) ; geo . setY ( Math . max ( 0 , geo . getY ( ) ) ) ; } if ( geo . isRelative ( ) && ! model . isEdge ( cell ) ) { if ( geo . getOffset ( ) == null ) { geo . setOffset ( new mxPoint ( dx , dy ) ) ; } else { mxPoint offset = geo . getOffset ( ) ; offset . setX ( offset . getX ( ) + dx ) ; offset . setY ( offset . getY ( ) + dy ) ; } } model . setGeometry ( cell , geo ) ; } }
translates the geometry of the given cell and stores the new , translated geometry in the model as an atomic change .
