1 package ch.odi.justblog.gui.swing;
2
3 import javax.swing.UIManager;
4
5 import ch.odi.justblog.gui.IAuthenticator;
6 import ch.odi.justblog.gui.Ui;
7 import ch.odi.justblog.gui.swing.control.Controller;
8
9 /***
10 *
11 *
12 * @author oglueck
13 */
14 public class SwingUi implements Ui {
15 private Controller controller = new Controller(this);
16 private MainWindow window;
17
18 /***
19 *
20 */
21 public SwingUi() {
22 try {
23 UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
24 } catch (Exception e) {
25
26 }
27
28 window = new MainWindow("JustBlog", controller);
29 window.setDefaultCloseOperation(MainWindow.EXIT_ON_CLOSE);
30 window.setSize(300, 300);
31 window.canEditEntry(false);
32 window.show();
33 }
34
35 public IAuthenticator createAuthenticator() {
36 return new DialogAuthenticator(window);
37 }
38
39 }