Open GoogleCodeExporter opened 9 years ago
Source code is like below:
public class Xxxx implements EntryPoint {
public AbsolutePanel area = new AbsolutePanel();
public void onModuleLoad() {
area.setWidth("500");
area.setHeight("500");
RootPanel.get().add(area);
// elements to connect
Widget x = new Label("XXXXXXXXX");
Widget y = new Label("YYYYYYYYY");
area.add(x, 100, 100);
area.add(y, 200, 200);
// gwt-diagrams stuff
Connector c1 = UIObjectConnector.wrap(x);
Connector c2 = UIObjectConnector.wrap(y);
Connection connection0 = new RectilinearTwoEndedConnection(c1, c2);
connection0.appendTo(area);
DragController dragC = createDragController();
dragC.makeDraggable(x);
dragC.makeDraggable(y);
}
protected DragController createDragController() {
PickupDragController dragController = new PickupDragController(
area, true) {
public BoundaryDropController newBoundaryDropController(
AbsolutePanel boundaryPanel, boolean
allowDropping) {
return new BoundaryDropController(boundaryPanel,
allowDropping) {
public void onMove(Widget reference, Widget
draggable,
DragController
dragController) {
super.onMove(reference, draggable,
dragController);
UIObjectConnector c =
UIObjectConnector
.getWrapper
(draggable);
if (c != null) {
c.update();
}
}
};
}
public void makeDraggable(Widget widget) {
super.makeDraggable(widget);
DOM.setStyleAttribute(widget.getElement
(), "position",
"absolute");
DOM.setStyleAttribute(widget.getElement
(), "zIndex", "100");
}
};
return dragController;
}
}
-----------------------------------------------
Among the any version of GWT-dnd, GWT-code, app-engine versions, I cannot find
application running as fast as example's posted here.
Am I missing something?
Original comment by tora...@gmail.com
on 13 Jan 2010 at 5:04
Dragging connector object is really slow ;(
Original comment by tora...@gmail.com
on 13 Jan 2010 at 5:04
Original issue reported on code.google.com by
tora...@gmail.com
on 13 Jan 2010 at 5:01