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;
}
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();
}
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();
}
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();
}
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();
}
Aggregations