protected void shiftCell(Object cell, double dx, double dy, double x0,
			double y0, double right, double bottom, double fx, double fy,
			boolean extendParent)
	{
		mxGraph graph = getGraph();
		mxCellState state = graph.getView().getState(cell);

		if (state != null)
		{
			mxIGraphModel model = graph.getModel();
			mxGeometry geo = model.getGeometry(cell);

			if (geo != null)
			{
				model.beginUpdate();
				try
				{
					if (isShiftRightwards())
					{
						if (state.getX() >= right)
						{
							geo = (mxGeometry) geo.clone();
							geo.translate(-dx, 0);
						}
						else
						{
							double tmpDx = Math.max(0, state.getX() - x0);
							geo = (mxGeometry) geo.clone();
							geo.translate(-fx * tmpDx, 0);
						}
					}

					if (isShiftDownwards())
					{
						if (state.getY() >= bottom)
						{
							geo = (mxGeometry) geo.clone();
							geo.translate(0, -dy);
						}
						else
						{
							double tmpDy = Math.max(0, state.getY() - y0);
							geo = (mxGeometry) geo.clone();
							geo.translate(0, -fy * tmpDy);
						}

						if (geo != model.getGeometry(cell))
						{
							model.setGeometry(cell, geo);

							// Parent size might need to be updated if this
							// is seen as part of the resize
							if (extendParent)
							{
								graph.extendParent(cell);
							}
						}
					}
				}
				finally
				{
					model.endUpdate();
				}
			}
		}
	}