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