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


Java OptionGroup类代码示例

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


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

示例1: getTestComponent

import com.vaadin.v7.ui.OptionGroup; //导入依赖的package包/类
@Override
public Component getTestComponent() {

    EnumSelect<AddressType> select = new EnumSelect<AddressType>()
            .withSelectType(OptionGroup.class);
    select.setStyleName(ValoTheme.OPTIONGROUP_HORIZONTAL);

    // The Enum type is detected when the edited property is bound to select
    // This typically comes form basic bean binding, but here done manually.
    ObjectProperty objectProperty = new ObjectProperty(AddressType.Home);
    select.setPropertyDataSource(objectProperty);
    
    // Alternatively, if not using databinding at all, you could just use 
    // basic TypedSelect, or the method from it
    // select.setOptions(AddressType.values());

    return select;
}
 
开发者ID:viritin,项目名称:viritin,代码行数:19,代码来源:EnumFieldAsRadioButtonGroup.java

示例2: withSelectType

import com.vaadin.v7.ui.OptionGroup; //导入依赖的package包/类
public TypedSelect<T> withSelectType(
        Class<? extends AbstractSelect> selectType) {
    if (selectType == ListSelect.class) {
        asListSelectType();
    } else if (selectType == OptionGroup.class) {
        asOptionGroupType();
    } else if (selectType == ComboBox.class) {
        asComboBoxType();
    } else {
        asNativeSelectType();
    }
    return this;
}
 
开发者ID:viritin,项目名称:viritin,代码行数:14,代码来源:TypedSelect.java

示例3: configurateOptionGroup

import com.vaadin.v7.ui.OptionGroup; //导入依赖的package包/类
public void configurateOptionGroup(OptionGroup optionGroup) {
    if (htmlContentAllowed != null) {
        optionGroup.setHtmlContentAllowed(htmlContentAllowed);
    }
    if (disabledItemIds != null) {
        for (Object o : disabledItemIds) {
            optionGroup.setItemEnabled(o, false);
        }
    }
}
 
开发者ID:viritin,项目名称:viritin,代码行数:11,代码来源:OptionGroupConfig.java

示例4: getTestComponent

import com.vaadin.v7.ui.OptionGroup; //导入依赖的package包/类
@Override
public Component getTestComponent() {
    TypedSelect<AddressType> types = new TypedSelect<AddressType>()
            .withSelectType(OptionGroup.class)
            .setOptions(AddressType.values()); // AddressType is an enum
    types.selectFirst();
    return types;
}
 
开发者ID:viritin,项目名称:viritin,代码行数:9,代码来源:TypedSelectOptionGroup.java

示例5: getOptiongroup

import com.vaadin.v7.ui.OptionGroup; //导入依赖的package包/类
private OptionGroup getOptiongroup() {
    OptionGroup languageSelect = new OptionGroup();
    Locale[] availableLocales = new Locale[] { Locale.CANADA,
            Locale.ENGLISH, Locale.GERMAN };
    for (Locale locale : availableLocales) {
        languageSelect.addItem(locale);
        languageSelect.setItemCaption(locale,
                locale.getDisplayLanguage(locale));
    }
    languageSelect.setValue(Locale.ENGLISH);
    return languageSelect;
}
 
开发者ID:vaadin,项目名称:touchkit,代码行数:13,代码来源:VerticalComponentGroupTest.java

示例6: getUndelayingTable

import com.vaadin.v7.ui.OptionGroup; //导入依赖的package包/类
/**
 * @return the underlaying table implementation. Protected as one should
 * expect odd behavior if it configured in unsupported manner.
 */
protected OptionGroup getUndelayingTable() {
    return optionGroup;
}
 
开发者ID:viritin,项目名称:viritin,代码行数:8,代码来源:CheckBoxGroup.java


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