/** * Fires a open event on all registered handlers in the handler manager.If no * such handlers exist, this method will do nothing. * * @param <T> the target type * @param source the source of the handlers * @param target the target */ public static <T> void fire(HasOpenHandlers<T> source, T target) { if (TYPE != null) { OpenEvent<T> event = new OpenEvent<T>(target); source.fireEvent(event); } }
public static <T> Observable<OpenEvent<T>> open(HasOpenHandlers<T> source) { return Observable.create(s -> register(s, source.addOpenHandler(s::onNext)), uiBackpressureMode()); }
public static <T> Observable<OpenEvent<T>> open(HasOpenHandlers<T> source) { return Observable.create(s -> register(s, source.addOpenHandler(s::onNext))); }
public <H extends MaterialWidget & HasOpenHandlers> void checkOpenHandler(H widget) { // Check Open Event final boolean[] fired = {false}; widget.addOpenHandler(event -> { fired[0] = true; }); fireOpenHandler(widget); assertTrue(fired[0]); }
/** * Fires a open event on all registered handlers in the handler manager.If no * such handlers exist, this method will do nothing. * * @param <T> the target type * @param source the source of the handlers * @param target the target */ public static <T> void fire(HasOpenHandlers<T> source, T target) { if (TYPE != null) { OpenEvent<T> event = new OpenEvent<T>(target); source.fireEvent(event); } }
public <H extends MaterialWidget & HasOpenHandlers> void checkOpenHandler(H widget) { // Check Open Event final boolean[] fired = {false}; widget.addOpenHandler(event -> { fired[0] = true; }); fireOpenHandler(widget); assertTrue(fired[0]); }
/** * Fires a open event on all registered handlers in the handler manager.If no * such handlers exist, this method will do nothing. * * @param <T> the target type * @param source the source of the handlers * @param target the target */ public static <T> void fire(HasOpenHandlers<T> source, T target) { if (TYPE != null) { OpenEvent<T> event = new OpenEvent<T>(target); source.fireEvent(event); } }