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