draggedPanel.setYOffset(yOffset);
draggedPanel.setActualWidget(widget);
// register an event previewer to handle mouse events(watch for drag
// move, drop ).
final EventPreviewAdapter greedy = new EventPreviewAdapter() {
public void onMouseMove(final MouseMoveEvent event) {
DraggablePanel.this.onDragMove(event, draggedPanel);
}
public void onMouseUp(final MouseUpEvent event) {
DraggablePanel.this.onDropped(event, draggedPanel, this);
}
};
greedy.install();
final Element dragPanelElement = draggedPanel.getElement();
final int elementPageX = dragPanelElement.getAbsoluteLeft();
final int elementPageY = dragPanelElement.getAbsoluteTop();