1 package test;
2
3 import java.awt.BorderLayout;
4 import javax.swing.JPanel;
5 import javax.swing.JLabel;
6 import javax.swing.JScrollPane;
7
8 import net.sourceforge.jsh3modtool.mod.GameMod;
9 import javax.swing.JTextArea;
10
11 /***
12 * @author redsolo
13 */
14 public class ModSummary extends JPanel
15 {
16 private GameMod gameMod;
17 private JScrollPane modSummaryScrollPane = null;
18 private JLabel modNameLabel = null;
19
20 private JTextArea jTextArea = null;
21 /***
22 * This is the default constructor
23 */
24 public ModSummary(GameMod gamemod)
25 {
26 super();
27 gameMod = gamemod;
28 initialize();
29 }
30
31 /***
32 * This method initializes this
33 *
34 * @return void
35 */
36 private void initialize() {
37 modNameLabel = new JLabel();
38 this.setLayout(new BorderLayout());
39 this.setSize(342, 264);
40 modNameLabel.setText("blaj");
41 modNameLabel.setFont(new java.awt.Font("Dialog", java.awt.Font.BOLD, 18));
42 this.add(getModSummaryScrollPane(), java.awt.BorderLayout.CENTER);
43 this.add(modNameLabel, java.awt.BorderLayout.NORTH);
44 }
45 /***
46 * This method initializes jScrollPane
47 *
48 * @return javax.swing.JScrollPane
49 */
50 private JScrollPane getModSummaryScrollPane() {
51 if (modSummaryScrollPane == null) {
52 modSummaryScrollPane = new JScrollPane();
53 modSummaryScrollPane.setVerticalScrollBarPolicy(javax.swing.JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
54 modSummaryScrollPane.setViewportView(getJTextArea());
55 }
56 return modSummaryScrollPane;
57 }
58 /***
59 * This method initializes jTextArea
60 *
61 * @return javax.swing.JTextArea
62 */
63 private JTextArea getJTextArea() {
64 if (jTextArea == null) {
65 jTextArea = new JTextArea();
66 jTextArea.setLineWrap(true);
67 jTextArea.setWrapStyleWord(true);
68 jTextArea.setEditable(false);
69 }
70 return jTextArea;
71 }
72 }