当前位置: 首页>>代码示例>>Java>>正文


Java Property.getValue方法代码示例

本文整理汇总了Java中com.vaadin.data.Property.getValue方法的典型用法代码示例。如果您正苦于以下问题:Java Property.getValue方法的具体用法?Java Property.getValue怎么用?Java Property.getValue使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.vaadin.data.Property的用法示例。


在下文中一共展示了Property.getValue方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: passesFilter

import com.vaadin.data.Property; //导入方法依赖的package包/类
/**
 * Pass le filtre
 * 
 * @param itemId
 * @param item
 * @return true si filtre ok
 */
@Override
public boolean passesFilter(Object itemId, Item item) {
	final Property<?> p = item.getItemProperty(propertyId);
	if (p == null) {
		return false;
	}
	Object propertyValue = p.getValue();
	if (propertyValue == null) {
		return false;
	}

	final String value = stripAccents(propertyValue.toString());
	if (!value.contains(filterString)) {
		return false;
	}
	return true;
}
 
开发者ID:EsupPortail,项目名称:esup-ecandidat,代码行数:25,代码来源:InsensitiveStringFilter.java

示例2: serviceTableClicked

import com.vaadin.data.Property; //导入方法依赖的package包/类
@SuppressWarnings({ "rawtypes" })
private void serviceTableClicked(long itemId) {
	ComboBox policyComboBox = (ComboBox) this.serviceTable.getContainerProperty(itemId, PROPERTY_ID_POLICY)
			.getValue();
	ComboBox failurePolicyComboBox = (ComboBox) this.serviceTable
			.getContainerProperty(itemId, PROPERTY_ID_FAILURE_POLICY).getValue();
	Property itemProperty = this.serviceTable.getContainerProperty(itemId, PROPERTY_ID_ENABLED);

	boolean currentValue = (boolean) itemProperty.getValue();
	if (policyComboBox.getContainerDataSource().size() > 0) {
		if (isBindedWithMultiplePolicies(itemId)) {
			policyComboBox.setEnabled(false);
		} else {
			policyComboBox.setEnabled(currentValue);
		}
	}
	if (failurePolicyComboBox.getData() != null) {
		failurePolicyComboBox.setEnabled(currentValue);
	}
}
 
开发者ID:opensecuritycontroller,项目名称:osc-core,代码行数:21,代码来源:BindSecurityGroupWindow.java

示例3: 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

示例4: passesFilter

import com.vaadin.data.Property; //导入方法依赖的package包/类
@SuppressWarnings("rawtypes")
 public boolean passesFilter(Object itemId, Item item) throws UnsupportedOperationException {
     for (String property : properties) {
Property prop = item.getItemProperty(property);
     	if (prop != null) {
     		String value = null;
     		if (prop.getValue() != null) {
     			value = prop.getValue().toString();
     		}
          if (StringUtils.containsIgnoreCase(value, text)) {
              return true;
          }
     	} else {
     		throw new RuntimeException("Property " + property + " does not exist in item, valid properties are: " + item.getItemPropertyIds());
     	}
     }
     return false;
 }
 
开发者ID:JumpMind,项目名称:metl,代码行数:19,代码来源:MultiPropertyFilter.java

示例5: execute

import com.vaadin.data.Property; //导入方法依赖的package包/类
public Undoer execute(final List<VertexRef> targets, final OperationContext operationContext) {
    String ipAddr = "";
    int port = 22;

    if (targets != null) {
        for(final VertexRef target : targets) {
            final Item vertexItem = operationContext.getGraphContainer().getBaseTopology().getVertex(target).getItem();
            if (vertexItem != null) {
                final Property ipAddrProperty = vertexItem.getItemProperty("ipAddr");
                ipAddr = ipAddrProperty == null ? "" : (String) ipAddrProperty.getValue();
                //Property portProperty = operationContext.getGraphContainer().getVertexItem(target).getItemProperty("port");
                port = 22; //portProperty == null ? -1 : (Integer) portProperty.getValue();
            }
        }
    }
    operationContext.getMainWindow().addWindow(new AuthWindow(ipAddr, port));
    return null;
}
 
开发者ID:qoswork,项目名称:opennmszh,代码行数:19,代码来源:SSHOperation.java

示例6: 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

示例7: formatPropertyValue

import com.vaadin.data.Property; //导入方法依赖的package包/类
@Override
protected String formatPropertyValue(final Object rowId,
        final Object colId, final Property<?> property) {
    String result = super.formatPropertyValue(rowId, colId, property);
    if (colId.equals("revenue")) {
        if (property != null && property.getValue() != null) {
            Double r = (Double) property.getValue();
            String ret = new DecimalFormat("#.##").format(r);
            result = "$" + ret;
        } else {
            result = "";
        }
    }
    return result;
}
 
开发者ID:imotSpot,项目名称:imotSpot,代码行数:16,代码来源:TopTenMoviesTable.java

示例8: passesFilter

import com.vaadin.data.Property; //导入方法依赖的package包/类
@Override
public boolean passesFilter(Object itemId, Item item) throws UnsupportedOperationException {
    Property property = item.getItemProperty(propertyId);
    if (property == null || !property.getType().equals(String.class))
        return false;

    String value = (String) property.getValue();
    return match(value) || checkParents((MenuItem) itemId);
}
 
开发者ID:cuba-platform,项目名称:sampler,代码行数:10,代码来源:SamplerFoldersPane.java

示例9: 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

示例10: setPropertyDataSource

import com.vaadin.data.Property; //导入方法依赖的package包/类
@Override
public void setPropertyDataSource(Property newDataSource)
{
    super.setPropertyDataSource(newDataSource);

    if (newDataSource != null) {
        layout.removeAllComponents();
        Component value = (Component) newDataSource.getValue();
        if (value != null) {
            layout.addComponent(value);
        }
    }
}
 
开发者ID:cuba-platform,项目名称:cuba,代码行数:14,代码来源:ComponentCustomField.java

示例11: generateCell

import com.vaadin.data.Property; //导入方法依赖的package包/类
@Override
public Object generateCell(com.vaadin.ui.Table source, Object itemId, Object columnId) {
    final Property property = source.getItem(itemId).getItemProperty(columnId);
    final Object value = property.getValue();

    if (value == null) {
        return null;
    }

    String stringValue = value.toString();
    if (columnId instanceof MetaPropertyPath) {
        MetaProperty metaProperty = ((MetaPropertyPath) columnId).getMetaProperty();
        if (DynamicAttributesUtils.isDynamicAttribute(metaProperty))
            stringValue = DynamicAttributesUtils.getDynamicAttributeValueAsString(metaProperty, value);
    }
    String cellValue = stringValue;
    boolean isMultiLineCell = StringUtils.contains(stringValue, "\n");
    if (isMultiLineCell) {
        cellValue = StringUtils.replace(cellValue, "\n", " ");
    }

    int maxTextLength = column.getMaxTextLength();
    if (stringValue.length() > maxTextLength + MAX_TEXT_LENGTH_GAP || isMultiLineCell) {
        return StringUtils.abbreviate(cellValue, maxTextLength);
    } else {
        return cellValue;
    }
}
 
开发者ID:cuba-platform,项目名称:cuba,代码行数:29,代码来源:WebAbstractTable.java

示例12: formatPropertyValue

import com.vaadin.data.Property; //导入方法依赖的package包/类
@Override
protected String formatPropertyValue(Object rowId, Object colId,
        Property property) {
    if (colId.equals("stockCount")) {
        Integer stock = (Integer) property.getValue();
        if (stock.equals(0)) {
            return "-";
        } else {
            return stock.toString();
        }
    }
    return super.formatPropertyValue(rowId, colId, property);
}
 
开发者ID:jvalenciag,项目名称:VaadinSpringShiroMongoDB,代码行数:14,代码来源:ProductTable.java

示例13: formatPropertyValue

import com.vaadin.data.Property; //导入方法依赖的package包/类
@Override
protected String formatPropertyValue(Object rowId, Object colId, Property<?> property) {
    if (property.getValue() != null) {
        if (property.getType() == Date.class) {
            return CommonUiUtils.formatDateTime((Date) property.getValue());
        }
    }
    return super.formatPropertyValue(rowId, colId, property);
}
 
开发者ID:JumpMind,项目名称:metl,代码行数:10,代码来源:Table.java

示例14: setPropertyDataSource

import com.vaadin.data.Property; //导入方法依赖的package包/类
@Override
public void setPropertyDataSource(Property newDataSource) {
    String value = (String) newDataSource.getValue();
    if (value != null) {
        TimezoneVal timezoneVal = new TimezoneVal(value);
        areaSelection.setValue(timezoneVal.getArea());
        timezoneSelection.setValue(value);
    }
    super.setPropertyDataSource(newDataSource);
}
 
开发者ID:MyCollab,项目名称:mycollab,代码行数:11,代码来源:TimeZoneSelectionField.java

示例15: generateCell

import com.vaadin.data.Property; //导入方法依赖的package包/类
@Override
public Object generateCell(Table source, Object itemId, Object columnId) {
	Property property = source.getContainerProperty(itemId, columnId);
	if (property == null || property.getValue() == null) {
		return null;
	} else {
		return ((OnmsServiceType)property.getValue()).getName();
	}
}
 
开发者ID:qoswork,项目名称:opennmszh,代码行数:10,代码来源:OnmsServiceTypeGenerator.java


注:本文中的com.vaadin.data.Property.getValue方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。