@Override protected Component initContent() { VerticalLayout layout = new VerticalLayout(); setStyleName("colorselect"); setWidth("100%"); range = new ComboBox<>(null, EnumSet.allOf(ColorRange.class)); range.setEmptySelectionAllowed(false); range.setWidth("100%"); range.addValueChangeListener(this::valueChange); range.setValue(ColorRange.ALL); layout.addComponent(range); grid = new ColorPickerGrid(createAllColors(14, 10)); grid.setWidth("100%"); grid.addValueChangeListener(this::fireEvent); layout.addComponent(grid); return layout; }
/** * Creates a new instance.<P> */ public CmsLoginOuSelector() { m_ouSelect.setWidth("100%"); setCompositionRoot(m_ouSelect); m_ouSelect.setFilteringMode(FilteringMode.CONTAINS); m_ouSelect.setNullSelectionAllowed(false); }
spUICombo.setWidth(width);
spUICombo.setWidth(width);
private void buildUI() { combo = new ComboBox(null, container); combo.setImmediate(true); combo.setNullSelectionAllowed(false); combo.setWidth(200 + "px"); combo.setId(ID.getId(Optional.empty(), this, combo)); combo.setContainerDataSource(container); // Sets the combobox to show a certain property as the item caption combo.setItemCaptionPropertyId(LocaleContainer.PropertyName.NAME); combo.setItemCaptionMode(ItemCaptionMode.PROPERTY); // Sets the icon to use with the items combo.setItemIconPropertyId(LocaleContainer.PropertyName.FLAG); combo.setValue(currentLocale.getLocale() .toLanguageTag()); combo.addValueChangeListener(this); }
final CmsDataViewFilter finalFilter = filter; ComboBox select = new ComboBox(filter.getNiceName()); select.setWidth("175px"); select.setNullSelectionAllowed(false); select.setPageLength(0);
//create a Store using local array data final Store store = new SimpleStore(new String[]{"abbr", "state", "nick"}, getStates()); store.load(); final ComboBox cb = new ComboBox(); cb.setForceSelection(true); cb.setMinChars(1); cb.setFieldLabel("State"); cb.setStore(store); cb.setDisplayField("state"); cb.setMode(ComboBox.LOCAL); cb.setTriggerAction(ComboBox.ALL); cb.setEmptyText("Enter state"); cb.setLoadingText("Searching..."); cb.setTypeAhead(true); cb.setSelectOnFocus(true); cb.setWidth(200);
m_principalTypeSelect.setWidth("150px"); Map<String, String> principalTypes = new LinkedHashMap<String, String>(); principalTypes.put(
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; }
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; }
/** * Prepares a combo box.<p> * * @param container the indexed item container * @param captionKey the caption message key * * @return the combo box */ private ComboBox prepareComboBox(IndexedContainer container, String captionKey) { ComboBox result = new ComboBox(CmsVaadinUtils.getWpMessagesForCurrentLocale().key(captionKey), container); result.setTextInputAllowed(true); result.setNullSelectionAllowed(false); result.setWidth("100%"); result.setInputPrompt( Messages.get().getBundle(UI.getCurrent().getLocale()).key(Messages.GUI_EXPLORER_CLICK_TO_EDIT_0)); result.setItemCaptionPropertyId(CAPTION_PROPERTY); result.setFilteringMode(FilteringMode.CONTAINS); return result; } }
/** * Prepares a combo box.<p> * * @param container the indexed item container * @param captionKey the caption message key * * @return the combo box */ private ComboBox prepareComboBox(IndexedContainer container, String captionKey) { ComboBox result = new ComboBox(CmsVaadinUtils.getWpMessagesForCurrentLocale().key(captionKey), container); result.setTextInputAllowed(true); result.setNullSelectionAllowed(false); result.setWidth("100%"); result.setInputPrompt( Messages.get().getBundle(UI.getCurrent().getLocale()).key(Messages.GUI_EXPLORER_CLICK_TO_EDIT_0)); result.setItemCaptionPropertyId(CAPTION_PROPERTY); result.setFilteringMode(FilteringMode.CONTAINS); return result; } }
protected CustomComboBoxField() { comboBox = new ComboBox(); comboBox.setContainerDataSource(getValues()); comboBox.setWidth("100%"); comboBox.setTextInputAllowed(false); comboBox.setNewItemsAllowed(false); comboBox.setNullSelectionAllowed(true); comboBox.setImmediate(true); comboBox.setWriteThrough(true); HorizontalLayout compositionRoot = new HorizontalLayout(); setCompositionRoot(compositionRoot); compositionRoot.addComponent(comboBox); compositionRoot.setExpandRatio(comboBox, 1.0f); compositionRoot.setSpacing(true); compositionRoot.setWidth("100%"); }
itemsPerPageSelect.setImmediate(true); itemsPerPageSelect.setNullSelectionAllowed(false); itemsPerPageSelect.setWidth("50px"); itemsPerPageSelect.addListener(new ValueChangeListener() { public void valueChange(com.vaadin.data.Property.ValueChangeEvent event) {
combo.setTextInputAllowed(true); combo.setNullSelectionAllowed(false); combo.setWidth("200px"); combo.setInputPrompt( Messages.get().getBundle(UI.getCurrent().getLocale()).key(Messages.GUI_EXPLORER_CLICK_TO_EDIT_0));
inf.setSpacing(true); inf.setMargin(true); m_siteSelector.setWidth("379px"); inf.addComponent(m_siteSelector); CssLayout crumbWrapper = new CssLayout();
protected void buildPage() { localeCombo = new ComboBox<>(); localeCombo.setEmptySelectionAllowed(false); localeCombo.setWidth(250 + "px"); localeSelector.setCombo(localeCombo); headerRow = headerRow(); messageBar(); subPagePanel(); getBaseLayout(); mainArea(); navTree(); navMenu(); breadcrumb(); splitPanel(); nonSplitPanel(); setSizesForInjectComponents(); baseLayout.addComponent(headerRow); baseLayout.addComponent(menu); baseLayout.addComponent(splitPanel); baseLayout.addComponent(nonSplitPanel); if (option.get(optionNavTreeVisible)) { baseLayout.setExpandRatio(splitPanel, 1f); baseLayout.setExpandRatio(nonSplitPanel, 0f); } else { baseLayout.setExpandRatio(nonSplitPanel, 1f); baseLayout.setExpandRatio(splitPanel, 0f); } baseLayout.addComponent(messageBar); }
valueLabel.setSizeUndefined(); ComboBox trueFalse = new ComboBox(); trueFalse.setWidth("15%"); trueFalse.addItem(Boolean.TRUE); trueFalse.setItemCaption(Boolean.TRUE, "true");
this.treeViewBusinessStreamCombo.setWidth("250px");
"A name must be entered.", 1, null, false)); this.startupType.setWidth("90%"); this.startupType.setValidationVisible(false);