本文整理汇总了Java中com.vaadin.ui.ListSelect.setCaption方法的典型用法代码示例。如果您正苦于以下问题:Java ListSelect.setCaption方法的具体用法?Java ListSelect.setCaption怎么用?Java ListSelect.setCaption使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.vaadin.ui.ListSelect
的用法示例。
在下文中一共展示了ListSelect.setCaption方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: buildAndBindList
import com.vaadin.ui.ListSelect; //导入方法依赖的package包/类
protected Component buildAndBindList(String key, String caption) {
ListSelect field = new ListSelect();
field.setCaption(caption);
field.setNullSelectionAllowed(false);
field.addValueChangeListener((ValueChangeEvent event) -> {
String path = (String) event.getProperty().getValue();
if (path != null) {
// open app (subapp)
Location location = new RerootBrowserLocation("neatconfiguration", "helperBrowser", path, false);
adminEventBus.fireEvent(new LocationChangedEvent(location));
}
});
dataBindings.put(key, field);
return field;
}
示例2: OrderingListSelect
import com.vaadin.ui.ListSelect; //导入方法依赖的package包/类
public OrderingListSelect(String caption)
{
final GridLayout layout = new GridLayout(2, 1);
listSelect = new ListSelect();
final VerticalLayout buttonLayout = new VerticalLayout();
buttonLayout.setSpacing(true);
layout.addComponent(listSelect, 0, 0);
layout.addComponent(buttonLayout, 1, 0);
layout.setComponentAlignment(buttonLayout, Alignment.MIDDLE_CENTER);
upButton = new Button("▲");
downButton = new Button("▼");
buttonLayout.addComponent(upButton);
buttonLayout.addComponent(downButton);
setButtonClickListeners();
listSelect.setCaption(caption);
setCompositionRoot(layout);
}
示例3: 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;
}
示例4: 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;
}
示例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");
// 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;
}