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


Java ListSelect.setWidth方法代码示例

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


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

示例1: addList

import com.vaadin.ui.ListSelect; //导入方法依赖的package包/类
private void addList( AbsoluteLayout mainLayout ) {

        ListSelect list = new ListSelect();
        list.setWidth( "100%" );
        list.setHeight( "420px" );
        list.setNullSelectionAllowed( false );
        list.setImmediate( true );

        list.addValueChangeListener( new Property.ValueChangeListener() {
            @Override
            public void valueChange( Property.ValueChangeEvent event ) {
                Object value = event.getProperty().getValue();
                if ( value != null ) {
                    close();
                    selectedUser = ( String ) value;
                    showUser( ( String ) value );
                }
            }
        });

        loadData( list );

        mainLayout.addComponent( list, "left: 0px; top: 0px;" );
    }
 
开发者ID:apache,项目名称:usergrid,代码行数:25,代码来源:UserListWindow.java

示例2: 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

示例3: initListSelectPj

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

示例4: initListSelectFormulaire

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

示例5: buildMainLayout

import com.vaadin.ui.ListSelect; //导入方法依赖的package包/类
@AutoGenerated
private VerticalLayout buildMainLayout() {
	// common part: create layout
	mainLayout = new VerticalLayout();
	mainLayout.setImmediate(false);
	mainLayout.setWidth("-1px");
	mainLayout.setHeight("-1px");
	mainLayout.setMargin(true);
	mainLayout.setSpacing(true);
	
	// top-level component properties
	setWidth("-1px");
	setHeight("-1px");
	
	// listSelectPDPGroup
	listSelectPDPGroup = new ListSelect();
	listSelectPDPGroup.setImmediate(false);
	listSelectPDPGroup.setWidth("-1px");
	listSelectPDPGroup.setHeight("-1px");
	listSelectPDPGroup.setInvalidAllowed(false);
	listSelectPDPGroup.setRequired(true);
	mainLayout.addComponent(listSelectPDPGroup);
	mainLayout.setExpandRatio(listSelectPDPGroup, 1.0f);
	
	// buttonSave
	buttonSave = new Button();
	buttonSave.setCaption("Save");
	buttonSave.setImmediate(true);
	buttonSave.setWidth("-1px");
	buttonSave.setHeight("-1px");
	mainLayout.addComponent(buttonSave);
	mainLayout.setComponentAlignment(buttonSave, new Alignment(48));
	
	return mainLayout;
}
 
开发者ID:apache,项目名称:incubator-openaz,代码行数:36,代码来源:SelectPDPGroupWindow.java

示例6: buildMainLayout

import com.vaadin.ui.ListSelect; //导入方法依赖的package包/类
@AutoGenerated
private VerticalLayout buildMainLayout() {
	// common part: create layout
	mainLayout = new VerticalLayout();
	mainLayout.setImmediate(false);
	mainLayout.setWidth("-1px");
	mainLayout.setHeight("-1px");
	mainLayout.setMargin(true);
	mainLayout.setSpacing(true);
	
	// top-level component properties
	setWidth("-1px");
	setHeight("-1px");
	
	// horizontalLayout_2
	horizontalLayout_2 = buildHorizontalLayout_2();
	mainLayout.addComponent(horizontalLayout_2);
	
	// listSelectAttribute
	listSelectAttribute = new ListSelect();
	listSelectAttribute.setCaption("Dictionary Attributes");
	listSelectAttribute.setImmediate(false);
	listSelectAttribute.setWidth("100.0%");
	listSelectAttribute.setHeight("-1px");
	listSelectAttribute.setInvalidAllowed(false);
	listSelectAttribute.setRequired(true);
	mainLayout.addComponent(listSelectAttribute);
	mainLayout.setExpandRatio(listSelectAttribute, 1.0f);
	
	return mainLayout;
}
 
开发者ID:apache,项目名称:incubator-openaz,代码行数:32,代码来源:AttributeDictionarySelectorComponent.java

示例7: 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

示例8: 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

示例9: createDashboardSelector

import com.vaadin.ui.ListSelect; //导入方法依赖的package包/类
private void createDashboardSelector()
{
	dashBoardSelector = new ListSelect();
	dashBoardSelector.setHeight("100%");
	dashBoardSelector.setWidth("300");

	// dashBoardSelector.setItemCaptionPropertyId(Tblportallayout_.name.getName());
	// dashBoardSelector.setItemCaptionMode(ItemCaptionMode.PROPERTY);

	container = new BeanItemContainer<>(Tblportallayout.class);
	loadDashboardList();
	dashBoardSelector.setContainerDataSource(container);
	dashBoardSelector.setNullSelectionAllowed(false);

	dashBoardSelector.addValueChangeListener(new ValueChangeListener()
	{

		private static final long serialVersionUID = 2850017605363067882L;

		@Override
		public void valueChange(ValueChangeEvent event)
		{

			if (!loading)
			{
				Tblportallayout portalLayout = (Tblportallayout) event.getProperty().getValue();
				if (portalLayout != null)
				{
					portalLayout = JpaBaseDao.getGenericDao(Tblportallayout.class).findByEntityId(portalLayout);
					createDashboard(portalLayout);
					closeToolBar();
				}
			}
		}
	});

}
 
开发者ID:rlsutton1,项目名称:VaadinUtils,代码行数:38,代码来源:DashBoardView.java

示例10: buildMainLayout

import com.vaadin.ui.ListSelect; //导入方法依赖的package包/类
@AutoGenerated
private AbsoluteLayout buildMainLayout() {
	// common part: create layout
	mainLayout = new AbsoluteLayout();
	mainLayout.setImmediate(false);
	mainLayout.setWidth("100%");
	mainLayout.setHeight("100%");

	// top-level component properties
	setWidth("100.0%");
	setHeight("100.0%");
	
	// butCrearCompetencia
	butCrearCompetencia = new Button();
	butCrearCompetencia.setCaption("Crear Competencia");
	butCrearCompetencia.setImmediate(false);
	butCrearCompetencia.setWidth("-1px");
	butCrearCompetencia.setHeight("-1px");
	mainLayout.addComponent(butCrearCompetencia, "top:40.0px;left:80.0px;");
	
	// butEditarCompetencia
	butEditarCompetencia = new Button();
	butEditarCompetencia.setCaption("Editar Competencia");
	butEditarCompetencia.setImmediate(false);
	butEditarCompetencia.setWidth("-1px");
	butEditarCompetencia.setHeight("-1px");
	mainLayout.addComponent(butEditarCompetencia,
			"top:40.0px;left:240.0px;");
	
	// listSelect_1
	listSelect_1 = new ListSelect();
	listSelect_1.setImmediate(false);
	listSelect_1.setWidth("500px");
	listSelect_1.setHeight("200px");
	mainLayout.addComponent(listSelect_1, "top:100.0px;left:80.0px;");
	
	return mainLayout;
}
 
开发者ID:unicesi,项目名称:academ,代码行数:39,代码来源:Competencias.java

示例11: actualizar

import com.vaadin.ui.ListSelect; //导入方法依赖的package包/类
public void actualizar( List<RolBO> roles )
{
	for( RolBO rol : roles )
	{
		ListSelect l = new ListSelect( rol.getNombre( ) );
		l.setWidth("100%");
		l.setHeight("100%");
		tstRoles.addTab( l );
	}
	
	mostrarEvaluadoresDisponibles( ( ListSelect )tstRoles.getSelectedTab( ) );
}
 
开发者ID:unicesi,项目名称:academ,代码行数:13,代码来源:PanelAsignarRolEvaluador.java

示例12: buildMainLayout

import com.vaadin.ui.ListSelect; //导入方法依赖的package包/类
@AutoGenerated
private VerticalLayout buildMainLayout() {
	// common part: create layout
	mainLayout = new VerticalLayout();
	mainLayout.setImmediate(false);
	mainLayout.setWidth("-1px");
	mainLayout.setHeight("-1px");
	mainLayout.setMargin(true);
	mainLayout.setSpacing(true);
	
	// top-level component properties
	setWidth("-1px");
	setHeight("-1px");
	
	// listSelectVariables
	listSelectVariables = new ListSelect();
	listSelectVariables.setCaption("Defined Variables");
	listSelectVariables.setImmediate(false);
	listSelectVariables.setWidth("100.0%");
	listSelectVariables.setHeight("-1px");
	mainLayout.addComponent(listSelectVariables);
	mainLayout.setExpandRatio(listSelectVariables, 1.0f);
	
	// textFieldVariable
	textFieldVariable = new TextField();
	textFieldVariable.setCaption("Variable");
	textFieldVariable.setImmediate(false);
	textFieldVariable.setWidth("-1px");
	textFieldVariable.setHeight("-1px");
	textFieldVariable.setInvalidAllowed(false);
	textFieldVariable.setRequired(true);
	textFieldVariable.setInputPrompt("Eg. \"12345\" or \"myVariable1\"");
	mainLayout.addComponent(textFieldVariable);
	mainLayout.setExpandRatio(textFieldVariable, 1.0f);
	
	// buttonSave
	buttonSave = new Button();
	buttonSave.setCaption("Save");
	buttonSave.setImmediate(true);
	buttonSave.setWidth("-1px");
	buttonSave.setHeight("-1px");
	mainLayout.addComponent(buttonSave);
	mainLayout.setComponentAlignment(buttonSave, new Alignment(48));
	
	return mainLayout;
}
 
开发者ID:apache,项目名称:incubator-openaz,代码行数:47,代码来源:VariableReferenceEditorWindow.java

示例13: buildMainLayout

import com.vaadin.ui.ListSelect; //导入方法依赖的package包/类
@AutoGenerated
private VerticalLayout buildMainLayout() {
	// common part: create layout
	mainLayout = new VerticalLayout();
	mainLayout.setImmediate(false);
	mainLayout.setWidth("-1px");
	mainLayout.setHeight("-1px");
	mainLayout.setMargin(true);
	mainLayout.setSpacing(true);
	
	// top-level component properties
	setWidth("-1px");
	setHeight("-1px");
	
	// labelID
	labelID = new Label();
	labelID.setCaption("Policy Set ID");
	labelID.setImmediate(false);
	labelID.setWidth("100.0%");
	labelID.setHeight("-1px");
	labelID.setValue("Label");
	mainLayout.addComponent(labelID);
	
	// textFieldVersion
	textFieldVersion = new TextField();
	textFieldVersion.setCaption("Version");
	textFieldVersion.setImmediate(false);
	textFieldVersion
			.setDescription("The format is numbers only separated by decimal point.");
	textFieldVersion.setWidth("-1px");
	textFieldVersion.setHeight("-1px");
	textFieldVersion.setInvalidAllowed(false);
	textFieldVersion.setRequired(true);
	textFieldVersion.setInputPrompt("Eg. 1 or 1.0 or 1.0.0 etc.");
	mainLayout.addComponent(textFieldVersion);
	
	// listSelectAlgorithm
	listSelectAlgorithm = new ListSelect();
	listSelectAlgorithm.setCaption("Policy Combining Algorithm");
	listSelectAlgorithm.setImmediate(false);
	listSelectAlgorithm.setWidth("100.0%");
	listSelectAlgorithm.setHeight("-1px");
	listSelectAlgorithm.setInvalidAllowed(false);
	listSelectAlgorithm.setRequired(true);
	mainLayout.addComponent(listSelectAlgorithm);
	
	// textAreaDescription
	textAreaDescription = new TextArea();
	textAreaDescription.setCaption("Description");
	textAreaDescription.setImmediate(false);
	textAreaDescription.setWidth("100.0%");
	textAreaDescription.setHeight("-1px");
	mainLayout.addComponent(textAreaDescription);
	mainLayout.setExpandRatio(textAreaDescription, 1.0f);
	
	// buttonSave
	buttonSave = new Button();
	buttonSave.setCaption("Save");
	buttonSave.setImmediate(true);
	buttonSave.setWidth("-1px");
	buttonSave.setHeight("-1px");
	mainLayout.addComponent(buttonSave);
	mainLayout.setComponentAlignment(buttonSave, new Alignment(48));
	
	return mainLayout;
}
 
开发者ID:apache,项目名称:incubator-openaz,代码行数:67,代码来源:PolicyEditorWindow.java

示例14: 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

示例15: buildMainLayout

import com.vaadin.ui.ListSelect; //导入方法依赖的package包/类
@AutoGenerated
private AbsoluteLayout buildMainLayout() {
	// common part: create layout
	mainLayout = new AbsoluteLayout();
	mainLayout.setImmediate(false);
	mainLayout.setWidth("100%");
	mainLayout.setHeight("100%");
	
	// top-level component properties
	setWidth("100.0%");
	setHeight("100.0%");
	
	// btnGuardar
	btnGuardar = new Button();
	btnGuardar.setCaption("Guardar");
	btnGuardar.setImmediate(true);
	btnGuardar.setWidth("-1px");
	btnGuardar.setHeight("-1px");		
	mainLayout.addComponent(btnGuardar, "top:20.0px;left:10.0px;");
	
	// lblEvaluadores
	lblEvaluadores = new Label();
	lblEvaluadores.setImmediate(false);
	lblEvaluadores.setWidth("-1px");
	lblEvaluadores.setHeight("-1px");
	lblEvaluadores.setValue("Evaluadores:");
	mainLayout.addComponent(lblEvaluadores, "top:80.0px;left:30.0px;");
	
	// btnAgregar
	btnAgregar = new Button();
	btnAgregar.setCaption(">");
	btnAgregar.setImmediate(true);
	btnAgregar.setWidth("-1px");
	btnAgregar.setHeight("-1px");
	mainLayout.addComponent(btnAgregar, "top:160.0px;left:204.0px;");
	
	// btnRemover
	btnRemover = new Button();
	btnRemover.setCaption("<");
	btnRemover.setImmediate(true);
	btnRemover.setWidth("-1px");
	btnRemover.setHeight("-1px");
	mainLayout.addComponent(btnRemover, "top:234.0px;left:204.0px;");
	
	// lblRoles
	lblRoles = new Label();
	lblRoles.setImmediate(false);
	lblRoles.setWidth("-1px");
	lblRoles.setHeight("-1px");
	lblRoles.setValue("Roles:");
	mainLayout.addComponent(lblRoles, "top:80.0px;left:280.0px;");
	
	// tstRoles
	tstRoles = new TabSheet();
	tstRoles.setImmediate(false);
	tstRoles.setWidth("410px");
	tstRoles.setHeight("246px");
	mainLayout.addComponent(tstRoles, "top:114.0px;left:280.0px;");
	
	// lstEvaluadores
	lstEvaluadores = new ListSelect();
	lstEvaluadores.setImmediate(false);
	lstEvaluadores.setWidth("140px");
	lstEvaluadores.setHeight("246px");
	mainLayout.addComponent(lstEvaluadores, "top:114.0px;left:20.0px;");
	
	return mainLayout;
}
 
开发者ID:unicesi,项目名称:academ,代码行数:69,代码来源:PanelAsignarRolEvaluador.java


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