AboutUsPopUp.java 3.7 KB

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