]>
Commit | Line | Data |
---|---|---|
06a19cee | 1 | /** @file\r |
2 | \r | |
3f62225f | 3 | The file is used to create, update Ppi section of the MSA file\r |
06a19cee | 4 | \r |
5 | Copyright (c) 2006, Intel Corporation\r | |
6 | All rights reserved. This program and the accompanying materials\r | |
7 | are licensed and made available under the terms and conditions of the BSD License\r | |
8 | which accompanies this distribution. The full text of the license may be found at\r | |
9 | http://opensource.org/licenses/bsd-license.php\r | |
10 | \r | |
11 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r | |
12 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r | |
13 | \r | |
14 | **/\r | |
15 | package org.tianocore.frameworkwizard.module.ui.dialog;\r | |
16 | \r | |
17 | import java.awt.event.ActionEvent;\r | |
18 | import java.awt.event.ItemEvent;\r | |
19 | import java.awt.event.ItemListener;\r | |
20 | import java.util.Vector;\r | |
21 | \r | |
22 | import javax.swing.JButton;\r | |
23 | import javax.swing.JComboBox;\r | |
24 | import javax.swing.JLabel;\r | |
25 | import javax.swing.JPanel;\r | |
26 | import javax.swing.JScrollPane;\r | |
27 | import javax.swing.JTextField;\r | |
5101eff9 | 28 | import javax.swing.JTextArea;\r |
06a19cee | 29 | \r |
30 | import org.tianocore.frameworkwizard.common.DataType;\r | |
31 | import org.tianocore.frameworkwizard.common.DataValidation;\r | |
32 | import org.tianocore.frameworkwizard.common.EnumerationData;\r | |
33 | import org.tianocore.frameworkwizard.common.Log;\r | |
34 | import org.tianocore.frameworkwizard.common.Tools;\r | |
35 | import org.tianocore.frameworkwizard.common.ui.ArchCheckBox;\r | |
36 | import org.tianocore.frameworkwizard.common.ui.IDialog;\r | |
37 | import org.tianocore.frameworkwizard.common.ui.IFrame;\r | |
38 | import org.tianocore.frameworkwizard.common.ui.StarLabel;\r | |
c25ad66c | 39 | import org.tianocore.frameworkwizard.module.Identifications.ModuleIdentification;\r |
06a19cee | 40 | import org.tianocore.frameworkwizard.module.Identifications.Ppis.PpisIdentification;\r |
c25ad66c | 41 | import org.tianocore.frameworkwizard.packaging.PackageIdentification;\r |
06a19cee | 42 | import org.tianocore.frameworkwizard.workspace.WorkspaceTools;\r |
43 | \r | |
44 | /**\r | |
9e857952 | 45 | * The class is used to create, update Ppi section of the MSA file\r |
46 | * \r | |
47 | * It extends IDialog\r | |
5101eff9 | 48 | * \r |
49 | */\r | |
06a19cee | 50 | public class PpisDlg extends IDialog implements ItemListener {\r |
51 | \r | |
a929458e | 52 | // /\r |
53 | // / Define class Serial Version UID\r | |
54 | // /\r | |
55 | private static final long serialVersionUID = -4284901202357037724L;\r | |
06a19cee | 56 | \r |
a929458e | 57 | //\r |
58 | // Define class members\r | |
59 | //\r | |
60 | private JPanel jContentPane = null;\r | |
06a19cee | 61 | \r |
a929458e | 62 | private JLabel jLabelC_Name = null;\r |
06a19cee | 63 | \r |
a929458e | 64 | private JComboBox jComboBoxCName = null;\r |
06a19cee | 65 | \r |
a929458e | 66 | private JTextField jTextFieldFeatureFlag = null;\r |
06a19cee | 67 | \r |
a929458e | 68 | private JLabel jLabelFeatureFlag = null;\r |
06a19cee | 69 | \r |
a929458e | 70 | private JLabel jLabelUsage = null;\r |
06a19cee | 71 | \r |
a929458e | 72 | private JComboBox jComboBoxUsage = null;\r |
06a19cee | 73 | \r |
a929458e | 74 | private JLabel jLabelPpiType = null;\r |
06a19cee | 75 | \r |
a929458e | 76 | private StarLabel jStarLabel1 = null;\r |
06a19cee | 77 | \r |
a929458e | 78 | private StarLabel jStarLabel2 = null;\r |
06a19cee | 79 | \r |
a929458e | 80 | private StarLabel jStarLabel3 = null;\r |
06a19cee | 81 | \r |
a929458e | 82 | private JComboBox jComboBoxPpiType = null;\r |
06a19cee | 83 | \r |
a929458e | 84 | private JLabel jLabelArch = null;\r |
06a19cee | 85 | \r |
a929458e | 86 | private JScrollPane jScrollPane = null;\r |
06a19cee | 87 | \r |
a929458e | 88 | private JLabel jLabelHelpText = null;\r |
06a19cee | 89 | \r |
a929458e | 90 | private JTextArea jTextAreaHelpText = null;\r |
06a19cee | 91 | \r |
a929458e | 92 | private JScrollPane jScrollPaneHelpText = null;\r |
06a19cee | 93 | \r |
a929458e | 94 | private ArchCheckBox jArchCheckBox = null;\r |
06a19cee | 95 | \r |
a929458e | 96 | private JButton jButtonOk = null;\r |
06a19cee | 97 | \r |
a929458e | 98 | private JButton jButtonCancel = null;\r |
06a19cee | 99 | \r |
a929458e | 100 | //\r |
101 | // Not used by UI\r | |
102 | //\r | |
103 | private PpisIdentification id = null;\r | |
104 | \r | |
105 | private WorkspaceTools wt = new WorkspaceTools();\r | |
106 | \r | |
107 | private EnumerationData ed = new EnumerationData();\r | |
108 | \r | |
109 | /**\r | |
110 | * This method initializes jComboBoxPpiType\r | |
111 | * \r | |
112 | * @return javax.swing.JComboBox\r | |
113 | */\r | |
114 | private JComboBox getJComboBoxPpiType() {\r | |
115 | if (jComboBoxPpiType == null) {\r | |
116 | jComboBoxPpiType = new JComboBox();\r | |
3f62225f | 117 | jComboBoxPpiType.setBounds(new java.awt.Rectangle(168, 12, 320, 20));\r |
a929458e | 118 | jComboBoxPpiType.setPreferredSize(new java.awt.Dimension(320, 20));\r |
119 | jComboBoxPpiType.addItemListener(this);\r | |
120 | jComboBoxPpiType\r | |
2ee91a39 | 121 | .setToolTipText("<html>PPIs are named by GUID.<br>PPI Notify is consumed via a register PPI Notify mechanism</html>");\r |
a929458e | 122 | }\r |
123 | return jComboBoxPpiType;\r | |
124 | }\r | |
06a19cee | 125 | \r |
a929458e | 126 | /**\r |
127 | * This method initializes jTextFieldC_Name\r | |
128 | * \r | |
129 | * @return javax.swing.JTextField jTextFieldC_Name\r | |
130 | * \r | |
131 | */\r | |
132 | private JComboBox getJComboBoxCName() {\r | |
133 | if (jComboBoxCName == null) {\r | |
134 | jComboBoxCName = new JComboBox();\r | |
3f62225f | 135 | jComboBoxCName.setBounds(new java.awt.Rectangle(168, 37, 320, 20));\r |
a929458e | 136 | jComboBoxCName.setPreferredSize(new java.awt.Dimension(320, 20));\r |
137 | jComboBoxCName.setToolTipText("Select Guid C Name of PPI");\r | |
138 | }\r | |
139 | return jComboBoxCName;\r | |
06a19cee | 140 | }\r |
a929458e | 141 | \r |
142 | /**\r | |
143 | * This method initializes jComboBoxUsage\r | |
144 | * \r | |
145 | * @return javax.swing.JComboBox jComboBoxUsage\r | |
146 | * \r | |
147 | */\r | |
148 | private JComboBox getJComboBoxUsage() {\r | |
149 | if (jComboBoxUsage == null) {\r | |
150 | jComboBoxUsage = new JComboBox();\r | |
3f62225f | 151 | jComboBoxUsage.setBounds(new java.awt.Rectangle(168, 62, 320, 20));\r |
a929458e | 152 | jComboBoxUsage.setPreferredSize(new java.awt.Dimension(320, 20));\r |
153 | jComboBoxUsage\r | |
154 | .setToolTipText("<html><table><tr><td colspan=2 align=center><b>PPI</b></td></tr><tr><td>ALWAYS_CONSUMED</td><td>Module always consumes the PPI</td></tr><tr><td>SOMETIMES_CONSUMED</td><td>Module sometimes consumes the PPI</td></tr><tr><td>ALWAYS_PRODUCED</td><td>Module always produces the PPI</td></tr><tr><td>SOMETIMES_PRODUCED</td><td>Module sometimes produces the PPI</td></tr><tr><td colspan=2 align=center><b>PPI Notify</b></td></tr><tr><td>SOMETIMES_CONSUMED</td><td>Module will consume the PPI if it is produced. Consumption<br>is defined by executing the PPI notify function</td></tr></table></html>");\r | |
155 | }\r | |
156 | return jComboBoxUsage;\r | |
06a19cee | 157 | }\r |
a929458e | 158 | \r |
159 | /**\r | |
160 | * This method initializes jTextFieldFeatureFlag\r | |
161 | * \r | |
162 | * @return javax.swing.JTextField jTextFieldFeatureFlag\r | |
163 | * \r | |
164 | */\r | |
165 | private JTextField getJTextFieldFeatureFlag() {\r | |
166 | if (jTextFieldFeatureFlag == null) {\r | |
167 | jTextFieldFeatureFlag = new JTextField();\r | |
21b42c66 | 168 | jTextFieldFeatureFlag.setBounds(new java.awt.Rectangle(168, 157, 320, 20));\r |
a929458e | 169 | jTextFieldFeatureFlag.setPreferredSize(new java.awt.Dimension(320, 20));\r |
170 | jTextFieldFeatureFlag.setToolTipText("Postfix expression that must evaluate to TRUE or FALSE");\r | |
21b42c66 | 171 | jTextFieldFeatureFlag.setEnabled(false);\r |
a929458e | 172 | }\r |
173 | return jTextFieldFeatureFlag;\r | |
06a19cee | 174 | }\r |
a929458e | 175 | \r |
176 | /**\r | |
177 | * This method initializes jScrollPane\r | |
178 | * \r | |
179 | * @return javax.swing.JScrollPane\r | |
180 | */\r | |
181 | private JScrollPane getJScrollPane() {\r | |
182 | if (jScrollPane == null) {\r | |
183 | jScrollPane = new JScrollPane();\r | |
184 | jScrollPane.setViewportView(getJContentPane());\r | |
185 | }\r | |
186 | return jScrollPane;\r | |
06a19cee | 187 | }\r |
a929458e | 188 | \r |
189 | /**\r | |
190 | * This method initializes jTextAreaHelpText\r | |
191 | * \r | |
192 | * @return javax.swing.JTextArea\r | |
193 | * \r | |
194 | */\r | |
195 | private JTextArea getJTextAreaHelpText() {\r | |
196 | if (jTextAreaHelpText == null) {\r | |
197 | jTextAreaHelpText = new JTextArea();\r | |
198 | jTextAreaHelpText.setLineWrap(true);\r | |
199 | jTextAreaHelpText.setWrapStyleWord(true);\r | |
200 | }\r | |
201 | return jTextAreaHelpText;\r | |
06a19cee | 202 | }\r |
a929458e | 203 | \r |
204 | /**\r | |
205 | * This method initializes jScrollPaneHelpText\r | |
206 | * \r | |
207 | * @return javax.swing.JScrollPane\r | |
208 | * \r | |
209 | */\r | |
210 | private JScrollPane getJScrollPaneHelpText() {\r | |
211 | if (jScrollPaneHelpText == null) {\r | |
212 | jScrollPaneHelpText = new JScrollPane();\r | |
213 | jScrollPaneHelpText.setHorizontalScrollBarPolicy(javax.swing.JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);\r | |
214 | jScrollPaneHelpText.setSize(new java.awt.Dimension(320, 40));\r | |
215 | jScrollPaneHelpText.setPreferredSize(new java.awt.Dimension(320, 40));\r | |
3f62225f | 216 | jScrollPaneHelpText.setLocation(new java.awt.Point(168, 87));\r |
a929458e | 217 | jScrollPaneHelpText.setViewportView(getJTextAreaHelpText());\r |
218 | }\r | |
219 | return jScrollPaneHelpText;\r | |
06a19cee | 220 | }\r |
a929458e | 221 | \r |
222 | /**\r | |
223 | * This method initializes jButtonOk\r | |
224 | * \r | |
225 | * @return javax.swing.JButton\r | |
226 | * \r | |
227 | */\r | |
228 | private JButton getJButtonOk() {\r | |
229 | if (jButtonOk == null) {\r | |
230 | jButtonOk = new JButton();\r | |
3f62225f | 231 | jButtonOk.setBounds(new java.awt.Rectangle(290, 187, 90, 20));\r |
a929458e | 232 | jButtonOk.setText("Ok");\r |
233 | jButtonOk.addActionListener(this);\r | |
234 | }\r | |
235 | return jButtonOk;\r | |
06a19cee | 236 | }\r |
a929458e | 237 | \r |
238 | /**\r | |
239 | * This method initializes jButtonCancel\r | |
240 | * \r | |
241 | * @return javax.swing.JButton\r | |
242 | * \r | |
243 | */\r | |
244 | private JButton getJButtonCancel() {\r | |
245 | if (jButtonCancel == null) {\r | |
246 | jButtonCancel = new JButton();\r | |
3f62225f | 247 | jButtonCancel.setBounds(new java.awt.Rectangle(390, 187, 90, 20));\r |
a929458e | 248 | jButtonCancel.setText("Cancel");\r |
249 | jButtonCancel.addActionListener(this);\r | |
250 | }\r | |
251 | return jButtonCancel;\r | |
5101eff9 | 252 | }\r |
a929458e | 253 | \r |
a929458e | 254 | /**\r |
255 | * This method initializes this\r | |
256 | * \r | |
257 | */\r | |
258 | private void init() {\r | |
3f62225f | 259 | this.setSize(505, 260);\r |
a929458e | 260 | this.setContentPane(getJScrollPane());\r |
261 | this.setTitle("PPI Definitions");\r | |
262 | initFrame();\r | |
263 | this.centerWindow();\r | |
5101eff9 | 264 | }\r |
a929458e | 265 | \r |
266 | /**\r | |
c25ad66c | 267 | This method initializes this Fill values to all fields if these values are\r |
268 | not empty\r | |
269 | \r | |
270 | @param inPpisId\r | |
271 | @param mid\r | |
272 | \r | |
273 | **/\r | |
274 | private void init(PpisIdentification inPpisId, ModuleIdentification mid) {\r | |
a929458e | 275 | init();\r |
276 | this.id = inPpisId;\r | |
277 | \r | |
c25ad66c | 278 | Vector<PackageIdentification> vpid = wt.getPackageDependenciesOfModule(mid);\r |
279 | if (vpid.size() <= 0) {\r | |
280 | Log.wrn("Init Ppi", "This module hasn't defined any package dependency, so there is no ppi can be added");\r | |
281 | }\r | |
282 | \r | |
283 | Tools.generateComboBoxByVector(this.jComboBoxCName,\r | |
284 | wt.getAllPpiDeclarationsFromPackages(wt.getPackageDependenciesOfModule(mid)));\r | |
285 | \r | |
a929458e | 286 | if (this.id != null) {\r |
287 | this.jComboBoxCName.setSelectedItem(id.getName());\r | |
288 | this.jComboBoxPpiType.setSelectedItem(id.getType());\r | |
289 | this.jComboBoxUsage.setSelectedItem(id.getUsage());\r | |
290 | this.jTextAreaHelpText.setText(id.getHelp());\r | |
291 | this.jTextFieldFeatureFlag.setText(id.getFeatureFlag());\r | |
292 | this.jArchCheckBox.setSelectedItems(id.getSupArchList());\r | |
293 | }\r | |
5101eff9 | 294 | }\r |
a929458e | 295 | \r |
296 | /**\r | |
297 | * This is the override edit constructor\r | |
298 | * \r | |
299 | * @param inProtocolsIdentification\r | |
300 | * @param iFrame\r | |
301 | * \r | |
302 | */\r | |
c25ad66c | 303 | public PpisDlg(PpisIdentification inPpisIdentification, IFrame iFrame, ModuleIdentification mid) {\r |
a929458e | 304 | super(iFrame, true);\r |
c25ad66c | 305 | init(inPpisIdentification, mid);\r |
06a19cee | 306 | }\r |
307 | \r | |
a929458e | 308 | /**\r |
309 | * This method initializes jContentPane\r | |
310 | * \r | |
311 | * @return javax.swing.JPanel jContentPane\r | |
312 | * \r | |
313 | */\r | |
314 | private JPanel getJContentPane() {\r | |
315 | if (jContentPane == null) {\r | |
316 | jStarLabel1 = new StarLabel();\r | |
3f62225f | 317 | jStarLabel1.setLocation(new java.awt.Point(2, 12));\r |
a929458e | 318 | jLabelPpiType = new JLabel();\r |
3f62225f | 319 | jLabelPpiType.setBounds(new java.awt.Rectangle(12, 12, 168, 20));\r |
a929458e | 320 | jLabelPpiType.setText("Select Ppi Type");\r |
321 | \r | |
322 | jStarLabel2 = new StarLabel();\r | |
3f62225f | 323 | jStarLabel2.setLocation(new java.awt.Point(2, 37));\r |
a929458e | 324 | jLabelC_Name = new JLabel();\r |
325 | jLabelC_Name.setText("PPI GUID C Name");\r | |
3f62225f | 326 | jLabelC_Name.setBounds(new java.awt.Rectangle(12, 37, 168, 20));\r |
a929458e | 327 | \r |
328 | jStarLabel3 = new StarLabel();\r | |
3f62225f | 329 | jStarLabel3.setLocation(new java.awt.Point(2, 62));\r |
a929458e | 330 | jLabelUsage = new JLabel();\r |
331 | jLabelUsage.setText("Usage");\r | |
3f62225f | 332 | jLabelUsage.setBounds(new java.awt.Rectangle(12, 62, 168, 20));\r |
a929458e | 333 | \r |
334 | jLabelHelpText = new JLabel();\r | |
3f62225f | 335 | jLabelHelpText.setBounds(new java.awt.Rectangle(14, 87, 168, 20));\r |
a929458e | 336 | jLabelHelpText.setText("Help Text");\r |
337 | \r | |
338 | jLabelFeatureFlag = new JLabel();\r | |
339 | jLabelFeatureFlag.setText("Feature Flag Expression");\r | |
21b42c66 | 340 | jLabelFeatureFlag.setBounds(new java.awt.Rectangle(12, 157, 168, 20));\r |
341 | jLabelFeatureFlag.setEnabled(false);\r | |
a929458e | 342 | \r |
343 | jLabelArch = new JLabel();\r | |
21b42c66 | 344 | jLabelArch.setBounds(new java.awt.Rectangle(12, 132, 168, 20));\r |
a929458e | 345 | jLabelArch.setText("Supported Architectures");\r |
346 | jArchCheckBox = new ArchCheckBox();\r | |
21b42c66 | 347 | jArchCheckBox.setBounds(new java.awt.Rectangle(168, 132, 320, 20));\r |
a929458e | 348 | jArchCheckBox.setPreferredSize(new java.awt.Dimension(320, 20));\r |
349 | \r | |
350 | jContentPane = new JPanel();\r | |
351 | jContentPane.setLayout(null);\r | |
3f62225f | 352 | jContentPane.setPreferredSize(new java.awt.Dimension(485, 215));\r |
a929458e | 353 | \r |
354 | jContentPane.add(jStarLabel1, null);\r | |
355 | jContentPane.add(jLabelPpiType, null);\r | |
356 | jContentPane.add(getJComboBoxPpiType(), null);\r | |
357 | jContentPane.add(jStarLabel2, null);\r | |
358 | jContentPane.add(jLabelC_Name, null);\r | |
359 | jContentPane.add(getJComboBoxCName(), null);\r | |
360 | jContentPane.add(jStarLabel3, null);\r | |
361 | jContentPane.add(jLabelUsage, null);\r | |
362 | jContentPane.add(getJComboBoxUsage(), null);\r | |
363 | jContentPane.add(jLabelHelpText, null);\r | |
364 | jContentPane.add(getJScrollPaneHelpText(), null);\r | |
365 | jContentPane.add(jLabelFeatureFlag, null);\r | |
366 | jContentPane.add(getJTextFieldFeatureFlag(), null);\r | |
367 | jContentPane.add(jLabelArch, null);\r | |
368 | jContentPane.add(jArchCheckBox, null);\r | |
369 | jContentPane.add(getJButtonOk(), null);\r | |
370 | jContentPane.add(getJButtonCancel(), null);\r | |
371 | }\r | |
372 | return jContentPane;\r | |
06a19cee | 373 | }\r |
374 | \r | |
a929458e | 375 | /**\r |
376 | * This method initializes Usage type\r | |
377 | * \r | |
378 | */\r | |
379 | private void initFrame() {\r | |
a929458e | 380 | Tools.generateComboBoxByVector(jComboBoxPpiType, ed.getVPpiType());\r |
381 | Tools.generateComboBoxByVector(jComboBoxUsage, ed.getVPpiUsage());\r | |
06a19cee | 382 | }\r |
383 | \r | |
a929458e | 384 | /*\r |
385 | * (non-Javadoc)\r | |
386 | * \r | |
387 | * @see java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent)\r | |
388 | * \r | |
389 | * Override actionPerformed to listen all actions\r | |
390 | * \r | |
391 | */\r | |
392 | public void actionPerformed(ActionEvent arg0) {\r | |
393 | if (arg0.getSource() == jButtonOk) {\r | |
394 | if (checkAdd()) {\r | |
395 | getCurrentPpis();\r | |
396 | this.returnType = DataType.RETURN_TYPE_OK;\r | |
397 | this.setVisible(false);\r | |
398 | }\r | |
399 | }\r | |
400 | \r | |
401 | if (arg0.getSource() == jButtonCancel) {\r | |
402 | this.returnType = DataType.RETURN_TYPE_CANCEL;\r | |
403 | this.setVisible(false);\r | |
404 | }\r | |
06a19cee | 405 | }\r |
406 | \r | |
a929458e | 407 | /**\r |
408 | * Data validation for all fields\r | |
409 | * \r | |
410 | * @retval true - All datas are valid\r | |
411 | * @retval false - At least one data is invalid\r | |
412 | * \r | |
413 | */\r | |
414 | public boolean checkAdd() {\r | |
415 | //\r | |
416 | // Check if all fields have correct data types\r | |
417 | //\r | |
418 | \r | |
419 | //\r | |
420 | // Check Name\r | |
421 | //\r | |
c25ad66c | 422 | if (this.jComboBoxCName.getSelectedItem() == null) {\r |
423 | Log.wrn("Update Ppis", "Please select one Ppi/PpiNotify Name");\r | |
424 | return false;\r | |
425 | }\r | |
426 | \r | |
a929458e | 427 | if (!isEmpty(this.jComboBoxCName.getSelectedItem().toString())) {\r |
428 | if (!DataValidation.isC_NameType(this.jComboBoxCName.getSelectedItem().toString())) {\r | |
429 | Log.wrn("Update Ppis", "Incorrect data type for Ppi/PpiNotify Name");\r | |
430 | return false;\r | |
431 | }\r | |
432 | }\r | |
433 | \r | |
434 | //\r | |
435 | // Check FeatureFlag\r | |
436 | //\r | |
437 | if (!isEmpty(this.jTextFieldFeatureFlag.getText())) {\r | |
438 | if (!DataValidation.isFeatureFlag(this.jTextFieldFeatureFlag.getText())) {\r | |
439 | Log.wrn("Update Ppis", "Incorrect data type for Feature Flag");\r | |
440 | return false;\r | |
441 | }\r | |
442 | }\r | |
443 | \r | |
444 | return true;\r | |
445 | }\r | |
5101eff9 | 446 | \r |
a929458e | 447 | private PpisIdentification getCurrentPpis() {\r |
06a19cee | 448 | String arg0 = this.jComboBoxCName.getSelectedItem().toString();\r |
449 | String arg1 = this.jComboBoxPpiType.getSelectedItem().toString();\r | |
450 | String arg2 = this.jComboBoxUsage.getSelectedItem().toString();\r | |
451 | \r | |
452 | String arg3 = this.jTextFieldFeatureFlag.getText();\r | |
453 | Vector<String> arg4 = this.jArchCheckBox.getSelectedItemsVector();\r | |
5101eff9 | 454 | String arg5 = this.jTextAreaHelpText.getText();\r |
06a19cee | 455 | \r |
456 | id = new PpisIdentification(arg0, arg1, arg2, arg3, arg4, arg5);\r | |
457 | return id;\r | |
a929458e | 458 | } /*\r |
459 | * (non-Javadoc)\r | |
460 | * \r | |
461 | * @see java.awt.event.ItemListener#itemStateChanged(java.awt.event.ItemEvent)\r | |
462 | * \r | |
463 | * Reflesh the frame when selected item changed\r | |
464 | * \r | |
465 | */\r | |
466 | \r | |
467 | public void itemStateChanged(ItemEvent arg0) {\r | |
468 | if (arg0.getSource() == this.jComboBoxPpiType && arg0.getStateChange() == ItemEvent.SELECTED) {\r | |
469 | if (this.jComboBoxPpiType.getSelectedItem().toString().equals(ed.getVPpiType().get(0))) {\r | |
470 | Tools.generateComboBoxByVector(this.jComboBoxUsage, ed.getVPpiUsage());\r | |
471 | } else {\r | |
472 | Tools.generateComboBoxByVector(this.jComboBoxUsage, ed.getVPpiNotifyUsage());\r | |
473 | }\r | |
474 | }\r | |
06a19cee | 475 | }\r |
476 | \r | |
a929458e | 477 | public PpisIdentification getId() {\r |
478 | return id;\r | |
479 | }\r | |
06a19cee | 480 | \r |
a929458e | 481 | public void setId(PpisIdentification id) {\r |
482 | this.id = id;\r | |
483 | }\r | |
06a19cee | 484 | }\r |