本文整理汇总了Java中com.vaadin.ui.ComboBox.setInvalidAllowed方法的典型用法代码示例。如果您正苦于以下问题:Java ComboBox.setInvalidAllowed方法的具体用法?Java ComboBox.setInvalidAllowed怎么用?Java ComboBox.setInvalidAllowed使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.vaadin.ui.ComboBox
的用法示例。
在下文中一共展示了ComboBox.setInvalidAllowed方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: buildMainLayout
import com.vaadin.ui.ComboBox; //导入方法依赖的package包/类
@AutoGenerated
private VerticalLayout buildMainLayout() {
// common part: create layout
mainLayout = new VerticalLayout();
mainLayout.setImmediate(false);
mainLayout.setWidth("-1px");
mainLayout.setHeight("-1px");
mainLayout.setMargin(false);
mainLayout.setSpacing(true);
// top-level component properties
setWidth("-1px");
setHeight("-1px");
// comboBoxCategories
comboBoxCategories = new ComboBox();
comboBoxCategories.setCaption("Select A Category");
comboBoxCategories.setImmediate(false);
comboBoxCategories.setWidth("-1px");
comboBoxCategories.setHeight("-1px");
comboBoxCategories.setInvalidAllowed(false);
comboBoxCategories.setRequired(true);
mainLayout.addComponent(comboBoxCategories);
mainLayout.setExpandRatio(comboBoxCategories, 1.0f);
// horizontalLayout_2
horizontalLayout_2 = buildHorizontalLayout_2();
mainLayout.addComponent(horizontalLayout_2);
mainLayout.setExpandRatio(horizontalLayout_2, 1.0f);
return mainLayout;
}
示例2: initGroupProperties
import com.vaadin.ui.ComboBox; //导入方法依赖的package包/类
protected void initGroupProperties() {
detailsGrid = new GridLayout(2, 3);
detailsGrid.setSpacing(true);
detailLayout.setMargin(true, true, true, false);
detailLayout.addComponent(detailsGrid);
// id
Label idLabel = new Label(i18nManager.getMessage(Messages.GROUP_ID) + ": ");
idLabel.addStyleName(ExplorerLayout.STYLE_LABEL_BOLD);
detailsGrid.addComponent(idLabel);
Label idValueLabel = new Label(group.getId());
detailsGrid.addComponent(idValueLabel);
// name
Label nameLabel = new Label(i18nManager.getMessage(Messages.GROUP_NAME) + ": ");
nameLabel.addStyleName(ExplorerLayout.STYLE_LABEL_BOLD);
detailsGrid.addComponent(nameLabel);
if (!editingDetails) {
Label nameValueLabel = new Label(group.getName());
detailsGrid.addComponent(nameValueLabel);
} else {
nameTextField = new TextField(null, group.getName());
detailsGrid.addComponent(nameTextField);
}
// Type
Label typeLabel = new Label(i18nManager.getMessage(Messages.GROUP_TYPE) + ": ");
typeLabel.addStyleName(ExplorerLayout.STYLE_LABEL_BOLD);
detailsGrid.addComponent(typeLabel);
if (!editingDetails) {
Label typeValueLabel = new Label(group.getType());
detailsGrid.addComponent(typeValueLabel);
} else {
typeCombobox = new ComboBox(null, Arrays.asList("assignment", "security-role"));
typeCombobox.setNullSelectionAllowed(false);
typeCombobox.setInvalidAllowed(false);
typeCombobox.select(group.getType());
detailsGrid.addComponent(typeCombobox);
}
}
示例3: buildGrid
import com.vaadin.ui.ComboBox; //导入方法依赖的package包/类
protected void buildGrid() {
grid = new Grid();
grid.setSelectionMode(SelectionMode.NONE);
grid.setSizeFull();
grid.setEditorEnabled(!readOnly);
container = new BeanItemContainer<Record>(Record.class);
grid.setContainerDataSource(container);
grid.setColumns("entityName", "attributeName", "xpath");
HeaderRow filterRow = grid.appendHeaderRow();
addColumn("entityName", filterRow);
addColumn("attributeName", filterRow);
ComboBox combo = new ComboBox();
combo.addValueChangeListener(e->saveXPathSettings());
combo.setWidth(100, Unit.PERCENTAGE);
combo.setImmediate(true);
combo.setNewItemsAllowed(true);
combo.setInvalidAllowed(true);
combo.setTextInputAllowed(true);
combo.setScrollToSelectedItem(true);
combo.setFilteringMode(FilteringMode.CONTAINS);
grid.getColumn("xpath").setEditorField(combo).setExpandRatio(1);
addShowPopulatedFilter("xpath", filterRow);
grid.setEditorBuffered(false);
addComponent(grid);
setExpandRatio(grid, 1);
}
示例4: buildMainLayout
import com.vaadin.ui.ComboBox; //导入方法依赖的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");
// comboBoxDatatype
comboBoxDatatype = new ComboBox();
comboBoxDatatype.setCaption("Select Datatype");
comboBoxDatatype.setImmediate(false);
comboBoxDatatype.setWidth("-1px");
comboBoxDatatype.setHeight("-1px");
comboBoxDatatype.setInvalidAllowed(false);
comboBoxDatatype.setRequired(true);
mainLayout.addComponent(comboBoxDatatype);
// textFieldValue
textFieldValue = new TextField();
textFieldValue.setCaption("Attribute Value");
textFieldValue.setImmediate(false);
textFieldValue.setWidth("100.0%");
textFieldValue.setHeight("-1px");
textFieldValue.setInvalidAllowed(false);
textFieldValue.setRequired(true);
mainLayout.addComponent(textFieldValue);
// 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;
}