public void onBrowserEvent(Context context, Element parent, C value, NativeEvent event, ValueUpdater<C> valueUpdater) { cell.onBrowserEvent(context, getCellParent(parent), value, event, valueUpdater); }
/** * Handle a browser event that took place within the header. * * @param context the context of the header * @param elem the parent Element * @param event the native browser event */ public void onBrowserEvent(Context context, Element elem, NativeEvent event) { cell.onBrowserEvent(context, elem, getValue(), event, updater); }
/** * Handle a browser event that took place within the column. * * @param context the cell context * @param elem the parent Element * @param object the base object to be updated * @param event the native browser event */ public void onBrowserEvent(Context context, Element elem, final T object, NativeEvent event) { final int index = context.getIndex(); ValueUpdater<C> valueUpdater = (fieldUpdater == null) ? null : new ValueUpdater<C>() { @Override public void update(C value) { fieldUpdater.update(index, object, value); } }; cell.onBrowserEvent(context, elem, getValue(object), event, valueUpdater); }
@Override public void onBrowserEvent(Event event) { CellBasedWidgetImpl.get().onBrowserEvent(this, event); super.onBrowserEvent(event); // Forward the event to the cell. String eventType = event.getType(); Set<String> consumedEvents = cell.getConsumedEvents(); if (consumedEvents != null && consumedEvents.contains(eventType)) { cell.onBrowserEvent(createContext(), getElement(), value, event, valueUpdater); } }
private <X> void onBrowserEventImpl(final Context context, Element parent, final C object, NativeEvent event, final ValueUpdater<C> valueUpdater, final HasCell<C, X> hasCell) { Cell<X> cell = hasCell.getCell(); String eventType = event.getType(); Set<String> cellConsumedEvents = cell.getConsumedEvents(); if (cellConsumedEvents == null || !cellConsumedEvents.contains(eventType)) { // If this sub-cell doesn't consume this event. return; } ValueUpdater<X> tempUpdater = null; final FieldUpdater<C, X> fieldUpdater = hasCell.getFieldUpdater(); if (fieldUpdater != null) { tempUpdater = new ValueUpdater<X>() { @Override public void update(X value) { fieldUpdater.update(context.getIndex(), object, value); if (valueUpdater != null) { valueUpdater.update(object); } } }; } cell.onBrowserEvent(context, parent, hasCell.getValue(object), event, tempUpdater); }
/** * Fire an event to the cell. * * @param context the {@link Context} of the cell * @param event the event that was fired * @param parent the parent of the cell * @param value the value of the cell */ protected void fireEventToCell(Context context, Event event, Element parent, T value) { Set<String> consumedEvents = cell.getConsumedEvents(); if (consumedEvents != null && consumedEvents.contains(event.getType())) { boolean cellWasEditing = cell.isEditing(context, parent, value); cell.onBrowserEvent(context, parent, value, event, valueUpdater); cellIsEditing = cell.isEditing(context, parent, value); if (cellWasEditing && !cellIsEditing) { CellBasedWidgetImpl.get().resetFocus(new Scheduler.ScheduledCommand() { @Override public void execute() { setFocus(true); } }); } } }
@Override public void onBrowserEvent(Cell.Context context, Element parent, C value, NativeEvent event, ValueUpdater<C> valueUpdater) { delegate.onBrowserEvent(context, parent, value, event, valueUpdater); }
cell.onBrowserEvent(context, parentElem, cellValue, event, valueUpdater);
/** * {@inheritDoc} */ @Override public void onBrowserEvent(Context context, Element parent, C value, NativeEvent event, ValueUpdater<C> valueUpdater) { cell.onBrowserEvent(context, getCellParent(parent), value, event, valueUpdater); }
/** * Handle a browser event that took place within the header. * * @param context the context of the header * @param elem the parent Element * @param event the native browser event */ public void onBrowserEvent(Context context, Element elem, NativeEvent event) { cell.onBrowserEvent(context, elem, getValue(), event, updater); }
public void onBrowserEvent(Context context, Element parent, C value, NativeEvent event, ValueUpdater<C> valueUpdater) { cell.onBrowserEvent(context, getCellParent(parent), value, event, valueUpdater); }
/** * Handle a browser event that took place within the header. * * @param context the context of the header * @param elem the parent Element * @param event the native browser event */ public void onBrowserEvent(Context context, Element elem, NativeEvent event) { cell.onBrowserEvent(context, elem, getValue(), event, updater); }
public void onBrowserEvent(Context context, Element parent, C value, NativeEvent event, ValueUpdater<C> valueUpdater) { cell.onBrowserEvent(context, getCellParent(parent), value, event, valueUpdater); }
if (consumedEvents != null && consumedEvents.contains(eventType)) { parentCell .onBrowserEvent(context, cellParent, value, event, parentNodeInfo.getValueUpdater()); tree.cellIsEditing = parentCell.isEditing(context, cellParent, value); if (cellWasEditing && !tree.cellIsEditing) {
/** * Handle a browser event that took place within the column. * * @param context the cell context * @param elem the parent Element * @param object the base object to be updated * @param event the native browser event */ public void onBrowserEvent(Context context, Element elem, final T object, NativeEvent event) { final int index = context.getIndex(); ValueUpdater<C> valueUpdater = (fieldUpdater == null) ? null : new ValueUpdater<C>() { @Override public void update(C value) { fieldUpdater.update(index, object, value); } }; cell.onBrowserEvent(context, elem, getValue(object), event, valueUpdater); }
/** * Handle a browser event that took place within the column. * * @param context the cell context * @param elem the parent Element * @param object the base object to be updated * @param event the native browser event */ public void onBrowserEvent(Context context, Element elem, final T object, NativeEvent event) { final int index = context.getIndex(); ValueUpdater<C> valueUpdater = (fieldUpdater == null) ? null : new ValueUpdater<C>() { @Override public void update(C value) { fieldUpdater.update(index, object, value); } }; cell.onBrowserEvent(context, elem, getValue(object), event, valueUpdater); }
/** * Handle a browser event that took place within the column. * * @param context the cell context * @param elem the parent Element * @param object the base object to be updated * @param event the native browser event */ public void onBrowserEvent(Context context, Element elem, final T object, NativeEvent event) { final int index = context.getIndex(); ValueUpdater<C> valueUpdater = (fieldUpdater == null) ? null : (ValueUpdater<C>) value -> { fieldUpdater.update(index, object, value); }; cell.onBrowserEvent(context, elem, getValue(object), event, valueUpdater); }
/** * Handle a browser event that took place within the column. * * @param context the cell context * @param elem the parent Element * @param object the base object to be updated * @param event the native browser event */ public void onBrowserEvent(Context context, Element elem, final T object, NativeEvent event) { final int index = context.getIndex(); ValueUpdater<C> valueUpdater = (fieldUpdater == null) ? null : (ValueUpdater<C>) value -> { fieldUpdater.update(index, object, value); }; cell.onBrowserEvent(context, elem, getValue(object), event, valueUpdater); }
@Override public void onBrowserEvent(Event event) { CellBasedWidgetImpl.get().onBrowserEvent(this, event); super.onBrowserEvent(event); // Forward the event to the cell. String eventType = event.getType(); Set<String> consumedEvents = cell.getConsumedEvents(); if (consumedEvents != null && consumedEvents.contains(eventType)) { cell.onBrowserEvent(createContext(), getElement(), value, event, valueUpdater); } }
@Override public void onBrowserEvent(Event event) { CellBasedWidgetImpl.get().onBrowserEvent(this, event); super.onBrowserEvent(event); // Forward the event to the cell. String eventType = event.getType(); Set<String> consumedEvents = cell.getConsumedEvents(); if (consumedEvents != null && consumedEvents.contains(eventType)) { cell.onBrowserEvent(createContext(), getElement(), value, event, valueUpdater); } }