AboutUsPopUp.java 3.6 KB

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