• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java OptionGroup类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中com.vaadin.ui.OptionGroup的典型用法代码示例。如果您正苦于以下问题:Java OptionGroup类的具体用法?Java OptionGroup怎么用?Java OptionGroup使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



OptionGroup类属于com.vaadin.ui包,在下文中一共展示了OptionGroup类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: getUserOptions

import com.vaadin.ui.OptionGroup; //导入依赖的package包/类
@SuppressWarnings("serial")
protected OptionGroup getUserOptions() {
    this.userOption = new OptionGroup("Selection Criterion:");
    this.userOption.addItem(NONE);
    this.userOption.addItem(AVAILABILITY_ZONES);
    this.userOption.addItem(HOST_AGGREGATES);
    this.userOption.addItem(HOSTS);
    this.userOption.select(NONE);
    this.userOption.addValueChangeListener(new ValueChangeListener() {
        @Override
        public void valueChange(ValueChangeEvent event) {
            populateOptionTable();
        }
    });

    return this.userOption;
}
 
开发者ID:opensecuritycontroller,项目名称:osc-core,代码行数:18,代码来源:BaseDeploymentSpecWindow.java


示例2: createFrequencyOptionGroup

import com.vaadin.ui.OptionGroup; //导入依赖的package包/类
private OptionGroup createFrequencyOptionGroup() {

        this.freqOpt = new OptionGroup();
        this.freqOpt.addItem(this.ID_FREQ_OPT_WEEKLY);
        this.freqOpt.setItemCaption(this.ID_FREQ_OPT_WEEKLY, this.TEXT_FREQ_OPT_WEEKLY);
        this.freqOpt.addItem(this.ID_FREQ_OPT_MONTHLY);
        this.freqOpt.setItemCaption(this.ID_FREQ_OPT_MONTHLY, this.TEXT_FREQ_OPT_MONTHLY);
        this.freqOpt.addStyleName(this.ARCHIVE_STYLE);
        this.freqOpt.setImmediate(true);

        if (this.dto == null) {
            this.freqOpt.select(this.ID_FREQ_OPT_MONTHLY);
        } else {
            this.freqOpt.select(this.dto.getFrequency());
        }

        return this.freqOpt;
    }
 
开发者ID:opensecuritycontroller,项目名称:osc-core,代码行数:19,代码来源:JobsArchiverPanel.java


示例3: createThresholdOptionGroup

import com.vaadin.ui.OptionGroup; //导入依赖的package包/类
private OptionGroup createThresholdOptionGroup() {

        this.thresOpt = new OptionGroup();
        this.thresOpt.addItem(this.ID_THRES_OPT_MONTHS);
        this.thresOpt.setItemCaption(this.ID_THRES_OPT_MONTHS, this.TEXT_THRES_OPT_MONTHS);
        this.thresOpt.addItem(this.ID_THRES_OPT_YEARS);
        this.thresOpt.setItemCaption(this.ID_THRES_OPT_YEARS, this.TEXT_THRES_OPT_YEARS);

        this.thresOpt.addStyleName(this.ARCHIVE_STYLE);
        this.thresOpt.setImmediate(true);

        if (this.dto == null) {
            this.thresOpt.select(this.ID_THRES_OPT_MONTHS);
        } else {
            this.thresOpt.select(this.dto.getThresholdUnit());
        }

        return this.thresOpt;
    }
 
开发者ID:opensecuritycontroller,项目名称:osc-core,代码行数:20,代码来源:JobsArchiverPanel.java


示例4: createOptionGroup

import com.vaadin.ui.OptionGroup; //导入依赖的package包/类
@SuppressWarnings("serial")
private OptionGroup createOptionGroup() {
    this.mode = new OptionGroup();
    this.mode.addItem("DHCP");
    this.mode.addItem("Static");
    this.mode.addStyleName("network-options");
    this.mode.setImmediate(true);
    this.mode.addValueChangeListener(new ValueChangeListener() {
        @Override
        public void valueChange(ValueChangeEvent event) {
            if (NetworkLayout.this.mode.getValue().equals("DHCP")) {
                NetworkLayout.this.editIPSettings.setEnabled(false);
                populateNetworkTable();
                NetworkLayout.this.mode.setEnabled(true);
            }
            if (NetworkLayout.this.mode.getValue().equals("Static")) {
                NetworkLayout.this.editIPSettings.setEnabled(true);
                NetworkLayout.this.mode.setEnabled(false);
            }

        }
    });
    return this.mode;
}
 
开发者ID:opensecuritycontroller,项目名称:osc-core,代码行数:25,代码来源:NetworkLayout.java


示例5: getType

import com.vaadin.ui.OptionGroup; //导入依赖的package包/类
@SuppressWarnings("serial")
private Component getType() {
    this.protectionTypeOption = new OptionGroup("Selection Type:");
    this.protectionTypeOption.addItem(TYPE_ALL);
    this.protectionTypeOption.addItem(TYPE_SELECTION);
    this.protectionTypeOption.select(TYPE_ALL);
    this.protectionTypeOption.addValueChangeListener(new ValueChangeListener() {
        @Override
        public void valueChange(ValueChangeEvent event) {
            if (BaseSecurityGroupWindow.this.protectionTypeOption.getValue() == TYPE_ALL) {
                enableSelection(false);
            } else if (BaseSecurityGroupWindow.this.protectionTypeOption.getValue() == TYPE_SELECTION) {
                enableSelection(true);
            }
            // Populate to list first and then the from list since we use the 'to' list items to exclude them from
            // the 'from' list
            populateToList();
            populateFromList();
        }
    });

    return this.protectionTypeOption;
}
 
开发者ID:opensecuritycontroller,项目名称:osc-core,代码行数:24,代码来源:BaseSecurityGroupWindow.java


示例6: createProtocolGroup

import com.vaadin.ui.OptionGroup; //导入依赖的package包/类
private void createProtocolGroup() {

        this.protocolGroup = new OptionGroup("Simulated Device Protocol");
        protocolGroup.addItem(Protocol.DMF_AMQP);
        protocolGroup.addItem(Protocol.DDI_HTTP);
        protocolGroup.select(Protocol.DMF_AMQP);
        protocolGroup.setItemCaption(Protocol.DMF_AMQP, "Device Management Federation API (AMQP push)");
        protocolGroup.setItemCaption(Protocol.DDI_HTTP, "Direct Device Interface (HTTP poll)");
        protocolGroup.setNullSelectionAllowed(false);
        protocolGroup.addValueChangeListener(event -> {
            final boolean directDeviceOptionSelected = event.getProperty().getValue().equals(Protocol.DDI_HTTP);
            pollUrlTextField.setVisible(directDeviceOptionSelected);
            gatewayTokenTextField.setVisible(directDeviceOptionSelected);
        });
        protocolGroup.setItemEnabled(Protocol.DMF_AMQP, dmfEnabled);
        if (!dmfEnabled) {
            protocolGroup.select(Protocol.DDI_HTTP);
        }
    }
 
开发者ID:eclipse,项目名称:hawkbit-examples,代码行数:20,代码来源:GenerateDialog.java


示例7: 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;
}
 
开发者ID:apache,项目名称:incubator-openaz,代码行数:25,代码来源:AttributeSelectionWindow.java


示例8: createOptionGroup

import com.vaadin.ui.OptionGroup; //导入依赖的package包/类
/**
 * create option group with Create tag/Update tag based on permissions.
 */
protected void createOptionGroup(final boolean hasCreatePermission, final boolean hasUpdatePermission) {

    optiongroup = new OptionGroup("Select Action");
    optiongroup.setId(UIComponentIdProvider.OPTION_GROUP);
    optiongroup.addStyleName(ValoTheme.OPTIONGROUP_SMALL);
    optiongroup.addStyleName("custom-option-group");
    optiongroup.setNullSelectionAllowed(false);

    if (hasCreatePermission) {
        optiongroup.addItem(createTagStr);
    }
    if (hasUpdatePermission) {
        optiongroup.addItem(updateTagStr);
    }

    setOptionGroupDefaultValue(hasCreatePermission, hasUpdatePermission);
}
 
开发者ID:eclipse,项目名称:hawkbit,代码行数:21,代码来源:AbstractCreateUpdateTagLayout.java


示例9: save

import com.vaadin.ui.OptionGroup; //导入依赖的package包/类
protected void save() {
    if (isNotBlank(nameField.getValue()) && isNotBlank(versionLabelField.getValue())) {
        releasePackage.setName(nameField.getValue());
        releasePackage.setVersionLabel(versionLabelField.getValue());
        releasePackage.setReleaseDate(releaseDateField.getValue());
        configurationService.save(releasePackage);

        configurationService.deleteReleasePackageProjectVersionsForReleasePackage(releasePackage.getId());
        for (CheckBox projectCheckbox : projectCheckboxes) {
            if (projectCheckbox.getValue() == true) {
                String projectId = (String) projectCheckbox.getData();
                OptionGroup optionGroup = projectVersionOptionGroups.get(projectId);
                String projectVersionId = (String) optionGroup.getValue();
                Rppv rppv = new Rppv(releasePackage.getId(), projectVersionId);
                configurationService.save(rppv);
            }
        }

        listener.updated(releasePackage);
        close();
    }
}
 
开发者ID:JumpMind,项目名称:metl,代码行数:23,代码来源:EditReleasePackageDialog.java


示例10: buildPossibleTargetVersions

import com.vaadin.ui.OptionGroup; //导入依赖的package包/类
@SuppressWarnings("unchecked")
protected Panel buildPossibleTargetVersions(ProjectVersion targetProjectVersion) {

    Panel possibleTargetVersionsPanel = new Panel("Available Target Versions");        
    possibleTargetVersionsPanel.addStyleName(ValoTheme.PANEL_SCROLL_INDICATOR);
    possibleTargetVersionsPanel.setSizeFull();

    IndexedContainer container = new IndexedContainer();
    optionGroup = new OptionGroup("Project Version", container);
    optionGroup.addStyleName(ValoTheme.OPTIONGROUP_SMALL);
    optionGroup.setItemCaptionMode(ItemCaptionMode.PROPERTY);
    optionGroup.setItemCaptionPropertyId("versionLabel");
    optionGroup.addStyleName("indent");

    List<ProjectVersion> projectVersions = configService.findProjectVersionsByProject(targetProjectVersion.getProject());        
    container.addContainerProperty("versionLabel", String.class, null); 
    for (ProjectVersion version : projectVersions) {
        Item item = container.addItem(version.getId());
        item.getItemProperty("versionLabel").setValue(version.getVersionLabel()); 
        if (targetProjectVersion.getId().equalsIgnoreCase(version.getId())) {
            optionGroup.setItemEnabled(version.getId(), false);
        }
    }
    possibleTargetVersionsPanel.setContent(optionGroup);
    return possibleTargetVersionsPanel;
}
 
开发者ID:JumpMind,项目名称:metl,代码行数:27,代码来源:ChangeDependencyVersionDialog.java


示例11: buildDialogLayout

import com.vaadin.ui.OptionGroup; //导入依赖的package包/类
@Override
protected void buildDialogLayout() {
    final VerticalLayout mainLayout = new VerticalLayout();
    mainLayout.setSizeFull();
    mainLayout.setSpacing(true);
    mainLayout.setMargin(true);

    optMessageType = new OptionGroup(ctx.tr("rdfvalidation.dialog.optMessageType.caption"));
    optMessageType.addItem(DPUContext.MessageType.ERROR);
    optMessageType.addItem(DPUContext.MessageType.WARNING);
    optMessageType.setValue(optMessageType.getItem(0));
    mainLayout.addComponent(optMessageType);

    txtAskQuery = new TextArea(ctx.tr("rdfvalidation.dialog.txtAskQuery.caption"));
    txtAskQuery.setSizeFull();
    txtAskQuery.setNullRepresentation("");
    txtAskQuery.setNullSettingAllowed(true);
    mainLayout.addComponent(txtAskQuery);
    mainLayout.setExpandRatio(txtAskQuery, 1.0f);

    setCompositionRoot(mainLayout);
}
 
开发者ID:UnifiedViews,项目名称:Plugins,代码行数:23,代码来源:SparqlAskVaadinDialog.java


示例12: SystemDefChoiceField

import com.vaadin.ui.OptionGroup; //导入依赖的package包/类
/**
 * Instantiates a new system definition choice field.
 */
public SystemDefChoiceField() {
    oidType = new OptionGroup("OID Type", OPTIONS);
    oidType.setNullSelectionAllowed(false);
    oidType.select("Single");

    oidValue = new TextField("OID Value");
    oidValue.setWidth("100%");
    oidValue.setNullSettingAllowed(false);
    oidValue.setRequired(true);
    oidValue.setImmediate(true);
    oidValue.addValidator(new RegexpValidator("^\\.[.\\d]+$", "Invalid OID {0}"));

    HorizontalLayout layout = new HorizontalLayout();
    layout.setSpacing(true);
    layout.setWidth("100%");
    layout.addComponent(oidType);
    layout.addComponent(oidValue);
    layout.setExpandRatio(oidValue, 1);

    setWriteThrough(false);
    setCompositionRoot(layout);
}
 
开发者ID:qoswork,项目名称:opennmszh,代码行数:26,代码来源:SystemDefChoiceField.java


示例13: 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;
}
 
开发者ID:apache,项目名称:incubator-openaz,代码行数:35,代码来源:ExpressionSelectionWindow.java


示例14: 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;
}
 
开发者ID:eclipse,项目名称:hawkbit,代码行数:13,代码来源:AddUpdateRolloutWindowLayout.java


示例15: assignOptionGroupByValues

import com.vaadin.ui.OptionGroup; //导入依赖的package包/类
private void assignOptionGroupByValues(final List<String> tagOptions) {
    assignOptiongroup = new OptionGroup("", tagOptions);
    assignOptiongroup.setStyleName(ValoTheme.OPTIONGROUP_SMALL);
    assignOptiongroup.addStyleName("custom-option-group");
    assignOptiongroup.setNullSelectionAllowed(false);
    assignOptiongroup.setId(SPUIDefinitions.ASSIGN_OPTION_GROUP_SOFTWARE_MODULE_TYPE_ID);
    assignOptiongroup.select(tagOptions.get(0));
}
 
开发者ID:eclipse,项目名称:hawkbit,代码行数:9,代码来源:CreateUpdateSoftwareTypeLayout.java


示例16: projectSelectionListener

import com.vaadin.ui.OptionGroup; //导入依赖的package包/类
protected void projectSelectionListener(ValueChangeEvent event) {
    CheckBox checkbox = (CheckBox) event.getProperty();
    String projectId = (String) checkbox.getData();
    OptionGroup optionGroup = projectVersionOptionGroups.get(projectId);
    if (checkbox.getValue() == false) {
        optionGroup.clear();
        optionGroup.setEnabled(false);
    } else {
        @SuppressWarnings("unchecked")
        Collection<String> projectVersionIds = (Collection<String>) optionGroup.getItemIds();
        Iterator<String> itr = projectVersionIds.iterator();
        optionGroup.select(itr.next());
        optionGroup.setEnabled(true);
    }
}
 
开发者ID:JumpMind,项目名称:metl,代码行数:16,代码来源:EditReleasePackageDialog.java


示例17: 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;
}
 
开发者ID:JumpMind,项目名称:metl,代码行数:10,代码来源:PropertySheet.java


示例18: CancelReasonSelect

import com.vaadin.ui.OptionGroup; //导入依赖的package包/类
public CancelReasonSelect() {
    super("Причина отмены продажи");
    withSelectType(OptionGroup.class);
    setWidthUndefined();
    setCaptionGenerator(ComponentUtil.getEnumCaptionGenerator(Sale.CancelReason.class));
    setOptions(Sale.CancelReason.values());
}
 
开发者ID:ExtaSoft,项目名称:extacrm,代码行数:8,代码来源:CancelReasonSelect.java


示例19: setVisibleFields

import com.vaadin.ui.OptionGroup; //导入依赖的package包/类
private void setVisibleFields(final OptionGroup group, final TextField tfKeyFile, final TextField tfProxyHost, final TextField tfProxyPort,
		final TextField tfUser, final PasswordField tfPw) {
	if (group.getValue() == null)
		group.setValue("FILE");
	String strGroup = group.getValue().toString();
	if (strGroup == "FTP") {
		tfKeyFile.setVisible(false);
		tfProxyHost.setVisible(false);
		tfProxyPort.setVisible(false);
		tfUser.setVisible(true);
		tfPw.setVisible(true);
	} else if (strGroup == "SFTP") {
		tfKeyFile.setVisible(true);
		tfProxyHost.setVisible(true);
		tfProxyPort.setVisible(true);
		tfUser.setVisible(true);
		tfPw.setVisible(true);
	} else {
		// File
		tfKeyFile.setVisible(false);
		tfProxyHost.setVisible(false);
		tfProxyPort.setVisible(false);
		tfUser.setVisible(false);
		tfPw.setVisible(false);

	}
}
 
开发者ID:Union-Investment,项目名称:vfs2-file-explorer,代码行数:28,代码来源:ConfigView.java


示例20: ImportSelectType

import com.vaadin.ui.OptionGroup; //导入依赖的package包/类
public ImportSelectType(final ImportWizardView importView)
{
	this.importTypes.add(new ImportType("Contacts", Contact.class));

	this.layout = new VerticalLayout();
	this.layout
			.addComponent(new Label("Select the type of information you are looking to import. The click 'Next'"));
	final FormLayout formLayout = new FormLayout();
	this.optionGroup = new OptionGroup("Type", this.importTypes);
	formLayout.addComponent(this.optionGroup);
	this.layout.addComponent(formLayout);
	this.layout.setMargin(true);
}
 
开发者ID:bsutton,项目名称:scoutmaster,代码行数:14,代码来源:ImportSelectType.java



注:本文中的com.vaadin.ui.OptionGroup类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java MapSolrParams类代码示例发布时间:2022-05-21
下一篇:
Java DeleteTxn类代码示例发布时间:2022-05-21
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap