Search in sources :

Example 1 with WindowController

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

the class AboutDialogController method build.

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

Example 2 with WindowController

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

the class MainFrameController method doMap.

private void doMap() {
    WindowController controller = _windowsManager.getWindow(MapWindowController.IDENTIFIER);
    if (controller == null) {
        File mapsDir = Config.getInstance().getMapsDir();
        MapsManager mapsManager = new MapsManager(mapsDir);
        mapsManager.load();
        controller = new MapWindowController(mapsManager);
        _windowsManager.registerWindow(controller);
        controller.getWindow().setLocationRelativeTo(getFrame());
    }
    controller.bringToFront();
}
Also used : MapsManager(delta.games.lotro.maps.data.MapsManager) MapWindowController(delta.games.lotro.maps.ui.MapWindowController) File(java.io.File) 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 3 with WindowController

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

the class MainFrameController method doCraftingSynopsis.

private void doCraftingSynopsis() {
    String id = CraftingSynopsisWindowController.getIdentifier();
    WindowController controller = _windowsManager.getWindow(id);
    if (controller == null) {
        controller = new CraftingSynopsisWindowController();
        _windowsManager.registerWindow(controller);
    }
    controller.bringToFront();
}
Also used : 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) CraftingSynopsisWindowController(delta.games.lotro.gui.stats.crafting.synopsis.CraftingSynopsisWindowController)

Example 4 with WindowController

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

the class MainFrameController method doAbout.

private void doAbout() {
    String id = AboutDialogController.getIdentifier();
    WindowController controller = _windowsManager.getWindow(id);
    if (controller == null) {
        JFrame thisFrame = getFrame();
        controller = new AboutDialogController(this);
        _windowsManager.registerWindow(controller);
        Window w = controller.getWindow();
        w.setLocationRelativeTo(thisFrame);
        Point p = w.getLocation();
        w.setLocation(p.x + 100, p.y + 100);
    }
    controller.bringToFront();
}
Also used : Window(java.awt.Window) JFrame(javax.swing.JFrame) AboutDialogController(delta.games.lotro.gui.about.AboutDialogController) Point(java.awt.Point) 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 5 with WindowController

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

the class ToonsManagementController method showToon.

private void showToon(CharacterFile toon) {
    String serverName = toon.getServerName();
    String toonName = toon.getName();
    String id = CharacterFileWindowController.getIdentifier(serverName, toonName);
    WindowController controller = _mainWindowsManager.getWindow(id);
    if (controller == null) {
        controller = new CharacterFileWindowController(toon);
        _mainWindowsManager.registerWindow(controller);
        controller.getWindow().setLocationRelativeTo(getPanel());
    }
    controller.bringToFront();
}
Also used : CharacterFileWindowController(delta.games.lotro.gui.character.CharacterFileWindowController) WindowController(delta.common.ui.swing.windows.WindowController) CharacterFileWindowController(delta.games.lotro.gui.character.CharacterFileWindowController)

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