/** * Binds the tool tip to the target widget. Allows a tool tip to switch the target widget. * * @param target the target widget */ public void initTarget(final Widget target) { if (this.target != null) { handlerRegistration.removeHandler(); } this.target = target; if (target != null) { Handler handler = new Handler(); handlerRegistration = new GroupingHandlerRegistration(); handlerRegistration.add(target.addDomHandler(handler, MouseOverEvent.getType())); handlerRegistration.add(target.addDomHandler(handler, MouseOutEvent.getType())); handlerRegistration.add(target.addDomHandler(handler, MouseMoveEvent.getType())); handlerRegistration.add(target.addHandler(handler, HideEvent.getType())); handlerRegistration.add(target.addHandler(handler, AttachEvent.getType())); } }
public void addHiddenHandler(final HiddenHandler hiddenHandler) { widget.addHandler(hiddenHandler, HiddenEvent.getType()); }
/** * Adds a hidden handler to the Tooltip that will be fired when the Tooltip's hidden event is * fired * * @param hiddenHandler HiddenHandler to handle the hidden event * @return HandlerRegistration of the handler */ public HandlerRegistration addHiddenHandler(final HiddenHandler hiddenHandler) { return widget.addHandler(hiddenHandler, HiddenEvent.getType()); }
public void addShownHandler(final ShownHandler shownHandler) { widget.addHandler(shownHandler, ShownEvent.getType()); }
/** * Adds a shown handler to the Tooltip that will be fired when the Tooltip's shown event is fired * * @param shownHandler ShownHandler to handle the shown event * @return HandlerRegistration of the handler */ public HandlerRegistration addShownHandler(final ShownHandler shownHandler) { return widget.addHandler(shownHandler, ShownEvent.getType()); }