use of delta.games.lotro.gui.items.ItemFilterConfiguration 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;
}
Aggregations