当前位置: 首页>>代码示例>>Java>>正文


Java OptionGroup.setHeight方法代码示例

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


在下文中一共展示了OptionGroup.setHeight方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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;
}
 
开发者ID:apache,项目名称:incubator-openaz,代码行数:25,代码来源:AttributeSelectionWindow.java

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

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

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

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

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

示例7: showNotificationSettings

import com.vaadin.ui.OptionGroup; //导入方法依赖的package包/类
@Override
public void showNotificationSettings(final CrmNotificationSetting notification) {
    this.removeAllComponents();

    MVerticalLayout bodyWrapper = new MVerticalLayout();
    bodyWrapper.setSizeFull();

    MVerticalLayout body = new MVerticalLayout().withMargin(new MarginInfo(true, false, false, false));

    final OptionGroup optionGroup = new OptionGroup(null);
    optionGroup.setItemCaptionMode(ItemCaptionMode.EXPLICIT);

    optionGroup.addItem(NotificationType.Default.name());
    optionGroup.setItemCaption(NotificationType.Default.name(),
            UserUIContext.getMessage(ProjectSettingI18nEnum.OPT_DEFAULT_SETTING));

    optionGroup.addItem(NotificationType.None.name());
    optionGroup.setItemCaption(NotificationType.None.name(), UserUIContext
            .getMessage(ProjectSettingI18nEnum.OPT_NONE_SETTING));

    optionGroup.addItem(NotificationType.Minimal.name());
    optionGroup.setItemCaption(NotificationType.Minimal.name(),
            UserUIContext.getMessage(ProjectSettingI18nEnum.OPT_MINIMUM_SETTING));

    optionGroup.addItem(NotificationType.Full.name());
    optionGroup.setItemCaption(NotificationType.Full.name(), UserUIContext
            .getMessage(ProjectSettingI18nEnum.OPT_MAXIMUM_SETTING));

    optionGroup.setHeight("100%");

    body.with(optionGroup).withAlign(optionGroup, Alignment.MIDDLE_LEFT).expand(optionGroup);

    String levelVal = notification.getLevel();
    if (levelVal == null) {
        optionGroup.select(NotificationType.Default.name());
    } else {
        optionGroup.select(levelVal);
    }

    Button updateBtn = new MButton(UserUIContext.getMessage(GenericI18Enum.BUTTON_UPDATE_LABEL), clickEvent -> {
        try {
            notification.setLevel((String) optionGroup.getValue());
            CrmNotificationSettingService crmNotificationSettingService = AppContextUtil
                    .getSpringBean(CrmNotificationSettingService.class);
            if (notification.getId() == null) {
                crmNotificationSettingService.saveWithSession(notification, UserUIContext.getUsername());
            } else {
                crmNotificationSettingService.updateWithSession(notification, UserUIContext.getUsername());
            }
            NotificationUtil.showNotification(UserUIContext.getMessage(GenericI18Enum.OPT_CONGRATS),
                    UserUIContext.getMessage(ProjectSettingI18nEnum.DIALOG_UPDATE_SUCCESS));
        } catch (Exception e) {
            throw new MyCollabException(e);
        }
    }).withIcon(FontAwesome.REFRESH).withStyleName(WebThemes.BUTTON_ACTION);
    body.with(updateBtn).withAlign(updateBtn, Alignment.BOTTOM_LEFT);

    bodyWrapper.addComponent(body);
    this.addComponent(bodyWrapper);
}
 
开发者ID:MyCollab,项目名称:mycollab,代码行数:61,代码来源:CrmNotificationSettingViewImpl.java


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