public void detachHandlers() { /* * We remove the handlers to make sure unnecessary processing is not done */ if (handlerRegistration == null) return; handlerRegistration.removeHandler(); handlerRegistration2.removeHandler(); handlerRegistration = null; handlerRegistration2 = null; DOM.releaseCapture(parent.getElement()); }
public void attachHandlers() { if (handlerRegistration != null) return; handlerRegistration = parent.addDomHandler(this, MouseMoveEvent.getType()); handlerRegistration2 = parent.addDomHandler(this, MouseUpEvent.getType()); DOM.setCapture(parent.getElement()); }