use of delta.games.lotro.gui.items.ItemFilterController 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.ItemFilterController 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.ItemFilterController in project lotro-companion by dmorcellet.
the class StashWindowController method buildContents.
@Override
protected JComponent buildContents() {
// Whole panel
JPanel panel = GuiFactory.buildPanel(new GridBagLayout());
// Build table
JPanel tablePanel = buildTablePanel();
// Filter
ItemFilterController filterController = new ItemFilterController();
Filter<Item> filter = filterController.getFilter();
filterController.setFilterUpdateListener(this);
JPanel filterPanel = filterController.getPanel();
TitledBorder filterBorder = GuiFactory.buildTitledBorder("Filter");
filterPanel.setBorder(filterBorder);
GridBagConstraints c = new GridBagConstraints(0, 0, 1, 1, 1, 0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0);
panel.add(filterPanel, c);
// Items table
c.gridy = 1;
c.weighty = 1;
c.fill = GridBagConstraints.BOTH;
panel.add(tablePanel, c);
tablePanel.setBorder(GuiFactory.buildTitledBorder("Items"));
_itemsTable.getTableController().setFilter(filter);
return panel;
}
Aggregations