NodePresenter(VGraphExplorer parent, NodeProxy model) { this.parent = parent; this.model = model; graph = parent.getGraph(); view.setTitle(model.getId()); Style style = view.getElement().getStyle(); style.setLeft(model.getX(), Unit.PX); style.setTop(model.getY(), Unit.PX); view.addDomHandler(this, MouseDownEvent.getType()); view.addDomHandler(this, MouseMoveEvent.getType()); view.addDomHandler(this, MouseUpEvent.getType()); parent.add(view); }
public HandlerRegistration addMouseUpHandler(MouseUpHandler handler) { return addDomHandler(handler, MouseUpEvent.getType()); }