/** * @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; }
/** * @param propertyId * @param libNull * @return les filtres perso en ComboBox */ public ComboBox getComboBoxFilterComponent(final Object propertyId, final String libNull) { List<String> list = new ArrayList<>(); if (propertyId.equals(Candidature_.typeTraitement.getName() + "." + TypeTraitement_.libTypTrait.getName())) { cacheController.getListeTypeTraitement().forEach(e -> list.add(e.getLibTypTrait())); return generateComboBox(list, libNull); } else if (propertyId.equals(Candidature_.typeStatut.getName() + "." + TypeStatut_.libTypStatut.getName())) { cacheController.getListeTypeStatut().forEach(e -> list.add(e.getLibTypStatut())); return generateComboBox(list, libNull); } else if (propertyId.equals(LAST_TYPE_DECISION_PREFIXE + TypeDecisionCandidature_.typeDecision.getName() + "." + TypeDecision_.libTypDec.getName())) { typeDecisionController.getTypeDecisionsEnService().forEach(e -> list.add(e.getLibTypDec())); return generateComboBox(list, libNull); } return null; }
/** * @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; }
/** * Ajoute un filtre en combobox String sur une colonne * * @param property * @param cb */ public void addComboBoxFilters(String property, ComboBox cb, String libNull) { HeaderCell cell = getFilterCell(property); cb.addValueChangeListener(e -> { container.removeContainerFilters(property); if (cb.getValue() != null && !((String) cb.getValue()).isEmpty() && !((String) cb.getValue()).equals(libNull)) { container.addContainerFilter(new SimpleStringFilter(property, (String) cb.getValue(), true, true)); } else if (cb.getValue() != null && !((String) cb.getValue()).isEmpty() && ((String) cb.getValue()).equals(libNull)) { container.addContainerFilter(new IsNull(property)); } fireFilterListener(); fireFilterListener(); }); cb.setImmediate(true); cb.setWidth(100, Unit.PERCENTAGE); cb.addStyleName(ValoTheme.COMBOBOX_TINY); cell.setComponent(cb); }
@Override public void initForm() { this.form.addComponent(getName()); this.form.addComponent(getProjects()); this.form.addComponent(getRegion()); this.form.addComponent(getUserOptions()); this.form.addComponent(getOptionTable()); List<ComboBox> networks = getNetworkComboBoxes(); for (ComboBox combobox : networks) { this.form.addComponent(combobox); } this.form.addComponent(getIPPool()); this.form.addComponent(getCount()); this.form.addComponent(getSharedCheckBox()); this.name.focus(); getCount().setEnabled(false); }
protected Component getProjects() { try { this.project = new ComboBox("Select Project"); this.project.setTextInputAllowed(true); this.project.setNullSelectionAllowed(false); this.project.setImmediate(true); this.project.setRequired(true); this.project.setRequiredError("Project cannot be empty"); } catch (Exception e) { ViewUtil.iscNotification(e.getMessage(), Notification.Type.ERROR_MESSAGE); log.error("Error populating Project List combobox", e); } return this.project; }
protected List<ComboBox> getNetworkComboBoxes() { List<ComboBox> networkComboBox = new ArrayList<>(); this.managementNetwork = new ComboBox("Select Management Network"); this.managementNetwork.setTextInputAllowed(false); this.managementNetwork.setNullSelectionAllowed(false); this.managementNetwork.setImmediate(true); this.managementNetwork.setRequired(true); this.managementNetwork.setRequiredError("Management Network cannot be empty"); networkComboBox.add(this.managementNetwork); this.inspectionNetwork = new ComboBox("Select Inspection Network"); this.inspectionNetwork.setTextInputAllowed(false); this.inspectionNetwork.setNullSelectionAllowed(false); this.inspectionNetwork.setImmediate(true); this.inspectionNetwork.setRequired(true); this.inspectionNetwork.setRequiredError("Inspection Network cannot be empty"); networkComboBox.add(this.inspectionNetwork); return networkComboBox; }
private void populateNetworks(ComboBox networkComboBox, List<OsNetworkDto> networkList) { try { networkComboBox.removeAllItems(); if (networkList != null) { // Calling List Network Service BeanItemContainer<OsNetworkDto> networkListContainer = new BeanItemContainer<>(OsNetworkDto.class, networkList); networkComboBox.setContainerDataSource(networkListContainer); networkComboBox.setItemCaptionPropertyId("name"); if (networkList.size() > 0) { networkComboBox.select(networkListContainer.getIdByIndex(0)); } } } catch (Exception e) { ViewUtil.iscNotification(e.getMessage(), Notification.Type.ERROR_MESSAGE); log.error("Error getting Network List", e); } }
protected Component getPolicy() { try { this.policy = new ComboBox("Select Policy"); this.policy.setTextInputAllowed(false); this.policy.setNullSelectionAllowed(false); this.policy.setImmediate(true); this.policy.setRequired(true); this.policy.setRequiredError("Policy cannot be empty"); populatePolicy(); } catch (Exception e) { ViewUtil.iscNotification(e.getMessage(), Notification.Type.ERROR_MESSAGE); log.error("Error populating Policy List combobox", e); } return this.policy; }
private ComboBox getPolicyComboBox(List<PolicyDto> policyDtoList) { ComboBox policy = new ComboBox("Select Policy"); policy.setTextInputAllowed(false); policy.setNullSelectionAllowed(false); policy.setImmediate(true); policy.setRequired(true); policy.setRequiredError("Policy cannot be empty"); BeanItemContainer<PolicyDto> policyListContainer = new BeanItemContainer<>(PolicyDto.class, policyDtoList); policy.setContainerDataSource(policyListContainer); policy.setItemCaptionPropertyId("policyName"); if (policyListContainer.size() > 0) { policy.select(policyListContainer.getIdByIndex(0)); } policy.setEnabled(false); return policy; }
@SuppressWarnings({ "rawtypes" }) private void serviceTableClicked(long itemId) { ComboBox policyComboBox = (ComboBox) this.serviceTable.getContainerProperty(itemId, PROPERTY_ID_POLICY) .getValue(); ComboBox failurePolicyComboBox = (ComboBox) this.serviceTable .getContainerProperty(itemId, PROPERTY_ID_FAILURE_POLICY).getValue(); Property itemProperty = this.serviceTable.getContainerProperty(itemId, PROPERTY_ID_ENABLED); boolean currentValue = (boolean) itemProperty.getValue(); if (policyComboBox.getContainerDataSource().size() > 0) { if (isBindedWithMultiplePolicies(itemId)) { policyComboBox.setEnabled(false); } else { policyComboBox.setEnabled(currentValue); } } if (failurePolicyComboBox.getData() != null) { failurePolicyComboBox.setEnabled(currentValue); } }
protected ComboBox getProject() { try { this.project = new ComboBox("Select Project"); this.project.setTextInputAllowed(true); this.project.setNullSelectionAllowed(false); this.project.setImmediate(true); this.project.setRequired(true); this.project.setRequiredError("Project cannot be empty"); } catch (Exception e) { ViewUtil.iscNotification(e.getMessage(), Notification.Type.ERROR_MESSAGE); log.error("Error populating Project List combobox", e); } return this.project; }
private ComboBox createDomainComboBox(List<DomainDto> dl) { ComboBox domainComboBox = new ComboBox(); BeanItemContainer<DomainDto> domainContainer = new BeanItemContainer<DomainDto>(DomainDto.class, dl); ApplianceManagerConnectorDto mc = (ApplianceManagerConnectorDto) this.managerConnector.getValue(); domainComboBox.setContainerDataSource(domainContainer); domainComboBox.setTextInputAllowed(false); domainComboBox.setNullSelectionAllowed(false); domainComboBox.setItemCaptionPropertyId("name"); domainComboBox.setEnabled(mc.isPolicyMappingSupported()); if (domainComboBox.getItemIds().size() > 0) { domainComboBox.select(domainContainer.getIdByIndex(0)); } return domainComboBox; }
private ComboBox createEncapsulationTypeComboBox(VirtualizationType virtualizationType, List<TagEncapsulationType> types) { ComboBox encapsulationType = new ComboBox(); encapsulationType.setTextInputAllowed(false); encapsulationType.setNullSelectionAllowed(true); BeanItemContainer<TagEncapsulationType> encapsulationTypeContainer = new BeanItemContainer<TagEncapsulationType>( TagEncapsulationType.class, types); encapsulationType.setContainerDataSource(encapsulationTypeContainer); ApplianceManagerConnectorDto currentMc = (ApplianceManagerConnectorDto) this.managerConnector.getValue(); if (!virtualizationType.isOpenstack() || (currentMc != null && !currentMc.isPolicyMappingSupported())) { encapsulationType.setEnabled(false); } return encapsulationType; }
/** * @return AD ComboBox */ protected ComboBox getApplianceDefinition() { try { this.applianceDefinition = new ComboBox("Service Function Definition"); this.applianceDefinition.setTextInputAllowed(false); this.applianceDefinition.setNullSelectionAllowed(false); this.applianceDefinition.setRequired(true); this.applianceDefinition.setRequiredError("Service Function Definition cannot be Empty"); this.applianceDefinition.setWidth(100, Unit.PERCENTAGE); updateAppliances(); } catch (Exception e) { log.error("Error populating appliance list combobox", e); } return this.applianceDefinition; }
private ComboBox createThemeChooserBox() { List<String> themes = Arrays.asList("Blueprint", "Dark", "Default", "Facebook", "Flat", "Flat-Dark", "Light", "Metro"); ComboBox comboBox = new ComboBox("Choose theme", themes); comboBox.setWidth(100, Unit.PERCENTAGE); comboBox.setValue("Default"); comboBox.addValueChangeListener(e -> { Object value = e.getValue(); String theme = value != null ? String.valueOf(value) : ""; if (!"".equals(theme.trim())) { getUI().setTheme(theme.toLowerCase()); } }); return comboBox; }
public ConditionPanel(ConditionDTO conditionDTO, ConditionWidgetRepository conditionWidgetRepository, Consumer<ConditionDTO> changeListener) { this.conditionWidgetRepository = conditionWidgetRepository; this.conditionDTO = conditionDTO; this.mainPanel = new Panel("Condition"); this.mainTypeComboBox = new ComboBox("Type"); this.currentConditionWidget = conditionWidgetRepository .getFactory(TypeViewDTO.ConditionTypes.ofConditionDto(conditionDTO)) .createWidget(conditionDTO); currentConditionWidget.setChangeListener(changeListener); this.changeListener = changeListener; setupPanel(); setCompositionRoot(mainPanel); setSizeUndefined(); }
public ActionPanel(ActionDTO actionDTO, ActionWidgetRepository actionWidgetRepository, Consumer<ActionDTO> changeListener) { this.actionWidgetRepository = actionWidgetRepository; this.actionDTO = actionDTO; this.mainPanel = new Panel("Action"); this.mainTypeComboBox = new ComboBox("Type"); this.currentActionWidget = actionWidgetRepository .getFactory(TypeViewDTO.ActionTypes.ofActionDto(actionDTO)) .createWidget(actionDTO); currentActionWidget.setChangeListener(changeListener); this.changeListener = changeListener; setupPanel(); setCompositionRoot(mainPanel); setSizeUndefined(); }
@Override protected Component createContent() { FormLayout layout = new FormLayout(); name = new FTextField("Nom"); shortDescription = new FTextField("Description courte").withFullWidth(); description = new FTextArea("Description").withFullWidth(); keyAbility = new ComboBox<Ability>("Attribut clé", Services.getAbilityService().findAll()); layout.addComponent(name); layout.addComponent(shortDescription); layout.addComponent(description); layout.addComponent(keyAbility); layout.addComponent(getToolbar()); return layout; }
@Override protected Component createContent() { FormLayout layout = new FormLayout(); name = new FTextField("Nom"); region = new ComboBox<Region>("Région", regionService.findAll()); shortDescription = new FTextField("Description courte"); description = new FTextArea("Description").withFullWidth(); layout.addComponent(name); layout.addComponent(region); layout.addComponent(shortDescription); layout.addComponent(description); layout.addComponent(getToolbar()); return layout; }
@Override protected Component createContent() { FormLayout layout = new FormLayout(); name = new FTextField("Nom").withWidth(50, Unit.PERCENTAGE); description = new FTextArea("Description").withFullWidth().withRows(10); usage = new EnumComboBox<FeatUsage>(FeatUsage.class, "Usage"); prerequisiteType = new EnumComboBox<PrerequisiteType>(PrerequisiteType.class, "Type de prérequis"); prerequisiteArmorProficiency = new EnumComboBox<>(ArmorType.ProficiencyType.class, "Maitrise d'armure prérequise"); prerequisiteAbility = new ComboBox<Ability>("Caractéristique prérequise", abilityService.findAll()); prerequisiteAbilityScore = new DSIntegerField("Score de caractéristique"); prerequisiteType.addSelectionListener(event -> adjustTypeVisibility(event.getValue())); layout.addComponent(name); layout.addComponent(description); layout.addComponent(usage); layout.addComponents(prerequisiteType, prerequisiteArmorProficiency, prerequisiteAbility, prerequisiteAbilityScore); layout.addComponent(getToolbar()); return layout; }
@Override protected Component createContent() { layout = new FormLayout(); name = new FTextField("Titre").withWidth("50%"); description = new FTextArea("Description").withFullWidth(); challengeRating = new ComboBox<>("Degré de difficulté"); challengeRating.setItems(Services.getLevelService().findAll()); status = new EnumComboBox<>(AdventureStatus.class, "Statut"); layout.addComponents(name, description, challengeRating, status); layout.addComponent(getToolbar()); messageButton = new Button("Messages", event -> { EventBus.post(new NavigationEvent(AdventureView.URI + "/" + getEntity().getId())); }); layout.addComponent(messageButton); return layout; }
public WebSearchPickerField() { final ComboBox selectComponent = component; WebPickerField.Picker picker = new WebPickerField.Picker(this, component) { @Override public void setRequired(boolean required) { super.setRequired(required); selectComponent.setNullSelectionAllowed(!required); } }; pickerField = new WebPickerField(picker); Messages messages = AppBeans.get(Messages.class); setInputPrompt(messages.getMainMessage("searchPickerField.inputPrompt")); // Required for custom components in fieldgroup initValueSync(selectComponent, picker); }
@SuppressWarnings("unchecked") @Override public Field getPropertyField(FormProperty formProperty) { ComboBox comboBox = new ComboBox(getPropertyLabel(formProperty)); comboBox.setRequired(formProperty.isRequired()); comboBox.setRequiredError(getMessage(Messages.FORM_FIELD_REQUIRED, getPropertyLabel(formProperty))); comboBox.setEnabled(formProperty.isWritable()); Map<String, String> values = (Map<String, String>) formProperty.getType().getInformation("values"); if (values != null) { for (Entry<String, String> enumEntry : values.entrySet()) { // Add value and label (if any) comboBox.addItem(enumEntry.getKey()); if (enumEntry.getValue() != null) { comboBox.setItemCaption(enumEntry.getKey(), enumEntry.getValue()); } } } return comboBox; }
protected void selectUser(String userId, String userName) { if (!selectedUsersTable.containsId(userId)) { Item item = selectedUsersTable.addItem(userId); item.getItemProperty("userName").setValue(userName); if (showRoles) { ComboBox comboBox = new ComboBox(null, Arrays.asList( i18nManager.getMessage(Messages.TASK_ROLE_CONTRIBUTOR), i18nManager.getMessage(Messages.TASK_ROLE_IMPLEMENTER), i18nManager.getMessage(Messages.TASK_ROLE_MANAGER), i18nManager.getMessage(Messages.TASK_ROLE_SPONSOR))); comboBox.select(i18nManager.getMessage(Messages.TASK_ROLE_CONTRIBUTOR)); comboBox.setNewItemsAllowed(true); item.getItemProperty("role").setValue(comboBox); } } }
protected ComboBox getLogLevelComponent() { final ComboBox combo = new ComboBox("Log Level"); combo.setNullSelectionAllowed(false); combo.setWidth(200, Unit.PIXELS); LogLevel[] levels = LogLevel.values(); for (LogLevel logLevel : levels) { combo.addItem(logLevel.name()); } combo.setValue(agentDeployment.getLogLevel()); combo.addValueChangeListener(new ValueChangeListener() { public void valueChange(ValueChangeEvent event) { agentDeployment.setLogLevel((String) combo.getValue()); saveAgentDeployment(agentDeployment); } }); return combo; }
protected ComboBox createResourceCB() { ComboBox cb = new ComboBox("HTTP Resource"); String projectVersionId = component.getProjectVersionId(); IConfigurationService configurationService = context.getConfigurationService(); Set<XMLResourceDefinition> types = context.getDefinitionFactory() .getResourceDefinitions(projectVersionId, ResourceCategory.HTTP); String[] typeStrings = new String[types.size()]; int i = 0; for (XMLResourceDefinition type : types) { typeStrings[i++] = type.getId(); } List<Resource> resources = new ArrayList<>(configurationService.findResourcesByTypes(projectVersionId, true, typeStrings)); if (resources != null) { for (Resource resource : resources) { cb.addItem(resource); } } cb.setWidth(50.0f, Unit.PERCENTAGE); return cb; }
protected void buildXpathChoices() { SAXBuilder builder = new SAXBuilder(); builder.setXMLReaderFactory(XMLReaders.NONVALIDATING); builder.setFeature("http://xml.org/sax/features/validation", false); Setting setting = component.findSetting(XmlFormatter.XML_FORMATTER_TEMPLATE); xpathChoices = new TreeSet<String>(); if (StringUtils.isNotBlank(setting.getValue())) { try { Document document = builder.build(new StringReader(setting.getValue())); buildXpathChoicesFromElement("/" + document.getRootElement().getName(), document.getRootElement()); } catch (Exception e) { throw new RuntimeException(e); } } ComboBox combo = (ComboBox) grid.getColumn("xpath").getEditorField(); combo.removeAllItems(); combo.addItems(xpathChoices); }
private void setFieldDefaults(ComboBox backingField) { backingField.setImmediate(true); backingField.removeAllItems(); for (Object p : backingField.getContainerPropertyIds()) { backingField.removeContainerProperty(p); } // setup displaying property ids backingField.addContainerProperty(CAPTION_PROPERTY_ID, String.class, ""); backingField.setItemCaptionPropertyId(CAPTION_PROPERTY_ID); @SuppressWarnings("unchecked") EnumSet<?> enumSet = EnumSet.allOf((Class<java.lang.Enum>) getTargetPropertyType()); for (Object r : enumSet) { Item newItem = backingField.addItem(r); newItem.getItemProperty(CAPTION_PROPERTY_ID).setValue(r.toString()); } }
@Override public void attach() { setHeight(TAB_HEIGHT); setMargin(false, true, false, true); setSpacing(false); // サーバサイズ sizeSelect = new ComboBox(ViewProperties.getCaption("field.serverSize")); sizeSelect.setNullSelectionAllowed(false); form.getLayout().addComponent(sizeSelect); // キーペア keySelect = new ComboBox(ViewProperties.getCaption("field.keyPair")); keySelect.setNullSelectionAllowed(false); form.getLayout().addComponent(keySelect); addComponent(form); }
@Override public void attach() { // サーバ名(Prefix) prefixField = new TextField(ViewProperties.getCaption("field.serverNamePrefix")); getLayout().addComponent(prefixField); // プラットフォーム cloudTable = new SelectCloudTable(); getLayout().addComponent(cloudTable); // サーバ台数 serverNumber = new ComboBox(ViewProperties.getCaption("field.serverNumber")); serverNumber.setWidth("110px"); serverNumber.setMultiSelect(false); for (int i = 1; i <= MAX_ADD_SERVER; i++) { serverNumber.addItem(i); } serverNumber.setNullSelectionAllowed(false); serverNumber.setValue(1); // 初期値は1 getLayout().addComponent(serverNumber); initValidation(); }
/** * Setup UI. */ private void initComponents() { List<User> users = UserList.INSTANCE.getUsers(); userSwitchBox = new ComboBox(Messages.getString("UserSwitchPanel.boxCaption")); //$NON-NLS-1$ setUsers(users); User current = (User) VaadinSession.getCurrent().getAttribute(SessionStorageKey.USER.name()); userSwitchBox.setValue(current); userSwitchBox.setDescription( Messages.getString("UserSwitchPanel.boxDescription")); //$NON-NLS-1$ userSwitchBox.setNewItemsAllowed(false); userSwitchBox.setNullSelectionAllowed(false); addComponent(userSwitchBox); btReload = new Button(Messages.getString("UserSwitchPanel.reloadCaption")); //$NON-NLS-1$ btReload.setStyleName(BaseTheme.BUTTON_LINK); btReload.addStyleName("plain-link"); //$NON-NLS-1$ addComponent(btReload); }
public TimeZoneSelectionField(boolean isVerticalDisplay) { this.isVerticalDisplay = isVerticalDisplay; areaSelection = new ValueComboBox(false, TimezoneVal.getAreas()); areaSelection.addValueChangeListener(new Property.ValueChangeListener() { @Override public void valueChange(com.vaadin.data.Property.ValueChangeEvent event) { setCboTimeZone((String) areaSelection.getValue()); } }); timezoneSelection = new ComboBox(); timezoneSelection.setItemCaptionMode(AbstractSelect.ItemCaptionMode.EXPLICIT_DEFAULTS_ID); String area = (String) areaSelection.getItemIds().iterator().next(); areaSelection.setValue(area); setCboTimeZone(area); }
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"); }
@Override protected ComponentContainer createEditFields() { final ExtaFormLayout form = new ExtaFormLayout(); appTitleField = new EditField("Заголовок приложения"); form.addComponent(appTitleField); iconPathField = new ComboBox("Иконка приложения"); for (final String icon : lookup(UserSettingsService.class).getFaviconPathList()) { iconPathField.addItem(icon); iconPathField.setItemIcon(icon, new ThemeResource(getLast(Splitter.on('/').split(icon)))); } iconPathField.setItemCaptionMode(AbstractSelect.ItemCaptionMode.ICON_ONLY); iconPathField.setWidth(85, Unit.PIXELS); iconPathField.setTextInputAllowed(false); iconPathField.setNullSelectionAllowed(false); form.addComponent(iconPathField); isShowSalePointIdsField = new MCheckBox("Показывать раздел \"Идентификация\" в карточке торговой точки"); form.addComponent(isShowSalePointIdsField); isDevServerField = new MCheckBox("Режим отладки"); form.addComponent(isDevServerField); return form; }
private ComboBox createLanguageSelector() { ComboBox languageSelector = new ComboBox("com.vaadin.demo.dashboard.DashboardUI.Language"); languageSelector.setImmediate(true); languageSelector.setNullSelectionAllowed(false); addLocale(Locale.ENGLISH, languageSelector); addLocale(Locale.FRENCH, languageSelector); addLocale(new Locale("es"), languageSelector); // languageSelector.setValue(I18NStaticService.getI18NServive().getLocale()); /*-languageSelector.addValueChangeListener(new ValueChangeListener() { private static final long serialVersionUID = 1L; @Override public void valueChange(ValueChangeEvent event) { Locale locale = (Locale) (event.getProperty().getValue()); I18NStaticService.getI18NServive().setLocale(locale); getUI().requestRepaintAll(); } });*/ return languageSelector; }
private VerticalLayout buildMainLayout() { // common part: create layout mainLayout = new VerticalLayout(); mainLayout.setImmediate(false); mainLayout.setWidth("100%"); mainLayout.setHeight("100%"); mainLayout.setMargin(false); // top-level component properties setWidth("100.0%"); setHeight("100.0%"); // comboBox_1 defaultLocaleField = new ComboBox(); defaultLocaleField.setImmediate(false); defaultLocaleField.setWidth("100.0%"); defaultLocaleField.setHeight("-1px"); mainLayout.addComponent(defaultLocaleField); return mainLayout; }
private void buildSelection() { exportSelectionType = new ComboBox(); exportSelectionType.setTextInputAllowed(false); exportSelectionType.setNullSelectionAllowed(false); exportSelectionType.setEnabled(false); exportSelectionType.addItem(Messages.getString("Caption.Item.Selected")); exportSelectionType.addItem(Messages.getString("Caption.Item.All")); exportSelectionType.select(Messages.getString("Caption.Item.Selected")); exportSelectionType.addValueChangeListener(new Property.ValueChangeListener() { public void valueChange(ValueChangeEvent event) { allTestsSelected = exportSelectionType.getValue().equals(Messages.getString("Caption.Item.All")); mainEvent.fire(new MainUIEvent.PackSelectionChangedEvent()); } }); }