Search in sources :

Example 1 with CharacterLogWindowController

use of delta.games.lotro.gui.log.CharacterLogWindowController in project lotro-companion by dmorcellet.

the class CharacterFileWindowController method actionPerformed.

/**
 * Handle button actions.
 * @param e Source event.
 */
@Override
public void actionPerformed(ActionEvent e) {
    String command = e.getActionCommand();
    if (LOG_COMMAND.equals(command)) {
        // Show log
        String serverName = _toon.getServerName();
        String toonName = _toon.getName();
        String id = CharacterLogWindowController.getIdentifier(serverName, toonName);
        WindowController controller = _windowsManager.getWindow(id);
        if (controller == null) {
            controller = new CharacterLogWindowController(_toon);
            _windowsManager.registerWindow(controller);
            controller.getWindow().setLocationRelativeTo(getFrame());
        }
        controller.bringToFront();
    } else if (REPUTATION_COMMAND.equals(command)) {
        // Reputation
        CharacterReputationDialogController controller = new CharacterReputationDialogController(this, _toon);
        controller.editModal();
    } else if (LEVEL_COMMAND.equals(command)) {
        // Level history
        LevelHistoryEditionDialogController controller = new LevelHistoryEditionDialogController(this, _toon);
        controller.editModal();
    } else if (CRAFTING_COMMAND.equals(command)) {
        // Crafting
        CraftingWindowController controller = new CraftingWindowController(this, _toon);
        controller.editModal();
    } else if (STASH_COMMAND.equals(command)) {
        showStash();
    } else if (TRAIT_POINTS_COMMAND.equals(command)) {
        editTraitPoints();
    } else if (NEW_TOON_DATA_ID.equals(command)) {
        startNewCharacterData();
    } else if (CLONE_TOON_DATA_ID.equals(command)) {
        cloneCharacterData();
    } else if (EXPORT_TOON_DATA_ID.equals(command)) {
        exportCharacterData();
    } else if (REMOVE_TOON_DATA_ID.equals(command)) {
        removeCharacterData();
    } else if (GenericTableController.DOUBLE_CLICK.equals(command)) {
        CharacterData data = (CharacterData) e.getSource();
        showCharacterData(data);
    }
}
Also used : CharacterLogWindowController(delta.games.lotro.gui.log.CharacterLogWindowController) CraftingWindowController(delta.games.lotro.gui.stats.crafting.CraftingWindowController) LevelHistoryEditionDialogController(delta.games.lotro.gui.stats.levelling.LevelHistoryEditionDialogController) CharacterData(delta.games.lotro.character.CharacterData) CharacterReputationDialogController(delta.games.lotro.gui.stats.reputation.CharacterReputationDialogController) CraftingWindowController(delta.games.lotro.gui.stats.crafting.CraftingWindowController) WindowController(delta.common.ui.swing.windows.WindowController) DefaultWindowController(delta.common.ui.swing.windows.DefaultWindowController) StashWindowController(delta.games.lotro.gui.character.stash.StashWindowController) TraitPointsEditionWindowController(delta.games.lotro.gui.stats.traitPoints.TraitPointsEditionWindowController) CharacterLogWindowController(delta.games.lotro.gui.log.CharacterLogWindowController)

Aggregations

DefaultWindowController (delta.common.ui.swing.windows.DefaultWindowController)1 WindowController (delta.common.ui.swing.windows.WindowController)1 CharacterData (delta.games.lotro.character.CharacterData)1 StashWindowController (delta.games.lotro.gui.character.stash.StashWindowController)1 CharacterLogWindowController (delta.games.lotro.gui.log.CharacterLogWindowController)1 CraftingWindowController (delta.games.lotro.gui.stats.crafting.CraftingWindowController)1 LevelHistoryEditionDialogController (delta.games.lotro.gui.stats.levelling.LevelHistoryEditionDialogController)1 CharacterReputationDialogController (delta.games.lotro.gui.stats.reputation.CharacterReputationDialogController)1 TraitPointsEditionWindowController (delta.games.lotro.gui.stats.traitPoints.TraitPointsEditionWindowController)1