AboutUsPopUp.java 3.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  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(Util.loadImage(this,"/Images/Dummy_House.png",30,30));
  49. setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
  50. setBounds(100, 100, 500, 800);
  51. setLocationRelativeTo(parentFrame);
  52. contentPanel.add(Box.createRigidArea(new Dimension(0, 15)));
  53. contentPanel.add(titel);
  54. contentPanel.add(Box.createRigidArea(new Dimension(0, 15)));
  55. contentPanel.add(description);
  56. contentPanel.add(Box.createRigidArea(new Dimension(0, 60)));
  57. getContentPane().add(contentPanel, BorderLayout.NORTH);
  58. contentPanel2.add(h1);
  59. contentPanel2.add(namesManagement);
  60. contentPanel2.add(Box.createRigidArea(new Dimension(0, 50)));
  61. contentPanel2.add(h2);
  62. contentPanel2.add(namesDevelopers);
  63. contentPanel2.add(Box.createRigidArea(new Dimension(0, 50)));
  64. contentPanel2.add(h3);
  65. contentPanel2.add(namesDocumentation);
  66. contentPanel2.add(Box.createRigidArea(new Dimension(0, 50)));
  67. contentPanel2.add(h4);
  68. contentPanel2.add(namesCollaborators);
  69. contentPanel2.add(Box.createRigidArea(new Dimension(0, 50)));
  70. contentPanel2.add(credits);
  71. getContentPane().add(contentPanel2, BorderLayout.CENTER);
  72. contentPanel3.add(Box.createRigidArea(new Dimension(0, 50)));
  73. //contentPanel3.add(namesDevelopers);
  74. getContentPane().add(contentPanel3, BorderLayout.SOUTH);
  75. }
  76. }