Search in sources :

Example 11 with WindowController

use of delta.common.ui.swing.windows.WindowController in project lotro-companion by dmorcellet.

the class CreditsDialogController method build.

@Override
protected JDialog build() {
    JDialog dialog = super.build();
    dialog.setTitle("Credits");
    dialog.pack();
    WindowController controller = getParentController();
    if (controller != null) {
        Window parentWindow = controller.getWindow();
        dialog.setLocationRelativeTo(parentWindow);
    }
    dialog.setResizable(false);
    return dialog;
}
Also used : Window(java.awt.Window) JDialog(javax.swing.JDialog) WindowController(delta.common.ui.swing.windows.WindowController)

Example 12 with WindowController

use of delta.common.ui.swing.windows.WindowController in project lotro-companion by dmorcellet.

the class ToonsManagementController method deleteToon.

private void deleteToon() {
    GenericTableController<CharacterFile> controller = _toonsTable.getTableController();
    CharacterFile file = controller.getSelectedItem();
    if (file != null) {
        String serverName = file.getServerName();
        String toonName = file.getName();
        // Check deletion
        int result = GuiFactory.showQuestionDialog(_parentController.getWindow(), "Do you really want to delete " + toonName + "@" + serverName + "?", "Delete?", JOptionPane.YES_NO_OPTION);
        if (result == JOptionPane.OK_OPTION) {
            String id = CharacterFileWindowController.getIdentifier(serverName, toonName);
            WindowController windowController = _mainWindowsManager.getWindow(id);
            if (windowController != null) {
                windowController.dispose();
            }
            CharactersManager manager = CharactersManager.getInstance();
            manager.removeToon(file);
        }
    }
}
Also used : CharactersManager(delta.games.lotro.character.CharactersManager) CharacterFile(delta.games.lotro.character.CharacterFile) WindowController(delta.common.ui.swing.windows.WindowController) CharacterFileWindowController(delta.games.lotro.gui.character.CharacterFileWindowController)

Example 13 with WindowController

use of delta.common.ui.swing.windows.WindowController in project lotro-companion by dmorcellet.

the class MainFrameController method doWarbands.

private void doWarbands() {
    String id = WarbandsWindowController.getIdentifier();
    WindowController controller = _windowsManager.getWindow(id);
    if (controller == null) {
        controller = new WarbandsWindowController(this);
        _windowsManager.registerWindow(controller);
    }
    controller.bringToFront();
}
Also used : WarbandsWindowController(delta.games.lotro.gui.stats.warbands.WarbandsWindowController) CharacterLevelWindowController(delta.games.lotro.gui.stats.levelling.CharacterLevelWindowController) ReputationSynopsisWindowController(delta.games.lotro.gui.stats.reputation.synopsis.ReputationSynopsisWindowController) WarbandsWindowController(delta.games.lotro.gui.stats.warbands.WarbandsWindowController) WindowController(delta.common.ui.swing.windows.WindowController) DefaultWindowController(delta.common.ui.swing.windows.DefaultWindowController) DeedsExplorerWindowController(delta.games.lotro.gui.deed.DeedsExplorerWindowController) MapWindowController(delta.games.lotro.maps.ui.MapWindowController) CraftingSynopsisWindowController(delta.games.lotro.gui.stats.crafting.synopsis.CraftingSynopsisWindowController)

Example 14 with WindowController

use of delta.common.ui.swing.windows.WindowController in project lotro-companion by dmorcellet.

the class MainFrameController method doCredits.

private void doCredits() {
    String id = CreditsDialogController.getIdentifier();
    WindowController controller = _windowsManager.getWindow(id);
    if (controller == null) {
        JFrame thisFrame = getFrame();
        controller = new CreditsDialogController(this);
        _windowsManager.registerWindow(controller);
        Window w = controller.getWindow();
        w.setLocationRelativeTo(thisFrame);
    }
    controller.bringToFront();
}
Also used : Window(java.awt.Window) CreditsDialogController(delta.games.lotro.gui.about.CreditsDialogController) JFrame(javax.swing.JFrame) CharacterLevelWindowController(delta.games.lotro.gui.stats.levelling.CharacterLevelWindowController) ReputationSynopsisWindowController(delta.games.lotro.gui.stats.reputation.synopsis.ReputationSynopsisWindowController) WarbandsWindowController(delta.games.lotro.gui.stats.warbands.WarbandsWindowController) WindowController(delta.common.ui.swing.windows.WindowController) DefaultWindowController(delta.common.ui.swing.windows.DefaultWindowController) DeedsExplorerWindowController(delta.games.lotro.gui.deed.DeedsExplorerWindowController) MapWindowController(delta.games.lotro.maps.ui.MapWindowController) CraftingSynopsisWindowController(delta.games.lotro.gui.stats.crafting.synopsis.CraftingSynopsisWindowController)

Example 15 with WindowController

use of delta.common.ui.swing.windows.WindowController in project lotro-companion by dmorcellet.

the class MainFrameController method doLevelling.

private void doLevelling() {
    String id = CharacterLevelWindowController.getIdentifier();
    WindowController controller = _windowsManager.getWindow(id);
    if (controller == null) {
        controller = new CharacterLevelWindowController();
        _windowsManager.registerWindow(controller);
        controller.getWindow().setLocationRelativeTo(getFrame());
    }
    controller.bringToFront();
}
Also used : CharacterLevelWindowController(delta.games.lotro.gui.stats.levelling.CharacterLevelWindowController) CharacterLevelWindowController(delta.games.lotro.gui.stats.levelling.CharacterLevelWindowController) ReputationSynopsisWindowController(delta.games.lotro.gui.stats.reputation.synopsis.ReputationSynopsisWindowController) WarbandsWindowController(delta.games.lotro.gui.stats.warbands.WarbandsWindowController) WindowController(delta.common.ui.swing.windows.WindowController) DefaultWindowController(delta.common.ui.swing.windows.DefaultWindowController) DeedsExplorerWindowController(delta.games.lotro.gui.deed.DeedsExplorerWindowController) MapWindowController(delta.games.lotro.maps.ui.MapWindowController) CraftingSynopsisWindowController(delta.games.lotro.gui.stats.crafting.synopsis.CraftingSynopsisWindowController)

Aggregations

WindowController (delta.common.ui.swing.windows.WindowController)18 DefaultWindowController (delta.common.ui.swing.windows.DefaultWindowController)12 DeedsExplorerWindowController (delta.games.lotro.gui.deed.DeedsExplorerWindowController)8 CraftingSynopsisWindowController (delta.games.lotro.gui.stats.crafting.synopsis.CraftingSynopsisWindowController)8 CharacterLevelWindowController (delta.games.lotro.gui.stats.levelling.CharacterLevelWindowController)8 ReputationSynopsisWindowController (delta.games.lotro.gui.stats.reputation.synopsis.ReputationSynopsisWindowController)8 WarbandsWindowController (delta.games.lotro.gui.stats.warbands.WarbandsWindowController)8 MapWindowController (delta.games.lotro.maps.ui.MapWindowController)8 Window (java.awt.Window)6 StashWindowController (delta.games.lotro.gui.character.stash.StashWindowController)4 CharacterLogWindowController (delta.games.lotro.gui.log.CharacterLogWindowController)4 CraftingWindowController (delta.games.lotro.gui.stats.crafting.CraftingWindowController)4 TraitPointsEditionWindowController (delta.games.lotro.gui.stats.traitPoints.TraitPointsEditionWindowController)4 JDialog (javax.swing.JDialog)3 CharacterData (delta.games.lotro.character.CharacterData)2 CharacterFileWindowController (delta.games.lotro.gui.character.CharacterFileWindowController)2 JFrame (javax.swing.JFrame)2 CharacterFile (delta.games.lotro.character.CharacterFile)1 CharactersManager (delta.games.lotro.character.CharactersManager)1 CharacterEvent (delta.games.lotro.character.events.CharacterEvent)1