List of usage examples for com.vaadin.ui ListSelect ListSelect
public ListSelect()
From source file:fi.vtt.RVaadin.RContainer.java
License:Apache License
/** * <p>// w w w .j av a2s .c o m * Returns a Vaadin ListSelect object with an implicit ValueChangeListener * that writes the selected options directly to the R workspace. See also * {@link RContainer#getOptionGroup}. * </p> * * <p> * For example, if R workspace contains the variable * {@code classes <- c("A", "B", "C")"}, then * {@code getListSelect("classes", "selected")} returns a ListSelect element * which automatically updates the variable {@code "selected"} in R. The * value can be e.g. {@code "A"}, or {@code c("A", "C")}, if we have in * addition chosen {@code setMultiSelect(true)} for the element. * </p> * * <p> * The input options can be (re)set any time with * {@link RContainer#buildSelectOptions} * </p> * * <p> * Observe that the separate element can be constructed step by step:<br> * {@code R.eval("classes <- c('A', 'B', 'C')");} <br> * {@code ListSelect chooseGroups = new ListSelect();} <br> * {@code R.buildSelectOptions(chooseGroups, "classes");}<br> * {@code R.buildSelectListener(chooseGroups, "selected");} * </p> * * * @param optionsInName * The R character vector name to contain the different choices. * Repeated elements will be ignored. * @param selectedOutName * The R character vector to immediately write the selection to. * @return Vaadin ListSelect object */ public ListSelect getListSelect(String optionsInName, final String selectedOutName) { final ListSelect listselect = new ListSelect(); listselect.setNullSelectionAllowed(false); buildSelectOptions(listselect, optionsInName); buildSelectListener(listselect, selectedOutName); return listselect; }
From source file:fi.vtt.RVaadin.RContainer.java
License:Apache License
public ListSelect getListSelect(final String selectedOutName) { final ListSelect listselect = new ListSelect(); return listselect; }
From source file:org.apache.openaz.xacml.admin.view.components.AttributeDictionarySelectorComponent.java
License:Apache License
@AutoGenerated private VerticalLayout buildMainLayout() { // common part: create layout mainLayout = new VerticalLayout(); mainLayout.setImmediate(false);/*from w w w .ja va2 s . c o m*/ 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; }
From source file:org.apache.openaz.xacml.admin.view.windows.PolicyEditorWindow.java
License:Apache License
@AutoGenerated private VerticalLayout buildMainLayout() { // common part: create layout mainLayout = new VerticalLayout(); mainLayout.setImmediate(false);/* w w w. j a v a 2s. c om*/ 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; }
From source file:org.apache.openaz.xacml.admin.view.windows.SelectPDPGroupWindow.java
License:Apache License
@AutoGenerated private VerticalLayout buildMainLayout() { // common part: create layout mainLayout = new VerticalLayout(); mainLayout.setImmediate(false);/* w w w.jav a 2s .c o m*/ 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; }
From source file:org.apache.openaz.xacml.admin.view.windows.VariableReferenceEditorWindow.java
License:Apache License
@AutoGenerated private VerticalLayout buildMainLayout() { // common part: create layout mainLayout = new VerticalLayout(); mainLayout.setImmediate(false);//from w ww . j a v a2 s . c om 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; }
From source file:org.apache.usergrid.chop.webapp.view.user.UserListWindow.java
License:Apache License
private void addList(AbsoluteLayout mainLayout) { ListSelect list = new ListSelect(); list.setWidth("100%"); list.setHeight("420px"); list.setNullSelectionAllowed(false); list.setImmediate(true);//from w w w .ja va 2 s. c om 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;"); }
From source file:org.generationcp.breeding.manager.crossingmanager.SelectGermplasmListWindow.java
License:Open Source License
public SelectGermplasmListWindow() { this.parentList = new ListSelect(); this.makeCrossesComponent = null; }
From source file:org.generationcp.breeding.manager.crossingmanager.SelectGermplasmListWindow.java
License:Open Source License
public SelectGermplasmListWindow(NurseryTemplateConditionsComponent nurseryTemplateConditionComponent, String germplasmListFor) { // TODO Auto-generated constructor stub this.nurseryTemplateCall = true; this.nurseryTemplateConditionComponent = nurseryTemplateConditionComponent; this.germplasmListFor = germplasmListFor; this.parentList = new ListSelect(); this.makeCrossesComponent = null; }
From source file:org.generationcp.breeding.manager.listimport.SelectGermplasmWindow.java
License:Open Source License
public SelectGermplasmWindow() { this.parentList = new ListSelect(); }