* @param targetPoint
* @param button
* @param modifiers
*/
public void dnd(Point pointParam, final Wrap target, final Point targetPoint, final int button, final int modifiers) {
final Point point = pointParam == null ? source.getClickPoint() : pointParam;
source.getEnvironment().getExecutor().execute(target.getEnvironment(), false, new Action() {
public void run(Object... parameters) {
if(source.is(Showable.class)) ((Showable)source.as(Showable.class)).shower().show();
source.mouse().move(point);
source.mouse().press(map.convertMouseButton(button), map.convertModifiers(modifiers));
source.getEnvironment().getTimeout(BEFORE_DRAG_TIMEOUT.getName()).sleep();
Point intermediatePoint = new Point();
int xDistance = target.getScreenBounds().x + targetPoint.x - source.getScreenBounds().x - point.x;
int yDistance = target.getScreenBounds().y + targetPoint.y - source.getScreenBounds().y - point.y;
int startX = point.x + source.getScreenBounds().x;
int startY = point.y + source.getScreenBounds().y;
int endX = startX + xDistance;
int endY = startY + yDistance;
for(int i = 0; i < DND_POINTS + 1; i++) {
intermediatePoint.x = startX + xDistance * i / DND_POINTS - source.getScreenBounds().x;
intermediatePoint.y = startY + yDistance * i / DND_POINTS - source.getScreenBounds().y;
source.mouse().move(intermediatePoint);
source.getEnvironment().getTimeout(IN_DRAG_TIMEOUT.getName()).sleep();
}
source.mouse().move(new Point(endX - source.getScreenBounds().x, endY - source.getScreenBounds().y));
//target.mouse().move(targetPoint);
source.getEnvironment().getTimeout(BEFORE_DROP_TIMEOUT.getName()).sleep();
target.mouse().release(map.convertMouseButton(button), map.convertModifiers(modifiers));
}