def onEnter(self, context): super.onEnter(context) assert draggableList.size() == 0 dropTargetClientWidth = DOMUtil.getClientWidth(dropTarget.getElement()) dropTargetClientHeight = DOMUtil.getClientHeight(dropTarget.getElement()) WidgetLocation dropTargetLocation = WidgetLocation(dropTarget, None) dropTargetOffsetX = dropTargetLocation.getLeft() + DOMUtil.getBorderLeft(dropTarget.getElement()) dropTargetOffsetY = dropTargetLocation.getTop() + DOMUtil.getBorderTop(dropTarget.getElement()) 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 Location widgetLocation = WidgetLocation(context.boundaryPanel, None) boundaryOffsetX = widgetLocation.getLeft() + DOMUtil.getBorderLeft(context.boundaryPanel.getElement()) boundaryOffsetY = widgetLocation.getTop() + DOMUtil.getBorderTop(context.boundaryPanel.getElement()) dropTargetClientWidth = DOMUtil.getClientWidth(boundaryPanel.getElement()) dropTargetClientHeight = DOMUtil.getClientHeight(boundaryPanel.getElement()) """* * Whether or not dropping on the boundary panel is permitted. * * @return <code>True</code> if dropping on the boundary panel is allowed """ def getBehaviorBoundaryPanelDrop(self): return boundaryDropController.getBehaviorBoundaryPanelDrop()