Search in sources :

Example 16 with ComboBoxController

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;
}
Also used : ComboBoxController(delta.common.ui.swing.combobox.ComboBoxController) ItemQuality(delta.games.lotro.lore.items.ItemQuality)

Example 17 with ComboBoxController

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;
}
Also used : ComboBoxController(delta.common.ui.swing.combobox.ComboBoxController) DeedType(delta.games.lotro.lore.deeds.DeedType)

Example 18 with ComboBoxController

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;
}
Also used : ComboBoxController(delta.common.ui.swing.combobox.ComboBoxController) MapBundle(delta.games.lotro.maps.data.MapBundle)

Aggregations

ComboBoxController (delta.common.ui.swing.combobox.ComboBoxController)18 FlowLayout (java.awt.FlowLayout)3 GridBagConstraints (java.awt.GridBagConstraints)3 GridBagLayout (java.awt.GridBagLayout)3 Insets (java.awt.Insets)3 JPanel (javax.swing.JPanel)3 ItemSelectionListener (delta.common.ui.swing.combobox.ItemSelectionListener)2 Vocation (delta.games.lotro.lore.crafting.Vocation)2 FloatEditionController (delta.common.ui.swing.text.FloatEditionController)1 IntegerEditionController (delta.common.ui.swing.text.IntegerEditionController)1 TypedProperties (delta.common.utils.misc.TypedProperties)1 VirtueId (delta.games.lotro.common.VirtueId)1 StatsEditionPanelController (delta.games.lotro.gui.character.stats.StatsEditionPanelController)1 EssencesEditionPanelController (delta.games.lotro.gui.items.essences.EssencesEditionPanelController)1 RelicsEditionPanelController (delta.games.lotro.gui.items.relics.RelicsEditionPanelController)1 Profession (delta.games.lotro.lore.crafting.Profession)1 DeedType (delta.games.lotro.lore.deeds.DeedType)1 Armour (delta.games.lotro.lore.items.Armour)1 ArmourType (delta.games.lotro.lore.items.ArmourType)1 DamageType (delta.games.lotro.lore.items.DamageType)1