daily pastebin goal
14%
SHARE
TWEET

Untitled

a guest Jun 14th, 2018 53 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package lapr.project.ui;
  2.  
  3. import java.io.IOException;
  4. import javafx.application.Application;
  5. import static javafx.application.Application.launch;
  6. import javafx.fxml.FXMLLoader;
  7. import javafx.scene.Parent;
  8. import javafx.scene.Scene;
  9. import javafx.stage.Stage;
  10. import lapr.project.model.EventManagerRegister;
  11. import lapr.project.model.EventsRegister;
  12. import lapr.project.model.ExpoCenter;
  13. import lapr.project.model.User;
  14. import lapr.project.model.UserRegister;
  15.  
  16. /**
  17.  * @author Nuno Bettencourt <nmb@isep.ipp.pt> on 24/05/16.
  18.  */
  19. public class MainApp extends Application {
  20.  
  21.     private static ExpoCenter expo;
  22.  
  23.     /**
  24.      * Private constructor to hide implicit public one.
  25.      */
  26.     public MainApp() {
  27.         expo = new ExpoCenter();
  28.         lauchExpo();
  29.     }
  30.    
  31.     @Override
  32.     public void start(Stage stage) throws IOException {
  33.         Parent root = FXMLLoader.load(getClass().getResource("/fxml/LoginWindow.fxml"));
  34.  
  35.         Scene scene = new Scene(root);
  36.  
  37.         stage.setTitle("FairAndCenterManagement");
  38.         stage.setScene(scene);
  39.         stage.show();
  40.     }
  41.  
  42.     /**
  43.      * @param args the command line arguments
  44.      */
  45.     public static void main(String[] args) {
  46.         launch(args);
  47.        
  48.     }
  49.     public final void lauchExpo(){
  50.         EventsRegister eventsRegister = new EventsRegister();
  51.         UserRegister usersRegister = new UserRegister();
  52.         EventManagerRegister eventManagerRegister = new EventManagerRegister();
  53.        
  54.         User u1 = new User("Miguel", "ola@ola.pt", "1","11221122");
  55.         eventManagerRegister.addEventManager(u1);
  56.         usersRegister.addUserToRegister(u1);
  57.        
  58.         //importMethod(standsRegister,eventsRegister,workshopRegister,usersRegister);
  59.         expo.setEventManagerRegister(eventManagerRegister);
  60.         expo.setEventsRegister(eventsRegister);
  61.         expo.setUsersRegister(usersRegister);
  62.     }
  63.  
  64.     public static ExpoCenter getExpo() {
  65.         return expo;
  66.     }
  67. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top