1
2
3
4
5
6
7 package zeus.generator.task;
8 import zeus.concepts.*;
9 /***
10 *
11 * @author thompss
12 */
13 public class InformationPanel extends javax.swing.JPanel {
14
15 AbstractTask task;
16 /*** Creates new form InformationPanel */
17 public InformationPanel(AbstractTask task) {
18 initComponents();
19 this.task = task;
20 taskInfoArea.setText(task.getTextInfo());
21 phoneTextArea.setText (task.getPhoneInfo());
22 faxTextArea.setText (task.getFaxInfo());
23 emailTextArea.setText (task.getEmailInfo());
24 physicalTextArea.setText (task.getPhysicalInfo());
25 geoTextArea.setText (task.getGeoInfo());
26
27 }
28
29 /*** This method is called from within the constructor to
30 * initialize the form.
31 * WARNING: Do NOT modify this code. The content of this method is
32 * always regenerated by the Form Editor.
33 */
34 private void initComponents() {
35 java.awt.GridBagConstraints gridBagConstraints;
36
37 PanelLabel = new java.awt.Label();
38 taskInfoLabel = new java.awt.Label();
39 taskInfoArea = new javax.swing.JTextArea();
40 saveButton = new javax.swing.JButton();
41 phoneLabel = new java.awt.Label();
42 phoneTextArea = new javax.swing.JTextArea();
43 faxLabel = new java.awt.Label();
44 faxTextArea = new javax.swing.JTextArea();
45 emailLabel = new java.awt.Label();
46 emailTextArea = new javax.swing.JTextArea();
47 physicalLabel = new java.awt.Label();
48 physicalTextArea = new javax.swing.JTextArea();
49 geoTextArea = new javax.swing.JTextArea();
50 geoLabel = new java.awt.Label();
51 jSeparator1 = new javax.swing.JSeparator();
52 jSeparator2 = new javax.swing.JSeparator();
53 jSeparator3 = new javax.swing.JSeparator();
54
55 setLayout(new java.awt.GridBagLayout());
56
57 PanelLabel.setFont(new java.awt.Font("Arial Black", 0, 18));
58 PanelLabel.setText("Service Description");
59 gridBagConstraints = new java.awt.GridBagConstraints();
60 gridBagConstraints.gridwidth = 2;
61 gridBagConstraints.insets = new java.awt.Insets(12, 0, 12, 0);
62 add(PanelLabel, gridBagConstraints);
63
64 taskInfoLabel.setText("profile:textDescription");
65 gridBagConstraints = new java.awt.GridBagConstraints();
66 gridBagConstraints.gridx = 0;
67 gridBagConstraints.gridy = 2;
68 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
69 add(taskInfoLabel, gridBagConstraints);
70
71 taskInfoArea.setColumns(20);
72 taskInfoArea.setRows(1);
73 taskInfoArea.setToolTipText("Enter textual task description");
74 taskInfoArea.addKeyListener(new java.awt.event.KeyAdapter() {
75 public void keyTyped(java.awt.event.KeyEvent evt) {
76 taskInfoAreaKeyTyped(evt);
77 }
78 });
79
80 gridBagConstraints = new java.awt.GridBagConstraints();
81 gridBagConstraints.gridx = 1;
82 gridBagConstraints.gridy = 2;
83 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
84 add(taskInfoArea, gridBagConstraints);
85
86 saveButton.setText("Save");
87 saveButton.addMouseListener(new java.awt.event.MouseAdapter() {
88 public void mousePressed(java.awt.event.MouseEvent evt) {
89 saveButtonMousePressed(evt);
90 }
91 });
92
93 gridBagConstraints = new java.awt.GridBagConstraints();
94 gridBagConstraints.gridx = 1;
95 gridBagConstraints.gridy = 14;
96 gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
97 add(saveButton, gridBagConstraints);
98
99 phoneLabel.setText("profile:phone");
100 gridBagConstraints = new java.awt.GridBagConstraints();
101 gridBagConstraints.gridx = 0;
102 gridBagConstraints.gridy = 3;
103 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
104 add(phoneLabel, gridBagConstraints);
105
106 phoneTextArea.setColumns(20);
107 phoneTextArea.setRows(1);
108 phoneTextArea.setToolTipText("enter the phone number for your service (could be null)");
109 gridBagConstraints = new java.awt.GridBagConstraints();
110 gridBagConstraints.gridx = 1;
111 gridBagConstraints.gridy = 3;
112 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
113 add(phoneTextArea, gridBagConstraints);
114
115 faxLabel.setText("profile:fax");
116 gridBagConstraints = new java.awt.GridBagConstraints();
117 gridBagConstraints.gridx = 0;
118 gridBagConstraints.gridy = 4;
119 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
120 add(faxLabel, gridBagConstraints);
121
122 faxTextArea.setColumns(20);
123 faxTextArea.setRows(1);
124 faxTextArea.setToolTipText(" (could be null)");
125 gridBagConstraints = new java.awt.GridBagConstraints();
126 gridBagConstraints.gridx = 1;
127 gridBagConstraints.gridy = 4;
128 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
129 add(faxTextArea, gridBagConstraints);
130
131 emailLabel.setText("profile:email");
132 gridBagConstraints = new java.awt.GridBagConstraints();
133 gridBagConstraints.gridx = 0;
134 gridBagConstraints.gridy = 5;
135 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
136 add(emailLabel, gridBagConstraints);
137
138 emailTextArea.setColumns(20);
139 emailTextArea.setRows(1);
140 emailTextArea.setToolTipText("insert the services email@address");
141 gridBagConstraints = new java.awt.GridBagConstraints();
142 gridBagConstraints.gridx = 1;
143 gridBagConstraints.gridy = 5;
144 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
145 add(emailTextArea, gridBagConstraints);
146
147 physicalLabel.setText("profile:physicalAddress");
148 gridBagConstraints = new java.awt.GridBagConstraints();
149 gridBagConstraints.gridx = 0;
150 gridBagConstraints.gridy = 6;
151 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
152 add(physicalLabel, gridBagConstraints);
153
154 physicalTextArea.setColumns(20);
155 physicalTextArea.setRows(1);
156 physicalTextArea.setToolTipText("Enter the physical address of the service");
157 gridBagConstraints = new java.awt.GridBagConstraints();
158 gridBagConstraints.gridx = 1;
159 gridBagConstraints.gridy = 6;
160 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
161 add(physicalTextArea, gridBagConstraints);
162
163 geoTextArea.setColumns(20);
164 geoTextArea.setRows(1);
165 gridBagConstraints = new java.awt.GridBagConstraints();
166 gridBagConstraints.gridx = 1;
167 gridBagConstraints.gridy = 8;
168 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
169 add(geoTextArea, gridBagConstraints);
170
171 geoLabel.setText("profile:geographicRadius");
172 gridBagConstraints = new java.awt.GridBagConstraints();
173 gridBagConstraints.gridx = 0;
174 gridBagConstraints.gridy = 8;
175 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
176 add(geoLabel, gridBagConstraints);
177
178 gridBagConstraints = new java.awt.GridBagConstraints();
179 gridBagConstraints.gridx = 0;
180 gridBagConstraints.gridy = 7;
181 gridBagConstraints.gridwidth = 2;
182 gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
183 gridBagConstraints.insets = new java.awt.Insets(18, 0, 16, 0);
184 add(jSeparator1, gridBagConstraints);
185
186 gridBagConstraints = new java.awt.GridBagConstraints();
187 gridBagConstraints.gridx = 0;
188 gridBagConstraints.gridy = 1;
189 gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
190 gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
191 gridBagConstraints.ipadx = 36;
192 gridBagConstraints.insets = new java.awt.Insets(15, 0, 15, 0);
193 add(jSeparator2, gridBagConstraints);
194
195 gridBagConstraints = new java.awt.GridBagConstraints();
196 gridBagConstraints.gridx = 0;
197 gridBagConstraints.gridy = 10;
198 gridBagConstraints.gridwidth = 2;
199 gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
200 gridBagConstraints.insets = new java.awt.Insets(31, 0, 31, 0);
201 add(jSeparator3, gridBagConstraints);
202
203 }
204
205 private void saveButtonMousePressed(java.awt.event.MouseEvent evt) {
206 task.setTextInfo(taskInfoArea.getText());
207 task.setPhoneInfo(phoneTextArea.getText());
208 task.setFaxInfo(faxTextArea.getText());
209 task.setEmailInfo(emailTextArea.getText());
210 task.setPhysicalInfo(physicalTextArea.getText());
211 task.setGeoInfo(geoTextArea.getText());
212 }
213
214 private void taskInfoAreaKeyTyped(java.awt.event.KeyEvent evt) {
215
216 }
217
218
219
220 private javax.swing.JSeparator jSeparator3;
221 private java.awt.Label emailLabel;
222 private javax.swing.JSeparator jSeparator2;
223 private javax.swing.JSeparator jSeparator1;
224 private java.awt.Label PanelLabel;
225 private javax.swing.JTextArea phoneTextArea;
226 private java.awt.Label phoneLabel;
227 private java.awt.Label geoLabel;
228 private java.awt.Label taskInfoLabel;
229 private java.awt.Label physicalLabel;
230 private javax.swing.JTextArea faxTextArea;
231 private java.awt.Label faxLabel;
232 private javax.swing.JTextArea emailTextArea;
233 private javax.swing.JTextArea physicalTextArea;
234 private javax.swing.JButton saveButton;
235 private javax.swing.JTextArea geoTextArea;
236 private javax.swing.JTextArea taskInfoArea;
237
238
239 }