本文整理汇总了Java中com.vaadin.ui.OptionGroup.setImmediate方法的典型用法代码示例。如果您正苦于以下问题:Java OptionGroup.setImmediate方法的具体用法?Java OptionGroup.setImmediate怎么用?Java OptionGroup.setImmediate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.vaadin.ui.OptionGroup
的用法示例。
在下文中一共展示了OptionGroup.setImmediate方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: buildHorizontalLayout_1
import com.vaadin.ui.OptionGroup; //导入方法依赖的package包/类
@AutoGenerated
private HorizontalLayout buildHorizontalLayout_1() {
// common part: create layout
horizontalLayout_1 = new HorizontalLayout();
horizontalLayout_1.setImmediate(false);
horizontalLayout_1.setWidth("-1px");
horizontalLayout_1.setHeight("-1px");
horizontalLayout_1.setMargin(false);
// optionGroupAttribute
optionGroupAttribute = new OptionGroup();
optionGroupAttribute.setCaption("Attribute Source");
optionGroupAttribute.setImmediate(false);
optionGroupAttribute.setWidth("-1px");
optionGroupAttribute.setHeight("-1px");
optionGroupAttribute.setInvalidAllowed(false);
horizontalLayout_1.addComponent(optionGroupAttribute);
// verticalLayout_2
verticalLayout_2 = buildVerticalLayout_2();
horizontalLayout_1.addComponent(verticalLayout_2);
return horizontalLayout_1;
}
示例2: buildMainLayout
import com.vaadin.ui.OptionGroup; //导入方法依赖的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");
// optionGroupExpression
optionGroupExpression = new OptionGroup();
optionGroupExpression
.setCaption("Select One Of The Following Types of Expressions");
optionGroupExpression.setImmediate(false);
optionGroupExpression.setWidth("-1px");
optionGroupExpression.setHeight("-1px");
mainLayout.addComponent(optionGroupExpression);
// buttonSave
buttonSave = new Button();
buttonSave.setCaption("Select");
buttonSave.setImmediate(false);
buttonSave.setWidth("-1px");
buttonSave.setHeight("-1px");
mainLayout.addComponent(buttonSave);
mainLayout.setComponentAlignment(buttonSave, new Alignment(24));
return mainLayout;
}
示例3: buildOptionGroup
import com.vaadin.ui.OptionGroup; //导入方法依赖的package包/类
protected OptionGroup buildOptionGroup(String caption, String name, List<Component> components) {
OptionGroup optionGroup = new OptionGroup(caption);
optionGroup.addStyleName(ValoTheme.OPTIONGROUP_HORIZONTAL);
optionGroup.setImmediate(true);
optionGroup.addItem("ON");
optionGroup.addItem("OFF");
optionGroup.addValueChangeListener((event) -> saveSetting(name, optionGroup, components));
return optionGroup;
}
示例4: buildMainLayout
import com.vaadin.ui.OptionGroup; //导入方法依赖的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");
// textFieldObligationID
textFieldObligationID = new TextField();
textFieldObligationID.setCaption("Obligation ID");
textFieldObligationID.setImmediate(false);
textFieldObligationID.setWidth("-1px");
textFieldObligationID.setHeight("-1px");
textFieldObligationID.setInvalidAllowed(false);
textFieldObligationID.setRequired(true);
textFieldObligationID.setInputPrompt("Eg. urn:com:foo:obligation:sample");
mainLayout.addComponent(textFieldObligationID);
// optionGroupFullfillOn
optionGroupFullfillOn = new OptionGroup();
optionGroupFullfillOn.setCaption("Fulfill On");
optionGroupFullfillOn.setImmediate(false);
optionGroupFullfillOn.setWidth("-1px");
optionGroupFullfillOn.setHeight("-1px");
optionGroupFullfillOn.setInvalidAllowed(false);
optionGroupFullfillOn.setRequired(true);
mainLayout.addComponent(optionGroupFullfillOn);
// 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.OptionGroup; //导入方法依赖的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");
// textFieldAdviceID
textFieldAdviceID = new TextField();
textFieldAdviceID.setCaption("Advice ID");
textFieldAdviceID.setImmediate(false);
textFieldAdviceID.setWidth("-1px");
textFieldAdviceID.setHeight("-1px");
textFieldAdviceID.setInvalidAllowed(false);
textFieldAdviceID.setRequired(true);
textFieldAdviceID.setInputPrompt("Eg. urn:com:foo:advice:sample");
mainLayout.addComponent(textFieldAdviceID);
// optionGroupEffect
optionGroupEffect = new OptionGroup();
optionGroupEffect.setCaption("Applies To");
optionGroupEffect.setImmediate(false);
optionGroupEffect.setWidth("-1px");
optionGroupEffect.setHeight("-1px");
optionGroupEffect.setInvalidAllowed(false);
optionGroupEffect.setRequired(true);
mainLayout.addComponent(optionGroupEffect);
// 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;
}
示例6: buildMainLayout
import com.vaadin.ui.OptionGroup; //导入方法依赖的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");
// labelRuleID
labelRuleID = new Label();
labelRuleID.setCaption("Rule ID");
labelRuleID.setImmediate(false);
labelRuleID.setWidth("100.0%");
labelRuleID.setHeight("-1px");
labelRuleID.setValue("Label");
mainLayout.addComponent(labelRuleID);
mainLayout.setExpandRatio(labelRuleID, 1.0f);
// optionGroupEffect
optionGroupEffect = new OptionGroup();
optionGroupEffect.setCaption("Choose the effect.");
optionGroupEffect.setImmediate(false);
optionGroupEffect.setWidth("-1px");
optionGroupEffect.setHeight("-1px");
optionGroupEffect.setInvalidAllowed(false);
optionGroupEffect.setRequired(true);
mainLayout.addComponent(optionGroupEffect);
// textAreaDescription
textAreaDescription = new TextArea();
textAreaDescription.setCaption("Enter a description for the Rule.");
textAreaDescription.setImmediate(false);
textAreaDescription.setWidth("100.0%");
textAreaDescription.setHeight("-1px");
textAreaDescription.setNullSettingAllowed(true);
textAreaDescription.setNullRepresentation("");
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;
}
示例7: buildMainLayout
import com.vaadin.ui.OptionGroup; //导入方法依赖的package包/类
@AutoGenerated
private FormLayout buildMainLayout() {
// common part: create layout
mainLayout = new FormLayout();
mainLayout.setImmediate(false);
// textFieldPolicyName
textFieldPolicyName = new TextField();
textFieldPolicyName.setCaption("Policy File Name");
textFieldPolicyName.setImmediate(true);
textFieldPolicyName.setWidth("-1px");
textFieldPolicyName.setHeight("-1px");
textFieldPolicyName.setInputPrompt("Enter filename eg. foobar.xml");
textFieldPolicyName.setRequired(true);
mainLayout.addComponent(textFieldPolicyName);
// textAreaDescription
textAreaDescription = new TextArea();
textAreaDescription.setCaption("Description");
textAreaDescription.setImmediate(false);
textAreaDescription.setWidth("100%");
textAreaDescription.setHeight("-1px");
textAreaDescription
.setInputPrompt("Enter a description for the Policy/PolicySet.");
textAreaDescription.setNullSettingAllowed(true);
mainLayout.addComponent(textAreaDescription);
// optionPolicySet
optionPolicySet = new OptionGroup();
optionPolicySet.setCaption("Policy or PolicySet?");
optionPolicySet.setImmediate(true);
optionPolicySet
.setDescription("Is the root level a Policy or Policy Set.");
optionPolicySet.setWidth("-1px");
optionPolicySet.setHeight("-1px");
optionPolicySet.setRequired(true);
mainLayout.addComponent(optionPolicySet);
// comboAlgorithms
comboAlgorithms = new ComboBox();
comboAlgorithms.setCaption("Combining Algorithm");
comboAlgorithms.setImmediate(false);
comboAlgorithms.setDescription("Select the combining algorithm.");
comboAlgorithms.setWidth("-1px");
comboAlgorithms.setHeight("-1px");
comboAlgorithms.setRequired(true);
mainLayout.addComponent(comboAlgorithms);
// 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;
}
示例8: setOptionGroupProperties
import com.vaadin.ui.OptionGroup; //导入方法依赖的package包/类
protected void setOptionGroupProperties(OptionGroup optionGroup) {
optionGroup.setNullSelectionAllowed(false);
optionGroup.setHtmlContentAllowed(true);
optionGroup.setImmediate(true);
}
示例9: ImportXmlTemplateWindow
import com.vaadin.ui.OptionGroup; //导入方法依赖的package包/类
public ImportXmlTemplateWindow(ImportXmlListener listener, Component component, ApplicationContext context) {
this.listener = listener;
this.component = component;
this.context = context;
setCaption("Import XML Template");
setWidth(600.0f, Unit.PIXELS);
setHeight(500.0f, Unit.PIXELS);
VerticalLayout layout = new VerticalLayout();
layout.setSizeFull();
layout.setSpacing(true);
layout.setMargin(true);
layout.addStyleName(ValoTheme.WINDOW_BOTTOM_TOOLBAR);
layout.addComponent(new Label("Import XML from either an XSD or WSDL source."));
optionGroup = new OptionGroup("Select the location of the XSD or WSDL.");
optionGroup.addItem(OPTION_TEXT);
optionGroup.addItem(OPTION_FILE);
optionGroup.addItem(OPTION_URL);
optionGroup.addItem(OPTION_RESOURCE);
optionGroup.setNullSelectionAllowed(false);
optionGroup.setImmediate(true);
optionGroup.select(OPTION_TEXT);
optionGroup.addValueChangeListener(this);
layout.addComponent(optionGroup);
optionLayout = new VerticalLayout();
optionLayout.setSizeFull();
editor = new AceEditor();
editor.setCaption("Enter the XML text:");
editor.setMode(AceMode.xml);
editor.setSizeFull();
editor.setHighlightActiveLine(true);
editor.setShowPrintMargin(false);
Button importButton = new Button("Import");
importButton.addClickListener(this);
upload = new Upload(null, this);
upload.addSucceededListener(this);
upload.setButtonCaption(null);
urlTextField = new TextField("Enter the URL:");
urlTextField.setWidth(100.0f, Unit.PERCENTAGE);
resourceComboBox = createResourceCB();
layout.addComponent(optionLayout);
layout.setExpandRatio(optionLayout, 1.0f);
rebuildOptionLayout();
addComponent(layout, 1);
addComponent(buildButtonFooter(importButton, buildCloseButton()));
}
示例10: attach
import com.vaadin.ui.OptionGroup; //导入方法依赖的package包/类
@Override
public void attach() {
setHeight(TAB_HEIGHT);
setMargin(false, true, false, true);
setSpacing(false);
// IPアドレス設定
ipOptionGroup = new OptionGroup(ViewProperties.getCaption("field.optionIp"));
ipOptionGroup.setNullSelectionAllowed(false);
ipOptionGroup.setImmediate(true);
ipOptionGroup.addContainerProperty(IP_OPTION_CAPTION_ID, String.class, null);
ipOptionGroup.setItemCaptionPropertyId(IP_OPTION_CAPTION_ID);
ipOptionGroup.setItemCaptionMode(AbstractSelect.ITEM_CAPTION_MODE_PROPERTY);
Item ipOptionItem = ipOptionGroup.addItem(IP_OPTION_DHCP);
ipOptionItem.getItemProperty(IP_OPTION_CAPTION_ID).setValue(ViewProperties.getCaption("field.dhcpIp"));
Item ipOptionItem2 = ipOptionGroup.addItem(IP_OPTION_STATIC);
ipOptionItem2.getItemProperty(IP_OPTION_CAPTION_ID).setValue(ViewProperties.getCaption("field.staticIp"));
ipOptionGroup.addListener(new ValueChangeListener() {
@Override
public void valueChange(ValueChangeEvent event) {
String value = (String) event.getProperty().getValue();
if (IP_OPTION_DHCP.equals(value)) {
ipAddressField.setEnabled(false);
subnetMaskField.setEnabled(false);
defaultGatewayField.setEnabled(false);
} else {
ipAddressField.setEnabled(true);
subnetMaskField.setEnabled(true);
defaultGatewayField.setEnabled(true);
}
}
});
form.getLayout().addComponent(ipOptionGroup);
// IPアドレス
ipAddressField = new TextField(ViewProperties.getCaption("field.ipAddress"));
ipAddressField.setWidth("100%");
form.getLayout().addComponent(ipAddressField);
// サブネットマスク
subnetMaskField = new TextField(ViewProperties.getCaption("field.subnetMask"));
subnetMaskField.setWidth("100%");
form.getLayout().addComponent(subnetMaskField);
// デフォルトゲートウェイ
defaultGatewayField = new TextField(ViewProperties.getCaption("field.defaultGateway"));
defaultGatewayField.setWidth("100%");
form.getLayout().addComponent(defaultGatewayField);
addComponent(form);
}