22
33import com .sun .istack .internal .NotNull ;
44import com .sun .istack .internal .Nullable ;
5+ import org .petschko .lib .Const ;
56import org .petschko .lib .gui .JImageLabel ;
7+ import org .petschko .lib .gui .JLabelExtra ;
8+ import org .petschko .lib .gui .JPanelLine ;
69
710import javax .swing .BorderFactory ;
11+ import javax .swing .Box ;
12+ import javax .swing .BoxLayout ;
813import javax .swing .JComponent ;
914import javax .swing .JFrame ;
15+ import javax .swing .JLabel ;
1016import javax .swing .JPanel ;
1117import java .awt .BorderLayout ;
1218import java .awt .Component ;
19+ import java .awt .Dimension ;
1320import java .awt .GraphicsEnvironment ;
1421import java .awt .HeadlessException ;
1522
@@ -49,26 +56,76 @@ class GUI_About extends org.petschko.lib.gui.GUI_About {
4956 */
5057 @ Override
5158 protected void constructAbout () {
59+ int lineSpace = 4 ;
60+
5261 // Initial Comps - Panels
5362 JPanel borderFrame = new JPanel ();
5463 JPanel descriptionContainer = new JPanel ();
5564 JPanel logoPanel = new JPanel ();
5665 JPanel okButton = new JPanel ();
5766
5867 // Initial Comps - Labels
68+ JPanelLine versionLine = new JPanelLine ();
69+ JLabelExtra versionHeading = new JLabelExtra ("Version:" );
70+ JLabel version = new JLabel (Config .version );
71+
72+ JPanelLine licenceLine = new JPanelLine ();
73+ JLabelExtra licenceHeading = new JLabelExtra ("Licence:" );
74+ JLabelExtra licence = new JLabelExtra ("MIT-Licence" );
75+ licence .setURL (Config .projectLicenceURL , true );
76+
77+ JPanelLine projectLine = new JPanelLine ();
78+ JLabelExtra projectHpHeading = new JLabelExtra ("Project-HP:" );
79+ JLabelExtra projectHp = new JLabelExtra ("Visit the Project-Page on Github" );
80+ projectHp .setURL (Config .projectPageURL , true );
81+
82+ JPanelLine creditLine = new JPanelLine ();
83+ JLabelExtra creditHeading = new JLabelExtra ("Credits:" );
84+ JPanelLine creatorLine = new JPanelLine ();
85+ JLabel programmedBy = new JLabel (Const .creator + " (Programmer) - " );
86+ JLabelExtra programmedByURL = new JLabelExtra ("Website" );
87+ programmedByURL .setURL (Const .creatorURL , true );
5988
6089 // Set Layouts
6190 borderFrame .setLayout (new BorderLayout ());
62- descriptionContainer .setLayout (new BorderLayout ( ));
91+ descriptionContainer .setLayout (new BoxLayout ( descriptionContainer , BoxLayout . Y_AXIS ));
6392
64- // Set Borders
93+ // Style
94+ versionHeading .setUnderline (true );
95+ licenceHeading .setUnderline (true );
96+ projectHpHeading .setUnderline (true );
97+ creditHeading .setUnderline (true );
6598 borderFrame .setBorder (BorderFactory .createEmptyBorder (15 , 15 , 15 , 15 ));
66- //todo add info and design
99+ descriptionContainer .setBorder (BorderFactory .createEmptyBorder (20 , 0 , 20 , 0 ));
100+
67101 // Add stuff
68102 logoPanel .add (this .imagePanel );
69103 okButton .add (this .closeButton );
70104
105+ versionLine .add (versionHeading );
106+ versionLine .addSpaceDimension (10 );
107+ versionLine .add (version );
108+ licenceLine .add (licenceHeading );
109+ licenceLine .addSpaceDimension (10 );
110+ licenceLine .add (licence );
111+ projectLine .add (projectHpHeading );
112+ projectLine .addSpaceDimension (10 );
113+ projectLine .add (projectHp );
114+ creditLine .add (creditHeading );
115+ creatorLine .add (programmedBy );
116+ creatorLine .add (programmedByURL );
117+
118+ descriptionContainer .add (versionLine );
119+ descriptionContainer .add (Box .createRigidArea (new Dimension (0 , lineSpace )));
120+ descriptionContainer .add (licenceLine );
121+ descriptionContainer .add (Box .createRigidArea (new Dimension (0 , lineSpace )));
122+ descriptionContainer .add (projectLine );
123+ descriptionContainer .add (Box .createRigidArea (new Dimension (0 , lineSpace )));
124+ descriptionContainer .add (creditLine );
125+ descriptionContainer .add (creatorLine );
126+
71127 borderFrame .add (logoPanel , BorderLayout .NORTH );
128+ borderFrame .add (descriptionContainer , BorderLayout .CENTER );
72129 borderFrame .add (okButton , BorderLayout .SOUTH );
73130
74131 this .add (borderFrame );
@@ -95,7 +152,8 @@ protected String closeButtonText() {
95152 protected JImageLabel aboutIcon () {
96153 JImageLabel imagePanel = new JImageLabel (Config .authorImage , true );
97154
98- imagePanel .setImageSize (333 , 250 );
155+ // Ensure this size
156+ imagePanel .setImageSize (200 , 150 );
99157
100158 return imagePanel ;
101159 }
0 commit comments