AboutUsPopUp.java 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  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("Cyber Physical Systems");
  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 namesDevelopers = new JLabel("K. Trometer, D. Rieder, T. Zheng, J. Widhalm, E. Palza and I. Dix");
  25. private JLabel namesDocumentation = new JLabel("E. Palza, C. Garcia Cordero");
  26. private JLabel namesCollaborators = new JLabel("R. Egert and F. Volk");
  27. private JLabel credits = new JLabel();
  28. /**
  29. * Constructor
  30. */
  31. public AboutUsPopUp(JFrame parentFrame) {
  32. super(Languages.getLanguage()[14]);
  33. // Set fonts
  34. Font fontTitle = new Font("Titel", 2, 35);
  35. titel.setFont(fontTitle);
  36. titel.setBounds(150, 30, 100, 20);
  37. Font headerFont = new Font("Header", 2, 20);
  38. h1.setFont(headerFont);
  39. h2.setFont(headerFont);
  40. h3.setFont(headerFont);
  41. h4.setFont(headerFont);
  42. // Set labels
  43. titel.setHorizontalAlignment(JLabel.CENTER);
  44. // Set layout
  45. contentPanel.setLayout(new BoxLayout(contentPanel, BoxLayout.Y_AXIS));
  46. contentPanel2.setLayout(new BoxLayout(contentPanel2, BoxLayout.Y_AXIS));
  47. contentPanel3.setLayout(new BoxLayout(contentPanel3, BoxLayout.Y_AXIS));
  48. this.setIconImage(new ImageIcon(this.getClass().getResource("/Images/Dummy_House.png")).getImage()
  49. .getScaledInstance(30, 30, Image.SCALE_SMOOTH));
  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(namesDevelopers);
  64. contentPanel2.add(Box.createRigidArea(new Dimension(0, 50)));
  65. contentPanel2.add(h3);
  66. contentPanel2.add(namesDocumentation);
  67. contentPanel2.add(Box.createRigidArea(new Dimension(0, 50)));
  68. contentPanel2.add(h4);
  69. contentPanel2.add(namesCollaborators);
  70. contentPanel2.add(Box.createRigidArea(new Dimension(0, 50)));
  71. contentPanel2.add(credits);
  72. getContentPane().add(contentPanel2, BorderLayout.CENTER);
  73. contentPanel3.add(Box.createRigidArea(new Dimension(0, 50)));
  74. //contentPanel3.add(namesDevelopers);
  75. getContentPane().add(contentPanel3, BorderLayout.SOUTH);
  76. }
  77. }