AboutUsPopUp.java 3.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. package ui.view;
  2. import javax.swing.*;
  3. import java.awt.*;
  4. /**
  5. * AboutUs Pop Up Window.
  6. *
  7. * @author Gruppe14
  8. */
  9. public class AboutUsPopUp extends JFrame {
  10. /**
  11. * Serial.
  12. */
  13. private static final long serialVersionUID = 1L;
  14. private final JPanel contentPanel = new JPanel();
  15. private final JPanel contentPanel2 = new JPanel();
  16. private final JPanel contentPanel3 = new JPanel();
  17. private JLabel titel = new JLabel("HOLEG Simulator");
  18. private JLabel h1 = new JLabel("Project Management & Architect");
  19. private JLabel h2 = new JLabel("Software Developers");
  20. private JLabel h3 = new JLabel("Documentation");
  21. private JLabel h4 = new JLabel("Additional Collaborators");
  22. private JLabel description = new JLabel("A discrete-time simulator for modeling Smart Grids that follow a Holon-based model.");
  23. private JLabel namesManagement = new JLabel("C. Garcia Cordero");
  24. private JLabel namesDevelopersUntilV2 = new JLabel("K. Trometer, D. Rieder, T. Zheng, J. Widhalm, E. Palza, I. Dix");
  25. private JLabel namesDevelopersV2_1= new JLabel("A.T. Meyer-Berg, A. Schneider, T. Troppmann and L. Tietze");
  26. private JLabel namesDocumentation = new JLabel("E. Palza, C. Garcia Cordero");
  27. private JLabel namesCollaborators = new JLabel("R. Egert and F. Volk");
  28. private JLabel credits = new JLabel();
  29. /**
  30. * Constructor
  31. */
  32. public AboutUsPopUp(JFrame parentFrame) {
  33. super(Languages.getLanguage()[14]);
  34. // Set fonts
  35. Font fontTitle = new Font("Titel", 2, 35);
  36. titel.setFont(fontTitle);
  37. titel.setBounds(150, 30, 100, 20);
  38. Font headerFont = new Font("Header", 2, 20);
  39. h1.setFont(headerFont);
  40. h2.setFont(headerFont);
  41. h3.setFont(headerFont);
  42. h4.setFont(headerFont);
  43. // Set labels
  44. titel.setHorizontalAlignment(JLabel.CENTER);
  45. // Set layout
  46. contentPanel.setLayout(new BoxLayout(contentPanel, BoxLayout.Y_AXIS));
  47. contentPanel2.setLayout(new BoxLayout(contentPanel2, BoxLayout.Y_AXIS));
  48. contentPanel3.setLayout(new BoxLayout(contentPanel3, BoxLayout.Y_AXIS));
  49. this.setIconImage(Util.loadImage(this,"/Images/Holeg.png",30,30));
  50. setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
  51. setBounds(100, 100, 500, 800);
  52. setLocationRelativeTo(parentFrame);
  53. contentPanel.add(Box.createRigidArea(new Dimension(0, 15)));
  54. contentPanel.add(titel);
  55. contentPanel.add(Box.createRigidArea(new Dimension(0, 15)));
  56. contentPanel.add(description);
  57. contentPanel.add(Box.createRigidArea(new Dimension(0, 60)));
  58. getContentPane().add(contentPanel, BorderLayout.NORTH);
  59. contentPanel2.add(h1);
  60. contentPanel2.add(namesManagement);
  61. contentPanel2.add(Box.createRigidArea(new Dimension(0, 50)));
  62. contentPanel2.add(h2);
  63. contentPanel2.add(namesDevelopersUntilV2);
  64. contentPanel2.add(namesDevelopersV2_1);
  65. contentPanel2.add(Box.createRigidArea(new Dimension(0, 50)));
  66. contentPanel2.add(h3);
  67. contentPanel2.add(namesDocumentation);
  68. contentPanel2.add(Box.createRigidArea(new Dimension(0, 50)));
  69. contentPanel2.add(h4);
  70. contentPanel2.add(namesCollaborators);
  71. contentPanel2.add(Box.createRigidArea(new Dimension(0, 50)));
  72. contentPanel2.add(credits);
  73. getContentPane().add(contentPanel2, BorderLayout.CENTER);
  74. contentPanel3.add(Box.createRigidArea(new Dimension(0, 50)));
  75. //contentPanel3.add(namesDevelopers);
  76. getContentPane().add(contentPanel3, BorderLayout.SOUTH);
  77. }
  78. }