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