65 lines
1.9 KiB
Java
65 lines
1.9 KiB
Java
package envoy.client;
|
|
|
|
import java.util.logging.Logger;
|
|
|
|
import envoy.client.ui.container.ChatWindow;
|
|
import envoy.data.Config;
|
|
import envoy.util.EnvoyLog;
|
|
|
|
/**
|
|
* Starts the Envoy client and prompts the user to enter their name.<br>
|
|
* <br>
|
|
* Project: <strong>envoy-client</strong><br>
|
|
* File: <strong>Startup.java</strong><br>
|
|
* Created: <strong>12 Oct 2019</strong><br>
|
|
*
|
|
* @author Leon Hofmeister
|
|
* @author Maximilian Käfer
|
|
* @author Kai S. K. Engelbart
|
|
* @since Envoy Client v0.1-alpha
|
|
*/
|
|
public class Startup {
|
|
|
|
private static final Logger logger = EnvoyLog.getLogger(Startup.class);
|
|
|
|
// TODO: Update Javadoc
|
|
/**
|
|
* Loads the application by first loading the configuration, then acquiring a
|
|
* user name and connecting to the server. If the server cannot be reached,
|
|
* offline mode is entered if possible. After that, a {@link ChatWindow}
|
|
* instance is initialized and then displayed to the user. Upon application
|
|
* exit, settings and the local database are saved.
|
|
*
|
|
* @param args the command line arguments may contain configuration parameters
|
|
* and are parsed by the {@link Config} class
|
|
* @since Envoy Client v0.1-alpha
|
|
*/
|
|
public static void main(String[] args) {
|
|
// Display ChatWindow and StatusTrayIcon
|
|
// EventQueue.invokeLater(() -> {
|
|
// try {
|
|
// chatWindow.initContent(client, localDB, writeProxy);
|
|
//
|
|
//
|
|
// try {
|
|
// new StatusTrayIcon(chatWindow).show();
|
|
//
|
|
// // If the tray icon is supported and corresponding settings is set, hide the
|
|
// // chat window on close
|
|
// Settings.getInstance()
|
|
// .getItems()
|
|
// .get("onCloseMode")
|
|
// .setChangeHandler((onCloseMode) -> chatWindow
|
|
// .setDefaultCloseOperation((Boolean) onCloseMode ? JFrame.HIDE_ON_CLOSE :
|
|
// JFrame.EXIT_ON_CLOSE));
|
|
// } catch (EnvoyException e) {
|
|
// logger.warning("The StatusTrayIcon is not supported on this platform!");
|
|
// }
|
|
// } catch (Exception e) {
|
|
// e.printStackTrace();
|
|
// }
|
|
// });
|
|
|
|
}
|
|
}
|