Search in sources :

Example 1 with EquipmentPanelController

use of delta.games.lotro.gui.character.gear.EquipmentPanelController 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)

Aggregations

CharacterData (delta.games.lotro.character.CharacterData)1 CharacterFile (delta.games.lotro.character.CharacterFile)1 CharacterInfosManager (delta.games.lotro.character.CharacterInfosManager)1 LotroTestUtils (delta.games.lotro.character.log.LotroTestUtils)1 EquipmentPanelController (delta.games.lotro.gui.character.gear.EquipmentPanelController)1 JFrame (javax.swing.JFrame)1 JPanel (javax.swing.JPanel)1