use of delta.common.ui.swing.combobox.ComboBoxController in project lotro-companion by dmorcellet.
the class ItemUiTools method buildQualityCombo.
/**
* Build a controller for a combo box to choose an item quality.
* @return A new controller.
*/
public static ComboBoxController<ItemQuality> buildQualityCombo() {
ComboBoxController<ItemQuality> ctrl = new ComboBoxController<ItemQuality>();
ctrl.addEmptyItem("");
for (ItemQuality quality : ItemQuality.ALL) {
ctrl.addItem(quality, quality.getMeaning());
}
ctrl.selectItem(null);
return ctrl;
}
use of delta.common.ui.swing.combobox.ComboBoxController in project lotro-companion by dmorcellet.
the class DeedUiUtils method buildDeedTypeCombo.
/**
* Build a combo-box controller to choose a deed type.
* @return A new combo-box controller.
*/
public static ComboBoxController<DeedType> buildDeedTypeCombo() {
ComboBoxController<DeedType> ctrl = new ComboBoxController<DeedType>();
ctrl.addEmptyItem("");
for (DeedType deedType : DeedType.values()) {
ctrl.addItem(deedType, deedType.toString());
}
ctrl.selectItem(null);
return ctrl;
}
use of delta.common.ui.swing.combobox.ComboBoxController in project lotro-tools by dmorcellet.
the class MapChooserDialogController method buildMapCombo.
private ComboBoxController<MapBundle> buildMapCombo() {
ComboBoxController<MapBundle> controller = new ComboBoxController<MapBundle>();
List<MapBundle> bundles = _manager.getMaps();
for (MapBundle bundle : bundles) {
controller.addItem(bundle, bundle.getLabel());
}
return controller;
}
Aggregations