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


Java Property.ValueChangeListener方法代碼示例

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


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

示例1: getListSelectionListener

import com.vaadin.data.Property; //導入方法依賴的package包/類
protected ValueChangeListener getListSelectionListener() {
  return new Property.ValueChangeListener() {
    private static final long serialVersionUID = 1L;
    public void valueChange(ValueChangeEvent event) {
      Item item = taskTable.getItem(event.getProperty().getValue()); // the value of the property is the itemId of the table entry
      
      if(item != null) {
        String id = (String) item.getItemProperty("id").getValue();
        setDetailComponent(createDetailComponent(id));
        
        UriFragment taskFragment = getUriFragment(id);
        ExplorerApp.get().setCurrentUriFragment(taskFragment);
      } else {
        // Nothing is selected
        setDetailComponent(null);
        ExplorerApp.get().setCurrentUriFragment(getUriFragment(null));
      }
    }
  };
}
 
開發者ID:logicalhacking,項目名稱:SecureBPMN,代碼行數:21,代碼來源:TaskPage.java

示例2: createFieldComponent

import com.vaadin.data.Property; //導入方法依賴的package包/類
@Override
protected AbstractSelect createFieldComponent() {

    final AbstractSelect supplierPageSelect = super.createFieldComponent();
    supplierPageSelect.setItemCaptionMode(AbstractSelect.ItemCaptionMode.EXPLICIT_DEFAULTS_ID);

    final AbstractSelect templateSelect = findTemplateSelect();
    if (templateSelect == null) {
        throw new RuntimeException("Cannot find template ComboBox");
    }
    Property.ValueChangeListener listener = getValueChangeListener(templateSelect, supplierPageSelect);
    templateSelect.addValueChangeListener(listener);
    listener.valueChange(new Field.ValueChangeEvent(templateSelect));

    supplierPageSelect.setVisible(utils.requiresParentTemplate((String) templateSelect.getValue()));
    return supplierPageSelect;
}
 
開發者ID:magnoliales,項目名稱:magnolia-handlebars,代碼行數:18,代碼來源:SupplierPageSelectorFieldFactory.java

示例3: getValueChangeListener

import com.vaadin.data.Property; //導入方法依賴的package包/類
private Property.ValueChangeListener getValueChangeListener(final AbstractSelect templateComboBox,
                                                            final AbstractSelect supplierPageSelect) {
    final Map<String, String> parentTemplates = utils.getParentTemplates();
    return new Property.ValueChangeListener() {
        @Override
        public void valueChange(Property.ValueChangeEvent event) {
            String templateId = (String) templateComboBox.getValue();
            boolean requiresSupplierPage = parentTemplates.containsKey(templateId);
            if (requiresSupplierPage) {
                supplierPageSelect.removeAllItems();
                String parentTemplateId = parentTemplates.get(templateId);
                final Map<String, String> pages = utils.findPagesUsingTemplate(parentTemplateId);
                for (Map.Entry<String, String> entry : pages.entrySet()) {
                    supplierPageSelect.addItem(entry.getValue());
                    supplierPageSelect.setItemCaption(entry.getValue(), entry.getKey());
                }
                supplierPageSelect.setRequired(true);
                supplierPageSelect.setVisible(true);
            } else {
                supplierPageSelect.setValue(null);
                supplierPageSelect.setRequired(false);
                supplierPageSelect.setVisible(false);
            }
        }
    };
}
 
開發者ID:magnoliales,項目名稱:magnolia-handlebars,代碼行數:27,代碼來源:SupplierPageSelectorFieldFactory.java

示例4: createDateValueChangeListener

import com.vaadin.data.Property; //導入方法依賴的package包/類
protected Property.ValueChangeListener createDateValueChangeListener() {
    return e -> {
        if (!checkRange(constructDate())) {
            return;
        }

        updateInstance();

        if (component != null) {
            // Repaint error state
            component.markAsDirty();
        }
    };
}
 
開發者ID:cuba-platform,項目名稱:cuba,代碼行數:15,代碼來源:WebDateField.java

示例5: setValueChangeListener

import com.vaadin.data.Property; //導入方法依賴的package包/類
public ComboBoxBuilder setValueChangeListener(final Property.ValueChangeListener valueChangeListener) {
    this.valueChangeListener = valueChangeListener;
    return this;
}
 
開發者ID:eclipse,項目名稱:hawkbit,代碼行數:5,代碼來源:ComboBoxBuilder.java

示例6: addValueChangedListener

import com.vaadin.data.Property; //導入方法依賴的package包/類
public void addValueChangedListener(Property.ValueChangeListener listener) {
	tree.addValueChangeListener(listener);
}
 
開發者ID:mhus,項目名稱:cherry-web,代碼行數:4,代碼來源:NavigationView.java


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