}
}
protected void startDrag(Event event) {
DragEvent de = new DragEvent(this);
de.setComponent(dragWidget);
de.setEvent(event);
de.setX(startBounds.x);
de.setY(startBounds.y);
de.setStartElement(startElement);
if (fireEvent(Events.DragStart, de)) {
dragging = true;
XDOM.getBodyEl().addStyleName("x-unselectable");
XDOM.getBodyEl().addStyleName("x-dd-cursor");
dragWidget.el().makePositionable();
event.preventDefault();
Shim.get().cover(true);
lastX = startBounds.x;
lastY = startBounds.y;
if (dragEvent == null) {
dragEvent = new DragEvent(this);
}
if (useProxy) {
if (proxyEl == null) {
createProxy();
}
if (container == null) {
XDOM.getBody().appendChild(proxyEl.dom);
} else {
container.el().appendChild(proxyEl.dom);
}
proxyEl.setVisibility(true);
proxyEl.setZIndex(XDOM.getTopZIndex());
proxyEl.makePositionable(true);
if (sizeProxyToSource) {
proxyEl.setBounds(startBounds);
} else {
proxyEl.setXY(startBounds.x, startBounds.y);
}
// did listeners change size?
if (de.getHeight() > 0 && de.getWidth() > 0) {
proxyEl.setSize(de.getWidth(), de.getHeight(), true);
} else if (de.getHeight() > 0) {
proxyEl.setHeight(de.getHeight(), true);
} else if (de.getWidth() > 0) {
proxyEl.setWidth(de.getWidth(), true);
}
} else if (updateZIndex) {
dragWidget.setZIndex(XDOM.getTopZIndex());
}
} else {