當前位置: 首頁>>代碼示例>>Java>>正文


Java Property.setValue方法代碼示例

本文整理匯總了Java中com.vaadin.data.Property.setValue方法的典型用法代碼示例。如果您正苦於以下問題:Java Property.setValue方法的具體用法?Java Property.setValue怎麽用?Java Property.setValue使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在com.vaadin.data.Property的用法示例。


在下文中一共展示了Property.setValue方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: updateSentStatus

import com.vaadin.data.Property; //導入方法依賴的package包/類
@Override
public <BT extends ISendAwareBean> void updateSentStatus(final BeanItem<BT> item)
{
	final BT bean = item.getBean();
	final boolean sent = bean.checkSent();

	@SuppressWarnings("unchecked")
	final Property<Boolean> sentProperty = item.getItemProperty(ProductQtyReport.PROPERTY_Sent);
	if (sentProperty.getValue() == sent)
	{
		return;
	}

	sentProperty.setValue(sent);

	//
	// Adjust the not-sent counter
	if (sent)
	{
		decrementNotSentCounter();
	}
	else
	{
		incrementNotSentCounter();
	}
}
 
開發者ID:metasfresh,項目名稱:metasfresh-procurement-webui,代碼行數:27,代碼來源:SendService.java

示例2: moveItem

import com.vaadin.data.Property; //導入方法依賴的package包/類
@SuppressWarnings("unchecked")
protected void moveItem(boolean moveUp) {
	if (this.serviceTable.getValue() != null) {
		long selectedItemId = (long) this.serviceTable.getValue();
		Property<Long> selectedItemChainProperty = this.serviceTable.getContainerProperty(selectedItemId,
				PROPERTY_ID_CHAIN_ORDER);
		Long currentOrderValue = selectedItemChainProperty.getValue();
		Object nextItemIdObj = this.serviceTable.nextItemId(selectedItemId);
		Object previousItemIdObj = this.serviceTable.prevItemId(selectedItemId);

		if (moveUp && previousItemIdObj != null) {
			Property<Long> previousItemChainProperty = this.serviceTable.getContainerProperty(previousItemIdObj,
					PROPERTY_ID_CHAIN_ORDER);
			Long previousItemOrderValue = previousItemChainProperty.getValue();

			selectedItemChainProperty.setValue(previousItemOrderValue);
			previousItemChainProperty.setValue(currentOrderValue);
			sortByChainOrder();
		} else if (!moveUp && nextItemIdObj != null) {
			Property<Long> nextItemChainProperty = this.serviceTable.getContainerProperty(nextItemIdObj,
					PROPERTY_ID_CHAIN_ORDER);
			Long nextItemOrderValue = nextItemChainProperty.getValue();

			selectedItemChainProperty.setValue(nextItemOrderValue);
			nextItemChainProperty.setValue(currentOrderValue);

			sortByChainOrder();
		}
	}
}
 
開發者ID:opensecuritycontroller,項目名稱:osc-core,代碼行數:31,代碼來源:BindSecurityGroupWindow.java

示例3: fillContainer

import com.vaadin.data.Property; //導入方法依賴的package包/類
@SuppressWarnings("unchecked")
private void fillContainer(HierarchicalContainer container, List<MenuItem> items, MenuItem parent) {
    for (MenuItem item : items) {
        Item containerItem = container.addItem(item);
        Property<String> caption = containerItem.getItemProperty(PROPERTY_CAPTION);
        caption.setValue(samplesMenuConfig.getMenuItemCaption(item.getId()));
        container.setParent(item, parent);
        if (item.isMenu()) {
            fillContainer(container, item.getChildren(), item);
        } else {
            container.setChildrenAllowed(item, false);
        }
    }
}
 
開發者ID:cuba-platform,項目名稱:sampler,代碼行數:15,代碼來源:SamplerFoldersPane.java

示例4: onNextWeekTrendButtonPressed

import com.vaadin.data.Property; //導入方法依賴的package包/類
private void onNextWeekTrendButtonPressed(final Trend nextWeekTrend)
{
	@SuppressWarnings("unchecked")
	final Property<Trend> nextWeekTrendProperty = weekQtyReportItem.getItemProperty(WeekProductQtyReport.PROPERTY_NextWeekTrend);
	nextWeekTrendProperty.setValue(nextWeekTrend);

	updateUI_NextWeekTrand();
}
 
開發者ID:metasfresh,項目名稱:metasfresh-procurement-webui,代碼行數:9,代碼來源:WeeklyDetailedReportingView.java

示例5: addQty

import com.vaadin.data.Property; //導入方法依賴的package包/類
private final void addQty(final BeanItem<WeekProductQtyReport> weekQtyReportItem, final BigDecimal qtyToAdd)
{
	@SuppressWarnings("unchecked")
	final Property<BigDecimal> qtyProperty = weekQtyReportItem.getItemProperty(WeekProductQtyReport.PROPERTY_Qty);

	final BigDecimal qtyOld = qtyProperty.getValue();
	final BigDecimal qtyNew = qtyOld.add(qtyToAdd);
	qtyProperty.setValue(qtyNew);
}
 
開發者ID:metasfresh,項目名稱:metasfresh-procurement-webui,代碼行數:10,代碼來源:WeekProductQtyReportContainer.java

示例6: setNextWeekTrend

import com.vaadin.data.Property; //導入方法依賴的package包/類
public void setNextWeekTrend(final Product product, final Trend nextWeekTrend)
{
	final BeanItem<WeekProductQtyReport> weekQtyReportItem = getCreateItemByProduct(product);
	@SuppressWarnings("unchecked")
	final Property<Trend> nextWeekTrendProperty = weekQtyReportItem.getItemProperty(WeekProductQtyReport.PROPERTY_NextWeekTrend);
	nextWeekTrendProperty.setValue(nextWeekTrend);
}
 
開發者ID:metasfresh,項目名稱:metasfresh-procurement-webui,代碼行數:8,代碼來源:WeekProductQtyReportContainer.java

示例7: addCaptionedItem

import com.vaadin.data.Property; //導入方法依賴的package包/類
private void addCaptionedItem(String caption, Object parent, String id) {
    // add item, let tree decide id
    this.availableModelsTree.addItem(id);
    // get the created item
    final Item item = this.availableModelsTree.getItem(id);
    // set our "caption" property
    final Property p = item.getItemProperty(CAPTION_PROPERTY);
    p.setValue(caption);
    if (parent != null) {
    	this.availableModelsTree.setChildrenAllowed(parent, true);
    	this.availableModelsTree.setParent(id, parent);
    }
}
 
開發者ID:FTSRG,項目名稱:mondo-collab-framework,代碼行數:14,代碼來源:StartNewSessionPage.java

示例8: setValue

import com.vaadin.data.Property; //導入方法依賴的package包/類
@Override
public void setValue(T newValue) throws ReadOnlyException {
    if (value == newValue || value != null && value.equals(newValue)) {
        fireValueChange(true);
    } else {
        this.value = newValue;
        fireValueChange(false);
    }

    Property p = getPropertyDataSource();
    if (p != null) p.setValue(value);

}
 
開發者ID:tyl,項目名稱:field-binder,代碼行數:14,代碼來源:CombinedField.java

示例9: setFieldValue

import com.vaadin.data.Property; //導入方法依賴的package包/類
@Override
public void setFieldValue(FormInstance formInstance, AbstractComponent field, Object value) {
	Property prop = (Property) field;
	boolean last = prop.isReadOnly();
	prop.setReadOnly(false);
	prop.setValue(value);
	prop.setReadOnly(last);
}
 
開發者ID:frincon,項目名稱:abstractform,代碼行數:9,代碼來源:PropertyFieldValueAccessor.java

示例10: getPropertyDataSource

import com.vaadin.data.Property; //導入方法依賴的package包/類
@SuppressWarnings({ "rawtypes", "unchecked" })
@Override
public Property getPropertyDataSource() {
    Property result = super.getPropertyDataSource();

    if (result != null) {
        Object newValue = result.getValue();
        if (fromField.getValue() != null && toField.getValue() != null && newValue instanceof Interval) {
            Interval interval = new Interval(fromField.getValue().getTime(), toField.getValue().getTime());
            result.setValue(interval);
        }
    }

    return result;
}
 
開發者ID:Dr4K4n,項目名稱:joda-time-fields,代碼行數:16,代碼來源:IntervalField.java

示例11: setPropertyDataSource

import com.vaadin.data.Property; //導入方法依賴的package包/類
@Override
public void setPropertyDataSource(Property newDataSource) {
    Object value = newDataSource.getValue();
    if (value == null) {
        newDataSource.setValue(StatusI18nEnum.Open.name());
    }
    super.setPropertyDataSource(newDataSource);
}
 
開發者ID:MyCollab,項目名稱:mycollab,代碼行數:9,代碼來源:I18NValueListSelect.java

示例12: setPropertyDataSource

import com.vaadin.data.Property; //導入方法依賴的package包/類
@Override
public void setPropertyDataSource(Property newDataSource) {
    Object value = newDataSource.getValue();
    if (value == null) {
        newDataSource.setValue(MilestoneStatus.InProgress.name());
    }
    super.setPropertyDataSource(newDataSource);
}
 
開發者ID:MyCollab,項目名稱:mycollab,代碼行數:9,代碼來源:MilestoneEditFormFieldFactory.java

示例13: setPropertyDataSource

import com.vaadin.data.Property; //導入方法依賴的package包/類
@Override
public void setPropertyDataSource(Property newDataSource) {
    Object value = newDataSource.getValue();
    if (value == null) {
        newDataSource.setValue(OptionI18nEnum.BugSeverity.Major.name());
    }
    super.setPropertyDataSource(newDataSource);
}
 
開發者ID:MyCollab,項目名稱:mycollab,代碼行數:9,代碼來源:BugSeverityComboBox.java

示例14: setPropertyDataSource

import com.vaadin.data.Property; //導入方法依賴的package包/類
@Override
public void setPropertyDataSource(Property newDataSource) {
    Object value = newDataSource.getValue();
    if (value == null) {
        newDataSource.setValue(Priority.Medium.name());
    }
    super.setPropertyDataSource(newDataSource);
}
 
開發者ID:MyCollab,項目名稱:mycollab,代碼行數:9,代碼來源:PriorityComboBox.java

示例15: setPropertyDataSource

import com.vaadin.data.Property; //導入方法依賴的package包/類
@Override
public void setPropertyDataSource(Property newDataSource) {
    Double value = (Double) newDataSource.getValue();
    if (value != null) {
        double roundValue = Math.ceil(value / 10) * 10;
        newDataSource.setValue(roundValue);
        slider.setPropertyDataSource(newDataSource);
        progressLbl.setValue(roundValue + "%");
    }
    super.setPropertyDataSource(newDataSource);
}
 
開發者ID:MyCollab,項目名稱:mycollab,代碼行數:12,代碼來源:TaskSliderField.java


注:本文中的com.vaadin.data.Property.setValue方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。