Guest User

Untitled

a guest
Feb 28th, 2019
45
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.09 KB | None | 0 0
  1. /*
  2. * To change this license header, choose License Headers in Project Properties.
  3. * To change this template file, choose Tools | Templates
  4. * and open the template in the editor.
  5. */
  6. package main;
  7.  
  8. import domein.DomeinController;
  9. import domein.Geslacht;
  10. import domein.Graad;
  11. import domein.Lid;
  12. import domein.RolType;
  13. import gui.MainPanel;
  14. import java.util.ArrayList;
  15. import java.util.GregorianCalendar;
  16. import javafx.application.Application;
  17. import javafx.geometry.Rectangle2D;
  18. import javafx.scene.Scene;
  19. import javafx.stage.Screen;
  20. import javafx.stage.Stage;
  21. import util.FullScreenResolution;
  22.  
  23. /**
  24. *
  25. * @author IndyV
  26. */
  27. public class StartUp extends Application {
  28.  
  29. @Override
  30. public void start(Stage primaryStage) {
  31. //Get screen width and height.
  32. Rectangle2D waardenScreen = Screen.getPrimary().getVisualBounds();
  33. FullScreenResolution.setHeight(waardenScreen.getHeight());
  34. FullScreenResolution.setWidth(waardenScreen.getWidth());
  35.  
  36. DomeinController dc = new DomeinController();
  37.  
  38. Lid lid1 = new Lid("Nante", "Vermeulen", "nv12345", "0479154879", "053548216", "Straat", 100, 9320, "Landegem", "België", "nante.vermeulen@student.hogent.be",
  39. "ouders.nante@telenet.be", new GregorianCalendar(1998, 10, 19), new GregorianCalendar(2019, 1, 1), new ArrayList<>(), Geslacht.MAN, Graad.GROEN, RolType.BEHEERDER);
  40.  
  41. Lid lid0 = new Lid("Indy", "Van Canegem", "ivc12345", "0479154978", "053698442", "Straat", 13, 9520, "Zele", "België", "indy.vancanegem@student.hogent.be",
  42. "ouders.indy@skynet.be", new GregorianCalendar(1998, 8, 16), new GregorianCalendar(2014, 5, 9), new ArrayList<>(), Geslacht.ANDERS, Graad.GROEN, RolType.LID);
  43.  
  44. Lid lid2 = new Lid("Jef", "Malfliet", "jm12345", "0234567890", "053698420", "Straat", 1, 9220, "Hamme", "België", "jef.malfliet@student.hogent.be",
  45. "ouders.jef@proxymus.be", new GregorianCalendar(1999, 10, 24), new GregorianCalendar(2016, 8, 31), new ArrayList<>(), Geslacht.VROUW, Graad.WIT, RolType.LESGEVER);
  46.  
  47. Lid lid3 = new Lid("Mout", "Pessemier", "mp12345", "0234567890", "053248216", "Bertha De Dekenlaan", 14, 9320, "Erembodegen", "België", "mout.pessemier@student.hogent.be",
  48. "ouders.mout@telenet.be", new GregorianCalendar(1999, 6, 14), new GregorianCalendar(2007, 11, 8), new ArrayList<>(), Geslacht.MAN, Graad.DAN12, RolType.BEHEERDER);
  49.  
  50. dc.voegLidToe(lid0);
  51. dc.voegLidToe(lid1);
  52. dc.voegLidToe(lid2);
  53. dc.voegLidToe(lid3);
  54. MainPanel root = new MainPanel(dc);
  55.  
  56. Scene scene = new Scene(root);
  57.  
  58. primaryStage.setTitle("Taijitan Jiu Jitsu");
  59. primaryStage.setScene(scene);
  60. primaryStage.show();
  61.  
  62. //Setting stage and root on max width and max height.
  63. primaryStage.setMaximized(true);
  64. root.setPrefSize(FullScreenResolution.getWidth(), FullScreenResolution.getHeight());
  65. }
  66.  
  67. /**
  68. * @param args the command line arguments
  69. */
  70. public static void main(String[] args) {
  71. launch(args);
  72. }
  73.  
  74. }
Add Comment
Please, Sign In to add comment