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); }
@Override public HandlerRegistration addMouseDownHandler(final MouseDownHandler handler) { return handlers.addHandler(MouseDownEvent.getType(), handler); }
public HandlerRegistration addMouseDownHandler(MouseDownHandler handler) { return addDomHandler(handler, MouseDownEvent.getType()); }