Search in sources :

Example 6 with ItemsStash

use of delta.games.lotro.character.storage.ItemsStash in project lotro-companion by dmorcellet.

the class StashWindowController method cloneItem.

private void cloneItem() {
    GenericTableController<Item> controller = _itemsTable.getTableController();
    Item item = controller.getSelectedItem();
    if (item != null) {
        Item clone = ItemFactory.clone(item);
        clone.setStashIdentifier(null);
        ItemsStash stash = _toon.getStash();
        stash.addItem(clone);
        _toon.saveStash();
        _itemsTable.getTableController().refresh();
    }
}
Also used : ToolbarIconItem(delta.common.ui.swing.toolbar.ToolbarIconItem) Item(delta.games.lotro.lore.items.Item) ItemsStash(delta.games.lotro.character.storage.ItemsStash)

Aggregations

ItemsStash (delta.games.lotro.character.storage.ItemsStash)6 Item (delta.games.lotro.lore.items.Item)6 ToolbarIconItem (delta.common.ui.swing.toolbar.ToolbarIconItem)2 CharacterEquipment (delta.games.lotro.character.CharacterEquipment)2 EQUIMENT_SLOT (delta.games.lotro.character.CharacterEquipment.EQUIMENT_SLOT)2 JMenuItem (javax.swing.JMenuItem)2 CellDataProvider (delta.common.ui.swing.tables.CellDataProvider)1 DataProvider (delta.common.ui.swing.tables.DataProvider)1 CharacterData (delta.games.lotro.character.CharacterData)1 SlotContents (delta.games.lotro.character.CharacterEquipment.SlotContents)1 CharacterFile (delta.games.lotro.character.CharacterFile)1 CharacterEvent (delta.games.lotro.character.events.CharacterEvent)1 LotroTestUtils (delta.games.lotro.character.log.LotroTestUtils)1 Component (java.awt.Component)1 List (java.util.List)1