public void translate(double dx,double dy){
  if (!isRelative()) {
    x+=dx;
    y+=dy;
  }
  if (sourcePoint != null) {
    sourcePoint.setX(sourcePoint.getX() + dx);
    sourcePoint.setY(sourcePoint.getY() + dy);
  }
  if (targetPoint != null) {
    targetPoint.setX(targetPoint.getX() + dx);
    targetPoint.setY(targetPoint.getY() + dy);
  }
  if (TRANSLATE_CONTROL_POINTS && points != null) {
    int count=points.size();
    for (int i=0; i < count; i++) {
      mxPoint pt=(mxPoint)points.get(i);
      pt.setX(pt.getX() + dx);
      pt.setY(pt.getY() + dy);
    }
  }
}

public void translate ( double dx , double dy ) { if ( ! isRelative ( ) ) { x += dx ; y += dy ; } if ( sourcePoint != null ) { sourcePoint . setX ( sourcePoint . getX ( ) + dx ) ; sourcePoint . setY ( sourcePoint . getY ( ) + dy ) ; } if ( targetPoint != null ) { targetPoint . setX ( targetPoint . getX ( ) + dx ) ; targetPoint . setY ( targetPoint . getY ( ) + dy ) ; } if ( TRANSLATE_CONTROL_POINTS && points != null ) { int count = points . size ( ) ; for ( int i = 0 ; i < count ; i ++ ) { mxPoint pt = ( mxPoint ) points . get ( i ) ; pt . setX ( pt . getX ( ) + dx ) ; pt . setY ( pt . getY ( ) + dy ) ; } } }
translates the geometry by the specified amount . that is , x and y of the geometry , the sourcepoint , targetpoint and all elements of points are translated by the given amount . x and y are only translated if the geometry is not relative . if translate_control_points is false , then are not modified by this function .
