当前位置: 首页>>代码示例>>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;未经允许,请勿转载。