source: src/main/java/genius/gui/About.java@ 1

Last change on this file since 1 was 1, checked in by Wouter Pasman, 7 years ago

Initial import : Genius 9.0.0

File size: 8.5 KB
Line 
1package genius.gui;
2
3import java.awt.Cursor;
4import java.awt.Desktop;
5import java.awt.Dimension;
6import java.awt.Toolkit;
7import java.awt.event.MouseAdapter;
8import java.awt.event.MouseEvent;
9import java.net.URI;
10
11import javax.swing.Icon;
12import javax.swing.ImageIcon;
13
14/**
15 * The about menu created using Netbeans.
16 *
17 * @author Mark Hendrikx
18 */
19public class About extends javax.swing.JFrame {
20
21 public static final String VERSION = "9.0.0";
22 private javax.swing.JLabel contributorsLabel;
23 private javax.swing.JTextArea contributorsValueLabel;
24 private javax.swing.JScrollPane contributorsValueScrollPane;
25 private javax.swing.JTextArea geniusDescription;
26 private javax.swing.JScrollPane geniusDescriptionScrollPane;
27 private javax.swing.JLabel logo;
28 private javax.swing.JLabel productVersionLabel;
29 private javax.swing.JLabel productVersionValueLable;
30 private javax.swing.JLabel websiteLabel;
31 private javax.swing.JLabel websiteValueLabel;
32 private final String GENIUSLINK = "http://mmi.tudelft.nl/negotiation/index.php/Genius";
33
34 /**
35 * Creates new form About
36 */
37 public About() {
38 Toolkit tk = Toolkit.getDefaultToolkit();
39 Dimension screenSize = tk.getScreenSize();
40 this.setLocation(screenSize.width / 4, screenSize.height / 4);
41 initComponents();
42 }
43
44 // <editor-fold defaultstate="collapsed" desc="Generated Code">
45 private void initComponents() {
46
47 contributorsValueScrollPane = new javax.swing.JScrollPane();
48 contributorsValueLabel = new javax.swing.JTextArea();
49 logo = new javax.swing.JLabel();
50 productVersionLabel = new javax.swing.JLabel();
51 websiteLabel = new javax.swing.JLabel();
52 contributorsLabel = new javax.swing.JLabel();
53 productVersionValueLable = new javax.swing.JLabel();
54 websiteValueLabel = new javax.swing.JLabel();
55 geniusDescriptionScrollPane = new javax.swing.JScrollPane();
56 geniusDescription = new javax.swing.JTextArea();
57
58 setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
59 setResizable(false);
60
61 contributorsValueScrollPane.setBackground(new java.awt.Color(255, 255, 255));
62
63 contributorsValueLabel.setEditable(false);
64 contributorsValueLabel.setColumns(20);
65 contributorsValueLabel.setFont(new java.awt.Font("Calibri", 0, 14)); // NOI18N
66 contributorsValueLabel.setLineWrap(true);
67 contributorsValueLabel.setRows(5);
68 contributorsValueLabel.setText(
69 "R. Aydogan\nT. Baarslag\nA. Dirkzwager\nM. Hendrikx\nK. Hindriks\nW. Pasman\nD. Tykhonov\nD. Festen\nand others...");
70 contributorsValueLabel.setWrapStyleWord(true);
71 contributorsValueLabel.setOpaque(false);
72 contributorsValueScrollPane.setViewportView(contributorsValueLabel);
73
74 Icon icon = new ImageIcon(getClass().getClassLoader().getResource("genius/gui/resources/GeniusLogo.png"));
75 logo.setIcon(icon); // NOI18N
76
77 productVersionLabel.setFont(new java.awt.Font("Calibri", 1, 18)); // NOI18N
78 productVersionLabel.setText("Production version:");
79
80 websiteLabel.setFont(new java.awt.Font("Calibri", 1, 18)); // NOI18N
81 websiteLabel.setText("Website:");
82
83 contributorsLabel.setFont(new java.awt.Font("Calibri", 1, 18)); // NOI18N
84 contributorsLabel.setText("Contributors:");
85
86 productVersionValueLable.setFont(new java.awt.Font("Calibri", 0, 18)); // NOI18N
87 productVersionValueLable.setText(VERSION);
88
89 websiteValueLabel.setFont(new java.awt.Font("Calibri", 0, 18)); // NOI18N
90 websiteValueLabel.setText("<html><a href=\"\">" + GENIUSLINK + "</a></html>");
91 websiteValueLabel.setCursor(new Cursor(Cursor.HAND_CURSOR));
92 websiteValueLabel.addMouseListener(new MouseAdapter() {
93 @Override
94 public void mouseClicked(MouseEvent e) {
95 try {
96 Desktop.getDesktop().browse(new URI(GENIUSLINK));
97 } catch (Exception e2) {
98 }
99 }
100 });
101
102 geniusDescriptionScrollPane.setBackground(new java.awt.Color(255, 255, 255));
103 geniusDescription.setFocusable(false);
104
105 geniusDescription.setEditable(false);
106 geniusDescription.setColumns(20);
107 geniusDescription.setFont(new java.awt.Font("Calibri", 0, 20)); // NOI18N
108 geniusDescription.setLineWrap(true);
109 geniusDescription.setRows(5);
110 geniusDescription.setText(
111 "Genius is a negotiation environment that implements an open architecture for heterogeneous negotiating agents. Genius can be used to implement, or simulate, real life negotiations. This version includes a set of scenarios, negotiation strategies, and quality measures to quantify the performance of an agent.");
112 geniusDescription.setWrapStyleWord(true);
113 geniusDescription.setOpaque(false);
114 geniusDescriptionScrollPane.setViewportView(geniusDescription);
115
116 javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
117 getContentPane().setLayout(layout);
118 layout.setHorizontalGroup(
119 layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
120 .addGroup(layout.createSequentialGroup().addContainerGap().addGroup(
121 layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(
122 javax.swing.GroupLayout.Alignment.TRAILING,
123 layout.createSequentialGroup().addGap(0, 0, Short.MAX_VALUE).addComponent(logo,
124 javax.swing.GroupLayout.PREFERRED_SIZE, 582,
125 javax.swing.GroupLayout.PREFERRED_SIZE))
126 .addGroup(layout
127 .createSequentialGroup().addGroup(layout.createParallelGroup(
128 javax.swing.GroupLayout.Alignment.LEADING)
129 .addComponent(geniusDescriptionScrollPane).addGroup(
130 layout.createSequentialGroup().addComponent(
131 contributorsLabel)
132 .addPreferredGap(
133 javax.swing.LayoutStyle.ComponentPlacement.RELATED,
134 javax.swing.GroupLayout.DEFAULT_SIZE,
135 Short.MAX_VALUE)
136 .addComponent(
137 contributorsValueScrollPane,
138 javax.swing.GroupLayout.PREFERRED_SIZE,
139 442,
140 javax.swing.GroupLayout.PREFERRED_SIZE))
141 .addGroup(layout.createSequentialGroup()
142 .addGroup(layout
143 .createParallelGroup(
144 javax.swing.GroupLayout.Alignment.LEADING)
145 .addGroup(layout.createSequentialGroup()
146 .addComponent(productVersionLabel)
147 .addPreferredGap(
148 javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
149 .addComponent(productVersionValueLable,
150 javax.swing.GroupLayout.PREFERRED_SIZE,
151 43,
152 javax.swing.GroupLayout.PREFERRED_SIZE))
153 .addGroup(layout.createSequentialGroup()
154 .addComponent(websiteLabel)
155 .addPreferredGap(
156 javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
157 .addComponent(websiteValueLabel,
158 javax.swing.GroupLayout.PREFERRED_SIZE,
159 390,
160 javax.swing.GroupLayout.PREFERRED_SIZE)))
161 .addGap(0, 0, Short.MAX_VALUE)))
162 .addContainerGap()))));
163 layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
164 .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup().addContainerGap()
165 .addComponent(logo, javax.swing.GroupLayout.PREFERRED_SIZE, 234,
166 javax.swing.GroupLayout.PREFERRED_SIZE)
167 .addGap(13, 13, 13)
168 .addComponent(geniusDescriptionScrollPane, javax.swing.GroupLayout.PREFERRED_SIZE,
169 javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
170 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
171 .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
172 .addComponent(productVersionLabel).addComponent(productVersionValueLable))
173 .addGap(18, 18, 18)
174 .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
175 .addComponent(websiteLabel).addComponent(websiteValueLabel))
176 .addGap(18, 18, 18)
177 .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
178 .addComponent(contributorsLabel).addComponent(contributorsValueScrollPane,
179 javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
180 javax.swing.GroupLayout.PREFERRED_SIZE))
181 .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));
182 setTitle("About");
183 pack();
184 }// </editor-fold>
185}
Note: See TracBrowser for help on using the repository browser.