本文整理汇总了Java中com.vaadin.ui.OptionGroup.addValueChangeListener方法的典型用法代码示例。如果您正苦于以下问题:Java OptionGroup.addValueChangeListener方法的具体用法?Java OptionGroup.addValueChangeListener怎么用?Java OptionGroup.addValueChangeListener使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.vaadin.ui.OptionGroup
的用法示例。
在下文中一共展示了OptionGroup.addValueChangeListener方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createErrorThresholdOptionGroup
import com.vaadin.ui.OptionGroup; //导入方法依赖的package包/类
private OptionGroup createErrorThresholdOptionGroup() {
final OptionGroup errorThresoldOptions = new OptionGroup();
for (final ERRORTHRESOLDOPTIONS option : ERRORTHRESOLDOPTIONS.values()) {
errorThresoldOptions.addItem(option.getValue());
}
errorThresoldOptions.setId(UIComponentIdProvider.ROLLOUT_ERROR_THRESOLD_OPTION_ID);
errorThresoldOptions.addStyleName(ValoTheme.OPTIONGROUP_HORIZONTAL);
errorThresoldOptions.addStyleName(SPUIStyleDefinitions.ROLLOUT_OPTION_GROUP);
errorThresoldOptions.setSizeUndefined();
errorThresoldOptions.addValueChangeListener(this::listenerOnErrorThresoldOptionChange);
return errorThresoldOptions;
}
示例2: 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;
}
示例3: DeployDialog
import com.vaadin.ui.OptionGroup; //导入方法依赖的package包/类
public DeployDialog(ApplicationContext context, EditAgentPanel parentPanel) {
super("Deploy");
this.context = context;
this.configurationService = context.getConfigurationService();
this.operationsService = context.getOperationsSerivce();
this.parentPanel = parentPanel;
this.context = context;
final float DESIRED_WIDTH = 1000;
float width = DESIRED_WIDTH;
float maxWidth = (float) (Page.getCurrent().getBrowserWindowWidth() * .8);
if (maxWidth < DESIRED_WIDTH) {
width = maxWidth;
}
setWidth(width, Unit.PIXELS);
setHeight(600.0f, Unit.PIXELS);
VerticalLayout layout = new VerticalLayout();
layout.setMargin(true);
layout.setSizeFull();
addComponent(layout, 1);
deployByOptionGroup = new OptionGroup("Deployment Type:");
deployByOptionGroup.addStyleName(ValoTheme.OPTIONGROUP_HORIZONTAL);
deployByOptionGroup.addItem(DEPLOY_BY_PACKAGE);
deployByOptionGroup.addItem(DEPLOY_BY_FLOW);
layout.addComponent(deployByOptionGroup);
selectDeploymentLayout = new VerticalLayout();
selectDeploymentLayout.setSizeFull();
selectDeploymentLayout.setMargin(new MarginInfo(true, false));
layout.addComponent(selectDeploymentLayout);
layout.setExpandRatio(selectDeploymentLayout, 1);
backButton = new Button("Cancel", e -> back());
actionButton = new Button("Deploy", e -> takeAction());
actionButton.addStyleName(ValoTheme.BUTTON_PRIMARY);
actionButton.setClickShortcut(KeyCode.ENTER);
addComponent(buildButtonFooter(backButton, actionButton));
deployByOptionGroup.addValueChangeListener(e -> deployByChanged());
deployByOptionGroup.setValue(DEPLOY_BY_PACKAGE);
}
示例4: 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()));
}