AboutUsPopUp.java 3.6 KB

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