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);
  }
Beispiel #2
0
 @Override
 public HandlerRegistration addMouseUpHandler(final MouseUpHandler handler) {
   return handlers.addHandler(MouseUpEvent.getType(), handler);
 }
Beispiel #3
0
 public HandlerRegistration addMouseUpHandler(MouseUpHandler handler) {
   return addDomHandler(handler, MouseUpEvent.getType());
 }