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