AboutUsPopUp.java 3.7 KB

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