src/main/java/com/mxgraph/model/mxGeometry.java
public void translate(double dx, double dy)
	{
		// Translates the geometry
		if (!isRelative())
		{
			x += dx;
			y += dy;
		}

		// Translates the source point
		if (sourcePoint != null)
		{
			sourcePoint.setX(sourcePoint.getX() + dx);
			sourcePoint.setY(sourcePoint.getY() + dy);
		}

		// Translates the target point
		if (targetPoint != null)
		{
			targetPoint.setX(targetPoint.getX() + dx);
			targetPoint.setY(targetPoint.getY() + dy);
		}

		// Translate the control points
		if (TRANSLATE_CONTROL_POINTS && points != null)
		{
			int count = points.size();

			for (int i = 0; i < count; i++)
			{
				mxPoint pt = 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.
	 * 
	 * @param dx Integer that specifies the x-coordinate of the translation.
	 * @param dy Integer that specifies the y-coordinate of the translation.
	 */
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.

@param dx Integer that specifies the x-coordinate of the translation.
@param dy Integer that specifies the y-coordinate of the translation.
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 . @param dx Integer that specifies the x - coordinate of the translation . @param dy Integer that specifies the y - coordinate of the translation .
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 = 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 = points . get ( i ) ; pt . setX ( pt . getX ( ) + dx ) ; pt . setY ( pt . getY ( ) + dy ) ; } } }
Translates the geometry by the specified amount.
Translates the geometry by the specified amount .
// Translates the geometry // Translates the source point // Translates the target point // Translate the control points