Example usage for com.vaadin.ui ComboBox ComboBox

List of usage examples for com.vaadin.ui ComboBox ComboBox

Introduction

In this page you can find the example usage for com.vaadin.ui ComboBox ComboBox.

Prototype

public ComboBox() 

Source Link

Document

Constructs an empty combo box without a caption.

Usage

From source file:pl.exsio.frameset.vaadin.ui.support.component.ComponentFactory.java

License:Open Source License

public static ComboBox createEnumComboBox(Class<? extends Enum> target, boolean sort) {
    ComboBox combo = new ComboBox();
    List list = Arrays.asList(target.getEnumConstants());
    if (sort) {/*ww w. java2 s  .  com*/
        ComponentFactory.sortEnum(list);
    }
    for (Object object : list) {
        combo.addItem(object);
    }
    return combo;
}