/** * Sets the value of this progress bar. The value is a <code>float</code> * between 0 and 1 where 0 represents no progress at all and 1 represents * fully completed. * * @param newValue * the current progress value */ @Override public void setValue(Float newValue) { super.setValue(newValue); }
/** * Sets the value of the field. * * @param newFieldValue * the New value of the field. * @throws Property.ReadOnlyException */ @Override public void setValue(T newFieldValue) throws Property.ReadOnlyException, Converter.ConversionException { setValue(newFieldValue, false); }
@Override public void clear() { setValue(null); }
/** * Sets the value of the field. * * @param newFieldValue * the New value of the field. * @param repaintIsNotNeeded * True if caller is sure that repaint is not needed. * @throws Property.ReadOnlyException * @throws Converter.ConversionException * @throws InvalidValueException */ protected void setValue(T newFieldValue, boolean repaintIsNotNeeded) { setValue(newFieldValue, repaintIsNotNeeded, false); }
@Override public void setValue(Double newFieldValue) { super.setValue(newFieldValue); getState().value = newFieldValue; }
/** * Sets the value of the field using a value of the data source type. The * value given is converted to the field type and then assigned to the * field. This will update the property data source in the same way as when * {@link #setValue(Object)} is called. * * @param value * The value to set. Must be the same type as the data source. */ public void setConvertedValue(Object value) { setValue(convertFromModel(value)); }
@Override public void clear() { super.setValue(Double.valueOf(getState().minValue)); }
@Override public void setValue(String newValue) throws ReadOnlyException { super.setValue(newValue); /* * Make sure w reset lastKnownTextContent field on value change. The * clearing must happen here as well because TextChangeListener can * revert the original value. Client must respect the value in this * case. AbstractField optimizes value change if the existing value is * reset. Also we need to force repaint if the flag is on. */ if (lastKnownTextContent != null) { lastKnownTextContent = null; markAsDirty(); } }
/** * Default slider constructor. Sets all values to defaults and the slide * handle at minimum value. * */ public Slider() { super(); registerRpc(rpc); super.setValue(new Double(getState().minValue)); }
if (isMultiSelect()) { if (newFieldValue == null) { super.setValue(new LinkedHashSet<Object>(), repaintIsNotNeeded, ignoreReadOnly); } else if (Collection.class .isAssignableFrom(newFieldValue.getClass())) { super.setValue( new LinkedHashSet<Object>( (Collection<?>) newFieldValue), super.setValue(newFieldValue, repaintIsNotNeeded, ignoreReadOnly);
protected void setValueToPresentation(Object value) { if (hasValidationError()) { setValidationError(null); } component.setValue(value); }
/** * This method refreshes the components. * * @param criteriaRestriction the new {@link CriteriaRestriction} * @param arr the values to be set */ private void refreshComponents(CriteriaRestriction criteriaRestriction, String[] arr) { for (AbstractComponent abstractComponent : m_componentList) { m_leftLayout.removeComponent(abstractComponent); } m_componentList.clear(); int i = 0; for (CriteriaEntry criteriaEntry : criteriaRestriction.getEntries()) { AbstractField abstractField = criteriaEntry.getComponent(m_criteriaBuilderHelper); if (arr != null && arr.length > i) { abstractField.setValue(CriteriaBuilderHelper.decode(arr[i])); } m_leftLayout.addComponent(abstractField); m_componentList.add(abstractField); i++; } }
@Override public void setColumnCollapsed(Object propertyId, boolean collapsed) throws IllegalStateException { super.setColumnCollapsed(propertyId, collapsed); Component c = getColumnIdToFilterMap().get(propertyId); if (collapsed) { collapsedColumnIds.add(propertyId); if (c != null) { c.setParent(null); if (c instanceof TextField) { ((TextField) c).setValue(""); } else if (c instanceof AbstractField<?>) { ((AbstractField<?>) c).setValue(null); } } } else { if (c != null) { c.setParent(this); } collapsedColumnIds.remove(propertyId); } reRenderFilterFields = true; markAsDirty(); }
@Override public void setColumnCollapsed(Object propertyId, boolean collapsed) throws IllegalStateException { super.setColumnCollapsed(propertyId, collapsed); Component c = getColumnIdToFilterMap().get(propertyId); if (collapsed) { collapsedColumnIds.add(propertyId); if (c != null) { c.setParent(null); if (c instanceof TextField) { ((TextField) c).setValue(""); } else if (c instanceof AbstractField<?>) { ((AbstractField<?>) c).setValue(null); } } } else { if (c != null) { c.setParent(this); } collapsedColumnIds.remove(propertyId); } reRenderFilterFields = true; markAsDirty(); }
super.setValue(newValue, repaintIsNotNeeded);
/** * Sets the value of the slider. * * @param value * The new value of the slider. * @param repaintIsNotNeeded * If true, client-side is not requested to repaint itself. * @throws ValueOutOfBoundsException * If the given value is not inside the range of the slider. * @see #setMin(double) {@link #setMax(double)} */ @Override protected void setValue(Double value, boolean repaintIsNotNeeded) { double newValue = getRoundedValue(value); if (getMin() > newValue || getMax() < newValue) { throw new ValueOutOfBoundsException(newValue); } getState().value = newValue; super.setValue(newValue, repaintIsNotNeeded); }