use of delta.games.lotro.gui.items.ItemChoiceWindowController in project lotro-companion by dmorcellet.
the class MainTestShowCharacterStorage method show.
private void show(List<StoredItem> storedItems) {
List<Item> items = getItems(storedItems);
ItemFilterController filterController = new ItemFilterController();
Filter<Item> filter = filterController.getFilter();
ItemChoiceWindowController choiceCtrl = new ItemChoiceWindowController(null, null, items, filter, filterController);
choiceCtrl.show();
}
use of delta.games.lotro.gui.items.ItemChoiceWindowController in project lotro-companion by dmorcellet.
the class EquipmentPanelController method chooseItem.
private Item chooseItem(EQUIMENT_SLOT slot, List<Item> items) {
ItemsManager itemsManager = new ItemsManager(items);
List<Item> selectedItems = itemsManager.getItems(_toonData, slot);
ItemFilterConfiguration cfg = new ItemFilterConfiguration();
cfg.initFromItems(selectedItems);
ItemFilterController filterController = new ItemFilterController(cfg);
Filter<Item> filter = filterController.getFilter();
String id = ItemChoiceWindowController.ITEM_CHOOSER_PROPERTIES_ID + "#" + slot.name();
TypedProperties props = _parentWindow.getUserProperties(id);
ItemChoiceWindowController choiceCtrl = new ItemChoiceWindowController(_parentWindow, props, selectedItems, filter, filterController);
Item ret = choiceCtrl.editModal();
return ret;
}
use of delta.games.lotro.gui.items.ItemChoiceWindowController in project lotro-companion by dmorcellet.
the class EssenceChoice method chooseEssence.
/**
* Choose an essence.
* @param parent Parent controller.
* @return An essence item or <code>null</code>.
*/
public static Item chooseEssence(WindowController parent) {
List<Item> essences = ItemsManager.getInstance().getEssences();
EssenceFilterController filterController = new EssenceFilterController(_filter);
TypedProperties prefs = null;
if (parent != null) {
prefs = parent.getUserProperties(ItemChoiceWindowController.ESSENCE_CHOOSER_PROPERTIES_ID);
}
ItemChoiceWindowController choiceCtrl = new ItemChoiceWindowController(parent, prefs, essences, _filter, filterController);
Item ret = choiceCtrl.editModal();
return ret;
}
Aggregations