List of usage examples for com.vaadin.ui ComboBox ComboBox
public ComboBox()
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; }