/** * Fires a cell preview event on all registered handlers in the handler * manager. If no such handlers exist, this implementation will do nothing. * This implementation sets the column to 0. * * @param <T> the old value type * @param source the source of the handlers * @param nativeEvent the event to preview * @param display the {@link HasData} source of the event * @param context the Cell {@link Context} * @param value the value where the event occurred * @param isCellEditing indicates whether or not the cell is being edited * @param isSelectionHandled indicates whether or not selection is handled * @return the {@link CellPreviewEvent} that was fired */ public static <T> CellPreviewEvent<T> fire(HasCellPreviewHandlers<T> source, NativeEvent nativeEvent, HasData<T> display, Context context, T value, boolean isCellEditing, boolean isSelectionHandled) { CellPreviewEvent<T> event = new CellPreviewEvent<T>(nativeEvent, display, context, value, isCellEditing, isSelectionHandled); if (TYPE != null) { source.fireEvent(event); } return event; }
public static <T> Observable<CellPreviewEvent<T>> cellPreview(HasCellPreviewHandlers<T> source) { return Observable.create(s -> register(s, source.addCellPreviewHandler(s::onNext)), uiBackpressureMode()); }
public static <T> Observable<CellPreviewEvent<T>> cellPreview(HasCellPreviewHandlers<T> source) { return Observable.create(s -> register(s, source.addCellPreviewHandler(s::onNext))); }
/** * Fires a cell preview event on all registered handlers in the handler * manager. If no such handlers exist, this implementation will do nothing. * This implementation sets the column to 0. * * @param <T> the old value type * @param source the source of the handlers * @param nativeEvent the event to preview * @param display the {@link HasData} source of the event * @param context the Cell {@link Context} * @param value the value where the event occurred * @param isCellEditing indicates whether or not the cell is being edited * @param isSelectionHandled indicates whether or not selection is handled * @return the {@link CellPreviewEvent} that was fired */ public static <T> CellPreviewEvent<T> fire(HasCellPreviewHandlers<T> source, NativeEvent nativeEvent, HasData<T> display, Context context, T value, boolean isCellEditing, boolean isSelectionHandled) { CellPreviewEvent<T> event = new CellPreviewEvent<T>(nativeEvent, display, context, value, isCellEditing, isSelectionHandled); if (TYPE != null) { source.fireEvent(event); } return event; }
/** * Fires a cell preview event on all registered handlers in the handler * manager. If no such handlers exist, this implementation will do nothing. * This implementation sets the column to 0. * * @param <T> the old value type * @param source the source of the handlers * @param nativeEvent the event to preview * @param display the {@link HasData} source of the event * @param context the Cell {@link Context} * @param value the value where the event occurred * @param isCellEditing indicates whether or not the cell is being edited * @param isSelectionHandled indicates whether or not selection is handled * @return the {@link CellPreviewEvent} that was fired */ public static <T> CellPreviewEvent<T> fire(HasCellPreviewHandlers<T> source, NativeEvent nativeEvent, HasData<T> display, Context context, T value, boolean isCellEditing, boolean isSelectionHandled) { CellPreviewEvent<T> event = new CellPreviewEvent<T>(nativeEvent, display, context, value, isCellEditing, isSelectionHandled); if (TYPE != null) { source.fireEvent(event); } return event; }