1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- package grafikchat;
-
- import grafikchat.controller.ConnectController;
- import grafikchat.controller.GrafikController;
- import grafikchat.controller.ReceiveAdapter;
- import grafikchat.model.ChatModel;
- import grafikchat.view.ChatView;
-
- /**
- * Start class, start chat application
- *
- * @author marian
- */
- public class Start {
-
- public Start()
- {
- ChatView view = new ChatView();
- ChatModel model = new ChatModel();
-
- view.getGvDrawPane().setModel(model);
-
- ConnectController controllerConnect = new ConnectController(model, view);
- controllerConnect.registerEvents();
-
- GrafikController controller = new GrafikController(view, model);
- controller.registerEvents();
-
- ReceiveAdapter rxAdapter = new ReceiveAdapter(view);
- model.addObserver(rxAdapter);
-
- view.setTitle("Chat");
- view.setVisible(true);
- }
-
- /**
- * @param args the command line arguments
- */
- public static void main(String[] args)
- {
- Start start = new Start();
- }
-
- }
|