Search in sources :

Example 1 with CraftingStatus

use of delta.games.lotro.character.crafting.CraftingStatus in project lotro-companion by dmorcellet.

the class CraftingSynopsisTableController method updateRowItems.

private void updateRowItems() {
    _rowItems.clear();
    for (CharacterFile toon : _toons) {
        CraftingStatus craftingStatus = toon.getCraftingStatus();
        List<Profession> professions = craftingStatus.getProfessions();
        GuildStatus guildStatus = craftingStatus.getGuildStatus();
        Profession guild = guildStatus.getProfession();
        for (Profession profession : professions) {
            ProfessionStatus professionStatus = craftingStatus.getProfessionStatus(profession, true);
            GuildStatus displayedStatus = (profession == guild) ? guildStatus : null;
            CraftingSynopsisItem item = new CraftingSynopsisItem(toon, professionStatus, displayedStatus);
            _rowItems.add(item);
        }
    }
}
Also used : ProfessionStatus(delta.games.lotro.character.crafting.ProfessionStatus) Profession(delta.games.lotro.lore.crafting.Profession) GuildStatus(delta.games.lotro.character.crafting.GuildStatus) CraftingStatus(delta.games.lotro.character.crafting.CraftingStatus) CharacterFile(delta.games.lotro.character.CharacterFile)

Example 2 with CraftingStatus

use of delta.games.lotro.character.crafting.CraftingStatus in project lotro-companion by dmorcellet.

the class MainTestCraftingHistoryChart method main.

/**
 * Basic main method for test.
 * @param args Not used.
 */
public static void main(String[] args) {
    Locale.setDefault(Locale.US);
    LotroTestUtils utils = new LotroTestUtils();
    // for(CharacterFile toon : utils.getAllFiles())
    {
        CharacterFile toon = utils.getMainToon();
        CraftingStatus stats = toon.getCraftingStatus();
        stats.dump(System.out);
        List<Profession> professions = stats.getProfessions();
        for (Profession profession : professions) {
            ProfessionStatus stat = stats.getProfessionStatus(profession);
            JFrame f = new JFrame();
            ProfessionStatusPanelController controller = new ProfessionStatusPanelController(stat);
            JPanel panel = controller.getPanel();
            f.getContentPane().add(panel);
            f.pack();
            f.setVisible(true);
            f.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
        }
    }
}
Also used : ProfessionStatus(delta.games.lotro.character.crafting.ProfessionStatus) JPanel(javax.swing.JPanel) Profession(delta.games.lotro.lore.crafting.Profession) LotroTestUtils(delta.games.lotro.character.log.LotroTestUtils) JFrame(javax.swing.JFrame) CraftingStatus(delta.games.lotro.character.crafting.CraftingStatus) List(java.util.List) CharacterFile(delta.games.lotro.character.CharacterFile)

Example 3 with CraftingStatus

use of delta.games.lotro.character.crafting.CraftingStatus in project lotro-companion by dmorcellet.

the class MainTestCraftingStats method main.

/**
 * Basic main method for test.
 * @param args Not used.
 */
public static void main(String[] args) {
    LotroTestUtils utils = new LotroTestUtils();
    List<CharacterFile> toons = utils.getAllFiles();
    for (CharacterFile toon : toons) {
        // CharacterFile toon=utils.getMainToon();
        // CharacterFile toon=utils.getToonByName("Feroce");
        CraftingStatus stats = toon.getCraftingStatus();
        stats.dump(System.out);
    }
}
Also used : LotroTestUtils(delta.games.lotro.character.log.LotroTestUtils) CraftingStatus(delta.games.lotro.character.crafting.CraftingStatus) CharacterFile(delta.games.lotro.character.CharacterFile)

Aggregations

CharacterFile (delta.games.lotro.character.CharacterFile)3 CraftingStatus (delta.games.lotro.character.crafting.CraftingStatus)3 ProfessionStatus (delta.games.lotro.character.crafting.ProfessionStatus)2 LotroTestUtils (delta.games.lotro.character.log.LotroTestUtils)2 Profession (delta.games.lotro.lore.crafting.Profession)2 GuildStatus (delta.games.lotro.character.crafting.GuildStatus)1 List (java.util.List)1 JFrame (javax.swing.JFrame)1 JPanel (javax.swing.JPanel)1