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