List of usage examples for com.google.gwt.event.logical.shared ValueChangeHandler onValueChange
void onValueChange(ValueChangeEvent<T> event);
From source file:gwt.material.design.client.ui.MaterialListValueBox.java
License:Apache License
@Override public HandlerRegistration addValueChangeHandler(final ValueChangeHandler<T> handler) { return addHandler(new ValueChangeHandler<T>() { @Override//from ww w . j a v a 2 s .co m public void onValueChange(ValueChangeEvent<T> event) { if (isEnabled()) { handler.onValueChange(event); } } }, ValueChangeEvent.getType()); }
From source file:org.bonitasoft.forms.client.view.widget.CheckboxGroupWidget.java
License:Open Source License
/** * {@inheritDoc}//from www . j a v a 2s . c o m */ public void onValueChange(final ValueChangeEvent<Boolean> valueChangeEvent) { for (final ValueChangeHandler<Boolean> valueChangeHandler : valueChangeHandlers) { valueChangeHandler.onValueChange(valueChangeEvent); } }
From source file:org.bonitasoft.forms.client.view.widget.FormFieldWidget.java
License:Open Source License
/** * {@inheritDoc}/* www . j av a2s .co m*/ */ @Override @SuppressWarnings("unchecked") public void onValueChange(final ValueChangeEvent valueChangeEvent) { if (valueChangeHandlers != null) { for (final ValueChangeHandler valueChangeHandler : valueChangeHandlers.values()) { valueChangeHandler.onValueChange(valueChangeEvent); } } }
From source file:org.bonitasoft.forms.client.view.widget.RadioButtonGroupWidget.java
License:Open Source License
/** * {@inheritDoc}/*from www . jav a 2s . co m*/ */ @Override public void onValueChange(final ValueChangeEvent<Boolean> valueChangeEvent) { if (valueChangeHandlers != null) { for (final ValueChangeHandler<Boolean> valueChangeHandler : valueChangeHandlers) { valueChangeHandler.onValueChange(valueChangeEvent); } } }
From source file:org.bonitasoft.forms.client.view.widget.TableWidget.java
License:Open Source License
public void setValue(final List<String> selectedItems, final boolean fireEvents) { if (!SelectMode.NONE.equals(widgetData.getSelectMode())) { for (int row = 0; row < flexTable.getRowCount(); row++) { removeSelectedCellStyle(row); }//from w w w . j a va2s. c o m selectedItemIndexes.clear(); if (selectedItems != null && !selectedItems.isEmpty() && availableValues != null) { for (final List<ReducedFormFieldAvailableValue> rowAvailableValues : availableValues) { if (rowAvailableValues.size() >= valueColumnIndex && rowAvailableValues.get(valueColumnIndex) != null && selectedItems.contains(rowAvailableValues.get(valueColumnIndex).getValue())) { int rowIndex = availableValues.indexOf(rowAvailableValues); if (topHeadings) { rowIndex++; } addSelectedCellStyle(rowIndex); if (SelectMode.MULTIPLE.equals(widgetData.getSelectMode())) { selectedItemIndexes.add(Integer.valueOf(rowIndex)); } else if (SelectMode.SINGLE.equals(widgetData.getSelectMode())) { selectedItemIndexes.add(0, Integer.valueOf(rowIndex)); } } } } if (fireEvents) { for (final ValueChangeHandler<List<String>> valueChangeHandler : valueChangeHandlers) { valueChangeHandler.onValueChange(null); } } } }
From source file:org.bonitasoft.forms.client.view.widget.TableWidget.java
License:Open Source License
public void setAvailableValues(final List<List<ReducedFormFieldAvailableValue>> availableValues, final boolean fireEvents) { flowPanel.clear();// w w w . j ava 2s . c om this.availableValues = availableValues; createWidget(null); if (fireEvents) { for (final ValueChangeHandler<List<String>> valueChangeHandler : valueChangeHandlers) { valueChangeHandler.onValueChange(null); } } }
From source file:org.bonitasoft.forms.client.view.widget.TableWidget.java
License:Open Source License
/** * {@inheritDoc}/*from w w w.j a v a2 s . co m*/ */ @Override public void onClick(final ClickEvent clickEvent) { if (!SelectMode.NONE.equals(widgetData.getSelectMode()) && !widgetData.isReadOnly()) { final Cell clickedCell = flexTable.getCellForEvent(clickEvent); final int rowIndex = clickedCell.getRowIndex(); if (!(topHeadings && rowIndex <= 0) && !(bottomHeadings && rowIndex >= flexTable.getRowCount() - 1)) { if (SelectMode.MULTIPLE.equals(widgetData.getSelectMode())) { if (selectedItemIndexes.contains(Integer.valueOf(rowIndex))) { removeSelectedCellStyle(rowIndex); selectedItemIndexes.remove(Integer.valueOf(rowIndex)); } else { addSelectedCellStyle(rowIndex); selectedItemIndexes.add(Integer.valueOf(rowIndex)); } } else { if (!selectedItemIndexes.isEmpty() && selectedItemIndexes.get(0).equals(Integer.valueOf(rowIndex))) { removeSelectedCellStyle(rowIndex); selectedItemIndexes.remove(Integer.valueOf(rowIndex)); } else { Integer oldSelectedItemIndex = null; if (!selectedItemIndexes.isEmpty()) { oldSelectedItemIndex = selectedItemIndexes.get(0); } if (oldSelectedItemIndex != null) { removeSelectedCellStyle(oldSelectedItemIndex.intValue()); selectedItemIndexes.remove(oldSelectedItemIndex); } addSelectedCellStyle(rowIndex); selectedItemIndexes.add(0, Integer.valueOf(rowIndex)); } } for (final ValueChangeHandler<List<String>> valueChangeHandler : valueChangeHandlers) { valueChangeHandler.onValueChange(null); } } } }
From source file:org.bonitasoft.forms.client.view.widget.TableWidget.java
License:Open Source License
@Override public void onValueChange(final ValueChangeEvent<List<String>> event) { for (final ValueChangeHandler<List<String>> valueChangeHandler : valueChangeHandlers) { valueChangeHandler.onValueChange(event); }/*from w w w . j a va 2s. co m*/ }
From source file:org.cruxframework.crux.core.client.screen.views.View.java
License:Apache License
/** * // ww w. j a v a2 s . c om * @param event */ protected void fireHistoryChangeEvent(ValueChangeEvent<String> event) { for (int i = 0; i < historyHandlers.size(); i++) { ValueChangeHandler<String> handler = historyHandlers.get(i); handler.onValueChange(event); } }
From source file:org.jboss.as.console.client.widgets.popups.ComboPicker.java
License:Open Source License
@Override public void fireEvent(GwtEvent<?> gwtEvent) { for (ValueChangeHandler<String> handler : changeHandlers) handler.onValueChange((ValueChangeEvent<String>) gwtEvent); }