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


Java ListSelect.setRows方法代码示例

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


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

示例1: initListSelect

import com.vaadin.ui.ListSelect; //导入方法依赖的package包/类
/** Initialise les listes
 * @param listSelect
 * @param container
 */
private void initListSelect(ListSelect listSelect, BeanItemContainer<DroitFonctionnalite> container){
	listSelect.setWidth(100, Unit.PERCENTAGE);
	listSelect.setMultiSelect(true);
	listSelect.setNullSelectionAllowed(false);
	listSelect.setContainerDataSource(container);
	listSelect.setImmediate(true);
	listSelect.setRows(17);
	listSelect.setItemCaptionPropertyId(DroitFonctionnalite_.libFonc.getName());
}
 
开发者ID:EsupPortail,项目名称:esup-ecandidat,代码行数:14,代码来源:AdminDroitProfilWindow.java

示例2: getScheduleComponent

import com.vaadin.ui.ListSelect; //导入方法依赖的package包/类
protected ListSelect getScheduleComponent(String caption) {
    ListSelect listSelect = new ListSelect(caption);
    listSelect.setWidth(90, Unit.PIXELS);
    listSelect.setMultiSelect(true);
    listSelect.setRows(10);
    listSelect.setImmediate(true);
    listSelect.addItem("*");
    listSelect.setItemCaption("*", "<All>");
    if (caption.equals("Second") || caption.equals("Minute")) {
        for (int i = 0; i <= 59; i++) {
            listSelect.addItem(String.valueOf(i));
        }
    } else if (caption.equals("Hour")) {
        for (int i = 0; i <= 23; i++) {
            listSelect.addItem(String.valueOf(i));
        }            
    } else if (caption.equals("Day")) {
        for (int i = 1; i <= 31; i++) {
            listSelect.addItem(String.valueOf(i));
        }            
    } else if (caption.equals("Month")) {
        listSelect.addItems("JAN", "FEB", "MAR", "APR", "MAY", "JUN", "JUL", "AUG", "SEP", "OCT", "NOV", "DEC");
    } else if (caption.equals("Day of Week")) {
        listSelect.addItems("SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT");
    } else if (caption.equals("Year")) {
        for (int i = Calendar.getInstance().get(Calendar.YEAR); i <= 2099; i++) {
            listSelect.addItem(String.valueOf(i));
        }
    }
    listSelect.select(listSelect.getItemIds().iterator().next());
    listSelect.addValueChangeListener(new ValueChangeListener() {
        public void valueChange(ValueChangeEvent event) {
            updateScheduleExpression();
        }            
    });
    return listSelect;
}
 
开发者ID:JumpMind,项目名称:metl,代码行数:38,代码来源:EditAgentDeploymentPanel.java

示例3: buildDialogLayout

import com.vaadin.ui.ListSelect; //导入方法依赖的package包/类
@Override
public void buildDialogLayout() {
    Map<String, String> env = this.getContext().getEnvironment();
    pathToShellScripts = env.get(ExecuteShellScript.SHELL_SCRIPT_PATH);
    final VerticalLayout mainLayout = new VerticalLayout();
    mainLayout.setSizeFull();
    mainLayout.setMargin(true);
    mainLayout.setSpacing(true);

    lstScriptName = new ListSelect(ctx.tr("ExecuteShellScript.dialog.scriptName"));
    lstScriptName.setRows(5);
    lstScriptName.setNullSelectionAllowed(true);
    lstScriptName.setWidth("100%");
    mainLayout.addComponent(lstScriptName);

    txtConfiguration = new TextArea(ctx.tr("ExecuteShellScript.dialog.configuration"));
    txtConfiguration.setSizeFull();
    mainLayout.addComponent(txtConfiguration);

    errorLabel = new Label();
    errorLabel.setVisible(false);
    errorLabel.setStyleName("dpu-error-label");
    mainLayout.addComponent(errorLabel);

    fillListValues();
    setCompositionRoot(mainLayout);
}
 
开发者ID:UnifiedViews,项目名称:Plugins,代码行数:28,代码来源:ExecuteShellScriptVaadinDialog.java

示例4: buildSearchLayout

import com.vaadin.ui.ListSelect; //导入方法依赖的package包/类
protected AbstractLayout buildSearchLayout() {
    FormLayout layout = new FormLayout();
    layout.setMargin(true);

    List<Plugin> existingPlugins = context.getPluginService().findPlugins();
    Set<String> groups = new HashSet<>();
    Set<String> names = new HashSet<>();
    for (Plugin plugin : existingPlugins) {
        groups.add(plugin.getArtifactGroup());
        names.add(plugin.getArtifactName());
    }

    versionSelect = new ListSelect("Versions");
    groupCombo = new ComboBox("Group");
    nameCombo = new ComboBox("Name");

    versionSelect.setRows(4);
    versionSelect.setMultiSelect(false);
    versionSelect.setNullSelectionAllowed(false);
    versionSelect.setWidth(100, Unit.PERCENTAGE);
    versionSelect.addValueChangeListener(e -> versionSelected());

    groupCombo.setWidth(100, Unit.PERCENTAGE);
    groupCombo.setNewItemsAllowed(true);
    groupCombo.addItems(groups);
    groupCombo.addValueChangeListener(e -> {
        populateNameField(nameCombo);
        setSearchButtonEnabled();
    });
    groupCombo.setNewItemHandler((newItemCaption) -> {
        groupCombo.removeItem(handEnteredGroup);
        handEnteredGroup = newItemCaption;
        groupCombo.addItem(handEnteredGroup);
        groupCombo.setValue(handEnteredGroup);
        setSearchButtonEnabled();
    });
    layout.addComponent(groupCombo);

    nameCombo.setWidth(100, Unit.PERCENTAGE);
    nameCombo.setNewItemsAllowed(true);
    nameCombo.addItems(names);
    nameCombo.addValueChangeListener(e -> {
        setSearchButtonEnabled();
    });
    nameCombo.setNewItemHandler((newItemCaption) -> {
        nameCombo.removeItem(handEnteredName);
        handEnteredName = newItemCaption;
        nameCombo.addItem(handEnteredName);
        nameCombo.setValue(handEnteredName);
        setSearchButtonEnabled();
    });
    layout.addComponent(nameCombo);

    layout.addComponent(versionSelect);

    return layout;
}
 
开发者ID:JumpMind,项目名称:metl,代码行数:58,代码来源:PluginsPanelAddDialog.java


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