Search in sources :

Example 21 with CharacterFile

use of delta.games.lotro.character.CharacterFile 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 22 with CharacterFile

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

the class MainTestReputationSynopsis method doIt.

private void doIt() {
    CharactersManager mgr = CharactersManager.getInstance();
    List<CharacterFile> allToons = mgr.getAllToons();
    ReputationSynopsisTableController table = new ReputationSynopsisTableController(null);
    table.setToons(allToons);
    JTable jtable = table.getTable();
    JScrollPane scroll = GuiFactory.buildScrollPane(jtable);
    DefaultWindowController w = new DefaultWindowController();
    w.getFrame().add(scroll);
    w.getFrame().pack();
    w.show();
}
Also used : CharactersManager(delta.games.lotro.character.CharactersManager) JScrollPane(javax.swing.JScrollPane) DefaultWindowController(delta.common.ui.swing.windows.DefaultWindowController) JTable(javax.swing.JTable) CharacterFile(delta.games.lotro.character.CharacterFile)

Example 23 with CharacterFile

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

the class MainTestCharacterMainWindow 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();
    // List<CharacterFile> toons=CharactersManager.getInstance().getAllToons();
    CharacterFile toon = utils.getMainToon();
    // for(CharacterFile toon : toons)
    {
        CharacterFileWindowController controller = new CharacterFileWindowController(toon);
        controller.show();
    }
}
Also used : LotroTestUtils(delta.games.lotro.character.log.LotroTestUtils) CharacterFile(delta.games.lotro.character.CharacterFile)

Example 24 with CharacterFile

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

the class MainTestEquipmentLoading 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();
    CharacterFile toon = utils.getMainToon();
    // for(CharacterFile toon : toons)
    {
        String name = toon.getName();
        System.out.println("Loading toon [" + name + "]");
        CharacterInfosManager manager = new CharacterInfosManager(toon);
        CharacterData infos = manager.getLastCharacterDescription();
        if (infos != null) {
            EquipmentPanelController ctrl = new EquipmentPanelController(null, toon, infos);
            JPanel panel = ctrl.getPanel();
            JFrame frame = new JFrame("Equipment for " + toon.getName());
            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            // Create and set up the content pane.
            frame.setContentPane(panel);
            // Display the window.
            frame.pack();
            frame.setVisible(true);
        }
    }
}
Also used : JPanel(javax.swing.JPanel) EquipmentPanelController(delta.games.lotro.gui.character.gear.EquipmentPanelController) CharacterData(delta.games.lotro.character.CharacterData) LotroTestUtils(delta.games.lotro.character.log.LotroTestUtils) JFrame(javax.swing.JFrame) CharacterInfosManager(delta.games.lotro.character.CharacterInfosManager) CharacterFile(delta.games.lotro.character.CharacterFile)

Example 25 with CharacterFile

use of delta.games.lotro.character.CharacterFile 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)42 LotroTestUtils (delta.games.lotro.character.log.LotroTestUtils)13 ArrayList (java.util.ArrayList)11 CharactersManager (delta.games.lotro.character.CharactersManager)9 JPanel (javax.swing.JPanel)6 CharacterData (delta.games.lotro.character.CharacterData)5 CharacterLog (delta.games.lotro.character.log.CharacterLog)5 Preferences (delta.common.utils.misc.Preferences)4 TypedProperties (delta.common.utils.misc.TypedProperties)4 CraftingStatus (delta.games.lotro.character.crafting.CraftingStatus)3 CharacterEventType (delta.games.lotro.character.events.CharacterEventType)3 File (java.io.File)3 CellDataProvider (delta.common.ui.swing.tables.CellDataProvider)2 TableColumnController (delta.common.ui.swing.tables.TableColumnController)2 CharacterInfosManager (delta.games.lotro.character.CharacterInfosManager)2 CharacterSummary (delta.games.lotro.character.CharacterSummary)2 ProfessionStatus (delta.games.lotro.character.crafting.ProfessionStatus)2 CharacterStatsComputer (delta.games.lotro.character.stats.CharacterStatsComputer)2 Profession (delta.games.lotro.lore.crafting.Profession)2 GridBagConstraints (java.awt.GridBagConstraints)2