* the phase what should be executed
*/
private void executePhase(Phase phase) {
switch (phase) {
case START:
currentDelta = startMove.add(new Point((overallMove.getX() < 0) ? FIRST_STEP : -FIRST_STEP,
(overallMove.getY() < 0) ? FIRST_STEP : -FIRST_STEP));
selenium.mouseDownAt(itemToDrag, new Point(0, 0));
selenium.mouseMoveAt(itemToDrag, new Point(2, 2));
if (dragIndicator != null && selenium.isElementPresent(dragIndicator)) {
startMove = startMove.substract(getCentral(dragIndicator));
}
selenium.mouseMoveAt(itemToDrag, startMove);
break;
case MOUSE_OUT:
selenium.mouseOut(itemToDrag);
break;
case MOVE:
for (int i = 0; i < numberOfSteps; i++) {
Point oldMovement = movement;
movement = new Point(overallMove.getX() * i / numberOfSteps, overallMove.getY() * i / numberOfSteps);
Point movementDelta = movement.substract(oldMovement);
currentDelta = reposition.add(startMove).add(movement);
selenium.mouseMoveAt(itemToDrag, currentDelta);
currentPosition = currentPosition.add(movementDelta);
wait.waitForTimeout();