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


Java ComboBox.setPageLength方法代码示例

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


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

示例1: buildCombBox

import com.vaadin.ui.ComboBox; //导入方法依赖的package包/类
/**
 * @return a new ComboBox
 */
public ComboBox buildCombBox() {
    final ComboBox targetFilter = SPUIComponentProvider.getComboBox(null, "", null, ValoTheme.COMBOBOX_SMALL, false,
            "", prompt);
    targetFilter.setImmediate(true);
    targetFilter.setPageLength(7);
    targetFilter.setItemCaptionPropertyId(SPUILabelDefinitions.VAR_NAME);
    targetFilter.setSizeUndefined();
    if (id != null) {
        targetFilter.setId(id);
    }
    if (valueChangeListener != null) {
        targetFilter.addValueChangeListener(valueChangeListener);
    }
    return targetFilter;
}
 
开发者ID:eclipse,项目名称:hawkbit,代码行数:19,代码来源:ComboBoxBuilder.java

示例2: generateComboBox

import com.vaadin.ui.ComboBox; //导入方法依赖的package包/类
/**
 * @param liste
 * @param libNull
 * @return une combo grace a la liste
 */
private ComboBox generateComboBox(final List<String> liste, final String libNull) {
	ComboBox sampleIdCB = new ComboBox();
	sampleIdCB.setPageLength(20);
	sampleIdCB.setTextInputAllowed(false);
	BeanItemContainer<String> dataList = new BeanItemContainer<>(String.class);
	dataList.addBean(applicationContext.getMessage("filter.all", null, UI.getCurrent().getLocale()));
	if (libNull != null) {
		dataList.addBean(libNull);
	}
	dataList.addAll(liste);
	sampleIdCB
			.setNullSelectionItemId(applicationContext.getMessage("filter.all", null, UI.getCurrent().getLocale()));
	sampleIdCB.setContainerDataSource(dataList);
	sampleIdCB.setImmediate(true);
	return sampleIdCB;
}
 
开发者ID:EsupPortail,项目名称:esup-ecandidat,代码行数:22,代码来源:CandidatureViewTemplate.java

示例3: DateSelectionField

import com.vaadin.ui.ComboBox; //导入方法依赖的package包/类
public DateSelectionField() {
    cboMonth = new ComboBox();
    cboMonth.setNullSelectionAllowed(true);
    cboMonth.setPageLength(12);
    cboMonth.setImmediate(true);

    addMonthItems();
    cboMonth.setWidth("117px");

    cboDate = new ComboBox();
    cboDate.setNullSelectionAllowed(true);
    cboDate.setImmediate(true);

    addDayItems();
    cboDate.setWidth("80px");

    cboYear = new ComboBox();
    cboYear.setNullSelectionAllowed(true);
    cboYear.setImmediate(true);

    addYearItems();
    cboYear.setWidth("80px");
}
 
开发者ID:MyCollab,项目名称:mycollab,代码行数:24,代码来源:DateSelectionField.java

示例4: getDsComboField

import com.vaadin.ui.ComboBox; //导入方法依赖的package包/类
private ComboBox getDsComboField() {
    final Container container = createContainer();
    final ComboBox dsComboBox = SPUIComponentProvider.getComboBox(i18n.getMessage("bulkupload.ds.name"), "", null,
            null, false, "", i18n.getMessage("bulkupload.ds.name"));
    dsComboBox.setSizeUndefined();
    dsComboBox.addStyleName(SPUIDefinitions.BULK_UPLOD_DS_COMBO_STYLE);
    dsComboBox.setImmediate(true);
    dsComboBox.setFilteringMode(FilteringMode.STARTSWITH);
    dsComboBox.setPageLength(7);
    dsComboBox.setContainerDataSource(container);
    dsComboBox.setItemCaptionPropertyId(SPUILabelDefinitions.VAR_NAME_VERSION);
    dsComboBox.setId(UIComponentIdProvider.BULK_UPLOAD_DS_COMBO);
    dsComboBox.setWidth("100%");
    return dsComboBox;
}
 
开发者ID:eclipse,项目名称:hawkbit,代码行数:16,代码来源:TargetBulkUpdateWindowLayout.java

示例5: createField

import com.vaadin.ui.ComboBox; //导入方法依赖的package包/类
public Field<?> createField(final Container dataContainer, final Object itemId, final Object propertyId,
        com.vaadin.ui.Component uiContext) {
    final ComponentAttribSetting setting = (ComponentAttribSetting) itemId;
    Field<?> field = null;

    if (propertyId.equals("value") && (setting.getValue() == null || !setting.getValue().contains("\n"))) {
        final ComboBox combo = new ComboBox();
        combo.setWidth(100, Unit.PERCENTAGE);
        String[] functions = ModelAttributeScriptHelper.getSignatures();
        for (String function : functions) {
            combo.addItem(function);
        }
        combo.setPageLength(functions.length > 20 ? 20 : functions.length);
        if (setting.getValue() != null && !combo.getItemIds().contains(setting.getValue())) {
            combo.addItem(setting.getValue());
        }
        combo.setImmediate(true);
        combo.setNewItemsAllowed(true);
        combo.addValueChangeListener(new ValueChangeListener() {
            public void valueChange(ValueChangeEvent event) {
                setting.setValue((String) combo.getValue());
                context.getConfigurationService().save(setting);
            }
        });
        field = combo;
    }
    return field;
}
 
开发者ID:JumpMind,项目名称:metl,代码行数:29,代码来源:EditTransformerPanel.java


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