當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。