movablePanel = newDragProxy(context);
context.boundaryPanel.add(movablePanel, currentDraggableLocation.getLeft(),
currentDraggableLocation.getTop());
} else {
saveSelectedWidgetsLocationAndStyle();
AbsolutePanel container = new AbsolutePanel();
DOM.setStyleAttribute(container.getElement(), "overflow", "visible");
container.setPixelSize(context.draggable.getOffsetWidth(),
context.draggable.getOffsetHeight());
context.boundaryPanel.add(container, currentDraggableLocation.getLeft(),
currentDraggableLocation.getTop());
int draggableAbsoluteLeft = context.draggable.getAbsoluteLeft();
int draggableAbsoluteTop = context.draggable.getAbsoluteTop();
for (Iterator iterator = context.selectedWidgets.iterator(); iterator.hasNext();) {
Widget widget = (Widget) iterator.next();
if (widget != context.draggable) {
int relativeX = widget.getAbsoluteLeft() - draggableAbsoluteLeft;
int relativeY = widget.getAbsoluteTop() - draggableAbsoluteTop;
container.add(widget, relativeX, relativeY);
}
}
container.add(context.draggable, 0, 0);
movablePanel = container;
}
movablePanel.addStyleName(PRIVATE_CSS_MOVABLE_PANEL);
// one time calculation of boundary panel location for efficiency during dragging