]> git.proxmox.com Git - mirror_edk2.git/blob - Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleGuids.java
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@671 6f19259b...
[mirror_edk2.git] / Tools / Source / FrameworkWizard / src / org / tianocore / frameworkwizard / module / ui / ModuleGuids.java
1 /** @file
2
3 The file is used to create, update Guids of MSA/MBD file
4
5 Copyright (c) 2006, Intel Corporation
6 All rights reserved. This program and the accompanying materials
7 are licensed and made available under the terms and conditions of the BSD License
8 which accompanies this distribution. The full text of the license may be found at
9 http://opensource.org/licenses/bsd-license.php
10
11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
13
14 **/
15 package org.tianocore.frameworkwizard.module.ui;
16
17 import java.awt.event.ActionEvent;
18 import java.awt.event.ComponentEvent;
19 import java.awt.event.ItemEvent;
20 import java.util.Vector;
21
22 import javax.swing.JButton;
23 import javax.swing.JComboBox;
24 import javax.swing.JLabel;
25 import javax.swing.JPanel;
26 import javax.swing.JScrollPane;
27 import javax.swing.JTextArea;
28 import javax.swing.JTextField;
29
30 import org.tianocore.GuidUsage;
31 import org.tianocore.GuidsDocument;
32 import org.tianocore.GuidsDocument.Guids;
33 import org.tianocore.GuidsDocument.Guids.GuidCNames;
34 import org.tianocore.ModuleSurfaceAreaDocument.ModuleSurfaceArea;
35 import org.tianocore.frameworkwizard.common.DataType;
36 import org.tianocore.frameworkwizard.common.DataValidation;
37 import org.tianocore.frameworkwizard.common.EnumerationData;
38 import org.tianocore.frameworkwizard.common.Log;
39 import org.tianocore.frameworkwizard.common.OpeningModuleType;
40 import org.tianocore.frameworkwizard.common.Tools;
41 import org.tianocore.frameworkwizard.common.ui.IInternalFrame;
42 import org.tianocore.frameworkwizard.common.ui.StarLabel;
43 import org.tianocore.frameworkwizard.common.ui.iCheckBoxList.ICheckBoxList;
44 import org.tianocore.frameworkwizard.module.Identification.Guids.GuidsIdentification;
45 import org.tianocore.frameworkwizard.module.Identification.Guids.GuidsVector;
46 import org.tianocore.frameworkwizard.workspace.WorkspaceTools;
47
48 /**
49 The class is used to create, update Guids of MSA/MBD file
50 It extends IInternalFrame
51
52
53
54 **/
55 public class ModuleGuids extends IInternalFrame {
56
57 ///
58 /// Define class Serial Version UID
59 ///
60 private static final long serialVersionUID = 6710858997766979803L;
61
62 //
63 //Define class members
64 //
65 private JPanel jContentPane = null;
66
67 private JLabel jLabelC_Name = null;
68
69 private JComboBox jComboBoxCName = null;
70
71 private JLabel jLabelUsage = null;
72
73 private JComboBox jComboBoxUsage = null;
74
75 private StarLabel jStarLabel1 = null;
76
77 private StarLabel jStarLabel2 = null;
78
79 private JLabel jLabelFeatureFlag = null;
80
81 private JTextField jTextFieldFeatureFlag = null;
82
83 private JLabel jLabelArch = null;
84
85 private JTextArea jTextAreaList = null;
86
87 private JComboBox jComboBoxList = null;
88
89 private JButton jButtonAdd = null;
90
91 private JButton jButtonRemove = null;
92
93 private JButton jButtonUpdate = null;
94
95 private JScrollPane jScrollPane = null;
96
97 private JScrollPane jScrollPaneList = null;
98
99 private ICheckBoxList iCheckBoxListArch = null;
100
101 private JScrollPane jScrollPaneArch = null;
102
103 private JLabel jLabelHelpText = null;
104
105 private JTextField jTextFieldHelpText = null;
106
107 //
108 // Not used by UI
109 //
110 private int intSelectedItemId = 0;
111
112 private OpeningModuleType omt = null;
113
114 private ModuleSurfaceArea msa = null;
115
116 private GuidsDocument.Guids guids = null;
117
118 private GuidsIdentification id = null;
119
120 private GuidsVector vid = new GuidsVector();
121
122 private EnumerationData ed = new EnumerationData();
123
124 private WorkspaceTools wt = new WorkspaceTools();
125
126 /**
127 This method initializes jTextFieldC_Name
128
129 @return javax.swing.JTextField jTextFieldC_Name
130
131 **/
132 private JComboBox getJComboBoxCName() {
133 if (jComboBoxCName == null) {
134 jComboBoxCName = new JComboBox();
135 jComboBoxCName.setBounds(new java.awt.Rectangle(160, 10, 320, 20));
136 jComboBoxCName.setPreferredSize(new java.awt.Dimension(320, 20));
137 }
138 return jComboBoxCName;
139 }
140
141 /**
142 This method initializes jComboBoxUsage
143
144 @return javax.swing.JComboBox jComboBoxUsage
145
146 **/
147 private JComboBox getJComboBoxUsage() {
148 if (jComboBoxUsage == null) {
149 jComboBoxUsage = new JComboBox();
150 jComboBoxUsage.setBounds(new java.awt.Rectangle(160, 35, 320, 20));
151 jComboBoxUsage.setPreferredSize(new java.awt.Dimension(320, 20));
152 }
153 return jComboBoxUsage;
154 }
155
156 /**
157 This method initializes jTextFieldFeatureFlag
158
159 @return javax.swing.JTextField
160
161 **/
162 private JTextField getJTextFieldFeatureFlag() {
163 if (jTextFieldFeatureFlag == null) {
164 jTextFieldFeatureFlag = new JTextField();
165 jTextFieldFeatureFlag.setBounds(new java.awt.Rectangle(160, 85, 320, 20));
166 jTextFieldFeatureFlag.setPreferredSize(new java.awt.Dimension(320, 20));
167 }
168 return jTextFieldFeatureFlag;
169 }
170
171 /**
172 This method initializes jComboBoxFileList
173
174 @return javax.swing.JComboBox jComboBoxFileList
175
176 **/
177 private JComboBox getJComboBoxList() {
178 if (jComboBoxList == null) {
179 jComboBoxList = new JComboBox();
180 jComboBoxList.setBounds(new java.awt.Rectangle(15, 195, 210, 20));
181 jComboBoxList.addItemListener(this);
182 jComboBoxList.addActionListener(this);
183 jComboBoxList.setPreferredSize(new java.awt.Dimension(210, 20));
184 }
185 return jComboBoxList;
186 }
187
188 /**
189 This method initializes jButtonAdd
190
191 @return javax.swing.JButton jButtonAdd
192
193 **/
194 private JButton getJButtonAdd() {
195 if (jButtonAdd == null) {
196 jButtonAdd = new JButton();
197 jButtonAdd.setBounds(new java.awt.Rectangle(230, 195, 80, 20));
198 jButtonAdd.setText("Add");
199 jButtonAdd.addActionListener(this);
200 jButtonAdd.setPreferredSize(new java.awt.Dimension(80, 20));
201 }
202 return jButtonAdd;
203 }
204
205 /**
206 This method initializes jButtonRemove
207
208 @return javax.swing.JButton jButtonRemove
209
210 **/
211 private JButton getJButtonRemove() {
212 if (jButtonRemove == null) {
213 jButtonRemove = new JButton();
214 jButtonRemove.setBounds(new java.awt.Rectangle(400, 195, 80, 20));
215 jButtonRemove.setText("Remove");
216 jButtonRemove.addActionListener(this);
217 jButtonRemove.setPreferredSize(new java.awt.Dimension(80, 20));
218 }
219 return jButtonRemove;
220 }
221
222 /**
223 This method initializes jButtonUpdate
224
225 @return javax.swing.JButton jButtonUpdate
226
227 **/
228 private JButton getJButtonUpdate() {
229 if (jButtonUpdate == null) {
230 jButtonUpdate = new JButton();
231 jButtonUpdate.setBounds(new java.awt.Rectangle(315, 195, 80, 20));
232 jButtonUpdate.setPreferredSize(new java.awt.Dimension(80, 20));
233 jButtonUpdate.setText("Update");
234 jButtonUpdate.addActionListener(this);
235 }
236 return jButtonUpdate;
237 }
238
239 /**
240 * This method initializes jScrollPaneFileList
241 *
242 * @return javax.swing.JScrollPane
243 */
244 private JScrollPane getJScrollPaneList() {
245 if (jScrollPaneList == null) {
246 jScrollPaneList = new JScrollPane();
247 jScrollPaneList.setBounds(new java.awt.Rectangle(15, 220, 465, 240));
248 jScrollPaneList.setViewportView(getJTextAreaList());
249 jScrollPaneList.setPreferredSize(new java.awt.Dimension(465, 240));
250 }
251 return jScrollPaneList;
252 }
253
254 /**
255 This method initializes jScrollPane
256
257 @return javax.swing.JScrollPane
258 */
259 private JScrollPane getJScrollPane() {
260 if (jScrollPane == null) {
261 jScrollPane = new JScrollPane();
262 jScrollPane.setViewportView(getJContentPane());
263 }
264 return jScrollPane;
265 }
266
267 /**
268 * This method initializes jTextAreaFileList
269 *
270 * @return javax.swing.JTextArea
271 */
272 private JTextArea getJTextAreaList() {
273 if (jTextAreaList == null) {
274 jTextAreaList = new JTextArea();
275 jTextAreaList.setEditable(false);
276
277 }
278 return jTextAreaList;
279 }
280
281 /**
282 This method initializes iCheckBoxListArch
283
284 @return ICheckBoxList
285 **/
286 private ICheckBoxList getICheckBoxListSupportedArchitectures() {
287 if (iCheckBoxListArch == null) {
288 iCheckBoxListArch = new ICheckBoxList();
289 iCheckBoxListArch.addFocusListener(this);
290 iCheckBoxListArch.setToolTipText(DataType.SUP_ARCH_LIST_HELP_TEXT);
291 }
292 return iCheckBoxListArch;
293 }
294
295 /**
296 This method initializes jScrollPaneArch
297
298 @return javax.swing.JScrollPane
299
300 **/
301 private JScrollPane getJScrollPaneArch() {
302 if (jScrollPaneArch == null) {
303 jScrollPaneArch = new JScrollPane();
304 jScrollPaneArch.setBounds(new java.awt.Rectangle(160, 110, 320, 80));
305 jScrollPaneArch.setPreferredSize(new java.awt.Dimension(320, 80));
306 jScrollPaneArch.setViewportView(getICheckBoxListSupportedArchitectures());
307 }
308 return jScrollPaneArch;
309 }
310
311 /**
312 This method initializes jTextFieldHelpText
313
314 @return javax.swing.JTextField
315
316 **/
317 private JTextField getJTextFieldHelpText() {
318 if (jTextFieldHelpText == null) {
319 jTextFieldHelpText = new JTextField();
320 jTextFieldHelpText.setBounds(new java.awt.Rectangle(160, 60, 320, 20));
321 jTextFieldHelpText.setPreferredSize(new java.awt.Dimension(320, 20));
322 }
323 return jTextFieldHelpText;
324 }
325
326 public static void main(String[] args) {
327
328 }
329
330 /**
331 This method initializes this
332
333 **/
334 private void init() {
335 this.setSize(500, 515);
336 this.setContentPane(getJScrollPane());
337 this.setTitle("Guids");
338 initFrame();
339 this.setViewMode(false);
340 }
341
342 /**
343 This method initializes this
344 Fill values to all fields if these values are not empty
345
346 @param inPackageDependencies
347
348 **/
349 private void init(Guids inGuids) {
350 init();
351 this.guids = inGuids;
352
353 if (this.guids != null) {
354 if (this.guids.getGuidCNamesList().size() > 0) {
355 for (int index = 0; index < this.guids.getGuidCNamesList().size(); index++) {
356 String arg0 = guids.getGuidCNamesList().get(index).getGuidCName();
357 String arg1 = null;
358 if (guids.getGuidCNamesList().get(index).getUsage() != null) {
359 arg1 = guids.getGuidCNamesList().get(index).getUsage().toString();
360 }
361
362 String arg2 = guids.getGuidCNamesList().get(index).getFeatureFlag();
363 Vector<String> arg3 = Tools.convertListToVector(guids.getGuidCNamesList().get(index)
364 .getSupArchList());
365 String arg4 = guids.getGuidCNamesList().get(index).getHelpText();
366
367 id = new GuidsIdentification(arg0, arg1, arg2, arg3, arg4);
368 vid.addGuids(id);
369 }
370 }
371 }
372 //
373 // Update the list
374 //
375 Tools.generateComboBoxByVector(jComboBoxList, vid.getGuidsName());
376 reloadListArea();
377 }
378
379 /**
380 This is the default constructor
381
382 **/
383 public ModuleGuids() {
384 super();
385 init();
386 this.setVisible(true);
387 }
388
389 /**
390 This is the override edit constructor
391
392 @param inGuids The input data of GuidsDocument.Guids
393
394 **/
395 public ModuleGuids(OpeningModuleType inOmt) {
396 super();
397 this.omt = inOmt;
398 this.msa = omt.getXmlMsa();
399 init(msa.getGuids());
400 this.setVisible(true);
401 }
402
403 /**
404 Disable all components when the mode is view
405
406 @param isView true - The view mode; false - The non-view mode
407
408 **/
409 public void setViewMode(boolean isView) {
410 if (isView) {
411 this.jComboBoxUsage.setEnabled(!isView);
412 }
413 }
414
415 /**
416 This method initializes jContentPane
417
418 @return javax.swing.JPanel jContentPane
419
420 **/
421 private JPanel getJContentPane() {
422 if (jContentPane == null) {
423 jLabelUsage = new JLabel();
424 jLabelUsage.setText("Usage");
425 jLabelUsage.setBounds(new java.awt.Rectangle(15, 35, 140, 20));
426 jLabelC_Name = new JLabel();
427 jLabelC_Name.setText("C_Name");
428 jLabelC_Name.setBounds(new java.awt.Rectangle(15, 10, 140, 20));
429 jLabelArch = new JLabel();
430 jLabelArch.setBounds(new java.awt.Rectangle(15, 110, 140, 20));
431 jLabelArch.setText("Arch");
432 jLabelFeatureFlag = new JLabel();
433 jLabelFeatureFlag.setBounds(new java.awt.Rectangle(15, 85, 140, 20));
434 jLabelFeatureFlag.setText("Feature Flag");
435 jLabelHelpText = new JLabel();
436 jLabelHelpText.setBounds(new java.awt.Rectangle(14, 60, 140, 20));
437 jLabelHelpText.setText("Help Text");
438
439 jContentPane = new JPanel();
440 jContentPane.setLayout(null);
441 jContentPane.setPreferredSize(new java.awt.Dimension(490, 475));
442
443 jContentPane.add(jLabelC_Name, null);
444 jContentPane.add(getJComboBoxCName(), null);
445 jContentPane.add(jLabelUsage, null);
446 jContentPane.add(getJComboBoxUsage(), null);
447 jContentPane.add(jLabelFeatureFlag, null);
448 jContentPane.add(jLabelArch, null);
449 jContentPane.add(getJTextFieldFeatureFlag(), null);
450
451 jStarLabel1 = new StarLabel();
452 jStarLabel1.setLocation(new java.awt.Point(0, 10));
453 jStarLabel2 = new StarLabel();
454 jStarLabel2.setLocation(new java.awt.Point(0, 35));
455
456 jContentPane.add(jStarLabel1, null);
457 jContentPane.add(jStarLabel2, null);
458
459 jContentPane.add(getJComboBoxList(), null);
460 jContentPane.add(getJButtonAdd(), null);
461 jContentPane.add(getJButtonRemove(), null);
462 jContentPane.add(getJButtonUpdate(), null);
463 jContentPane.add(getJScrollPaneList(), null);
464 jContentPane.add(getJScrollPaneArch(), null);
465 jContentPane.add(jLabelHelpText, null);
466 jContentPane.add(getJTextFieldHelpText(), null);
467
468 initFrame();
469
470 }
471 return jContentPane;
472 }
473
474 /**
475 This method initializes Usage type
476
477 **/
478 private void initFrame() {
479 Tools.generateComboBoxByVector(jComboBoxCName, wt.getAllGuidDeclarationsFromWorkspace());
480 Tools.generateComboBoxByVector(jComboBoxUsage, ed.getVGuidUsage());
481 this.iCheckBoxListArch.setAllItems(ed.getVSupportedArchitectures());
482 }
483
484 /* (non-Javadoc)
485 * @see java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent)
486 *
487 * Override actionPerformed to listen all actions
488 *
489 */
490 public void actionPerformed(ActionEvent arg0) {
491 if (arg0.getSource() == jButtonAdd) {
492 if (!checkAdd()) {
493 return;
494 }
495 addToList();
496 }
497 if (arg0.getSource() == jButtonRemove) {
498 removeFromList();
499 }
500 if (arg0.getSource() == jButtonUpdate) {
501 if (!checkAdd()) {
502 return;
503 }
504 updateForList();
505 }
506 }
507
508 /**
509 Data validation for all fields
510
511 @retval true - All datas are valid
512 @retval false - At least one data is invalid
513
514 **/
515 public boolean checkAdd() {
516 //
517 // Check if all fields have correct data types
518 //
519
520 //
521 // Check Name
522 //
523 if (!isEmpty(this.jComboBoxCName.getSelectedItem().toString())) {
524 if (!DataValidation.isC_NameType(this.jComboBoxCName.getSelectedItem().toString())) {
525 Log.err("Incorrect data type for Guid Name");
526 return false;
527 }
528 }
529
530 //
531 // Check FeatureFlag
532 //
533 if (!isEmpty(this.jTextFieldFeatureFlag.getText())) {
534 if (!DataValidation.isFeatureFlag(this.jTextFieldFeatureFlag.getText())) {
535 Log.err("Incorrect data type for Feature Flag");
536 return false;
537 }
538 }
539
540 return true;
541 }
542
543 /**
544 Save all components of Guids
545 if exists guids, set the value directly
546 if not exists guids, new an instance first
547
548 **/
549 public void save() {
550 try {
551 int count = this.vid.size();
552
553 this.guids = Guids.Factory.newInstance();
554 if (count > 0) {
555 for (int index = 0; index < count; index++) {
556 GuidCNames p = GuidCNames.Factory.newInstance();
557 if (!isEmpty(vid.getGuids(index).getName())) {
558 p.setGuidCName(vid.getGuids(index).getName());
559 }
560 if (!isEmpty(vid.getGuids(index).getUsage())) {
561 p.setUsage(GuidUsage.Enum.forString(vid.getGuids(index).getUsage()));
562 }
563 if (!isEmpty(vid.getGuids(index).getFeatureFlag())) {
564 p.setFeatureFlag(vid.getGuids(index).getFeatureFlag());
565 }
566 if (vid.getGuids(index).getSupArchList() != null && vid.getGuids(index).getSupArchList().size() > 0) {
567 p.setSupArchList(vid.getGuids(index).getSupArchList());
568 }
569 if (!isEmpty(vid.getGuids(index).getHelp())) {
570 p.setHelpText(vid.getGuids(index).getHelp());
571 }
572 this.guids.addNewGuidCNames();
573 this.guids.setGuidCNamesArray(guids.getGuidCNamesList().size() - 1, p);
574 }
575 }
576
577 this.msa.setGuids(guids);
578 this.omt.setSaved(false);
579 } catch (Exception e) {
580 Log.err("Update Guids", e.getMessage());
581 }
582 }
583
584 /* (non-Javadoc)
585 * @see java.awt.event.ComponentListener#componentResized(java.awt.event.ComponentEvent)
586 *
587 * Override componentResized to resize all components when frame's size is changed
588 */
589 public void componentResized(ComponentEvent arg0) {
590 int intCurrentWidth = this.getJContentPane().getWidth();
591 int intCurrentHeight = this.getJContentPane().getHeight();
592 int intPreferredWidth = this.getJContentPane().getPreferredSize().width;
593 int intPreferredHeight = this.getJContentPane().getPreferredSize().height;
594
595 resizeComponentWidth(jComboBoxCName, intCurrentWidth, intPreferredWidth);
596 resizeComponentWidth(jComboBoxUsage, intCurrentWidth, intPreferredWidth);
597 resizeComponentWidth(jTextFieldHelpText, intCurrentWidth, intPreferredWidth);
598 resizeComponentWidth(jTextFieldFeatureFlag, intCurrentWidth, intPreferredWidth);
599 resizeComponentWidth(jScrollPaneArch, intCurrentWidth, intPreferredWidth);
600
601 resizeComponentWidth(jComboBoxList, intCurrentWidth, intPreferredWidth);
602 resizeComponent(jScrollPaneList, intCurrentWidth, intCurrentHeight, intPreferredWidth, intPreferredHeight);
603
604 relocateComponentX(jButtonAdd, intCurrentWidth, intPreferredWidth, DataType.SPACE_TO_RIGHT_FOR_ADD_BUTTON);
605 relocateComponentX(jButtonRemove, intCurrentWidth, intPreferredWidth, DataType.SPACE_TO_RIGHT_FOR_REMOVE_BUTTON);
606 relocateComponentX(jButtonUpdate, intCurrentWidth, intPreferredWidth, DataType.SPACE_TO_RIGHT_FOR_UPDATE_BUTTON);
607 }
608
609 private GuidsIdentification getCurrentGuids() {
610 String arg0 = this.jComboBoxCName.getSelectedItem().toString();
611 String arg1 = this.jComboBoxUsage.getSelectedItem().toString();
612
613 String arg2 = this.jTextFieldFeatureFlag.getText();
614 Vector<String> arg3 = this.iCheckBoxListArch.getAllCheckedItemsString();
615 String arg4 = this.jTextFieldHelpText.getText();
616
617 id = new GuidsIdentification(arg0, arg1, arg2, arg3, arg4);
618 return id;
619 }
620
621 /**
622 Add current item to Vector
623
624 **/
625 private void addToList() {
626 intSelectedItemId = vid.size();
627
628 vid.addGuids(getCurrentGuids());
629
630 jComboBoxList.addItem(id.getName());
631 jComboBoxList.setSelectedItem(id.getName());
632
633 //
634 // Reset select item index
635 //
636 intSelectedItemId = vid.size();
637
638 //
639 // Reload all fields of selected item
640 //
641 reloadFromList();
642
643 //
644 // Save to memory
645 //
646 save();
647 }
648
649 /**
650 Remove current item from Vector
651
652 **/
653 private void removeFromList() {
654 //
655 // Check if exist items
656 //
657 if (this.vid.size() < 1) {
658 return;
659 }
660
661 int intTempIndex = intSelectedItemId;
662
663 jComboBoxList.removeItemAt(intSelectedItemId);
664
665 vid.removeGuids(intTempIndex);
666
667 //
668 // Reload all fields of selected item
669 //
670 reloadFromList();
671
672 //
673 // Save to memory
674 //
675 save();
676 }
677
678 /**
679 Update current item of Vector
680
681 **/
682 private void updateForList() {
683 //
684 // Check if exist items
685 //
686 if (this.vid.size() < 1) {
687 return;
688 }
689
690 //
691 // Backup selected item index
692 //
693 int intTempIndex = intSelectedItemId;
694
695 vid.updateGuids(getCurrentGuids(), intTempIndex);
696
697 jComboBoxList.removeAllItems();
698 for (int index = 0; index < vid.size(); index++) {
699 jComboBoxList.addItem(vid.getGuids(index).getName());
700 }
701
702 //
703 // Restore selected item index
704 //
705 intSelectedItemId = intTempIndex;
706
707 //
708 // Reset select item index
709 //
710 jComboBoxList.setSelectedIndex(intSelectedItemId);
711
712 //
713 // Reload all fields of selected item
714 //
715 reloadFromList();
716
717 //
718 // Save to memory
719 //
720 save();
721 }
722
723 /**
724 Refresh all fields' values of selected item of Vector
725
726 **/
727 private void reloadFromList() {
728 if (vid.size() > 0) {
729 //
730 // Get selected item index
731 //
732 intSelectedItemId = jComboBoxList.getSelectedIndex();
733
734 this.jComboBoxCName.setSelectedItem(vid.getGuids(intSelectedItemId).getName());
735 this.jComboBoxUsage.setSelectedItem(vid.getGuids(intSelectedItemId).getUsage());
736 this.jTextFieldHelpText.setText(vid.getGuids(intSelectedItemId).getHelp());
737
738 jTextFieldFeatureFlag.setText(vid.getGuids(intSelectedItemId).getFeatureFlag());
739 iCheckBoxListArch.setAllItemsUnchecked();
740 iCheckBoxListArch.initCheckedItem(true, vid.getGuids(intSelectedItemId).getSupArchList());
741
742 } else {
743 }
744
745 reloadListArea();
746 }
747
748 /**
749 Update list area pane via the elements of Vector
750
751 **/
752 private void reloadListArea() {
753 String strListItem = "";
754 for (int index = 0; index < vid.size(); index++) {
755 strListItem = strListItem + vid.getGuids(index).getName() + DataType.UNIX_LINE_SEPARATOR;
756 }
757 this.jTextAreaList.setText(strListItem);
758 }
759
760 /* (non-Javadoc)
761 * @see java.awt.event.ItemListener#itemStateChanged(java.awt.event.ItemEvent)
762 *
763 * Reflesh the frame when selected item changed
764 *
765 */
766 public void itemStateChanged(ItemEvent arg0) {
767 if (arg0.getSource() == this.jComboBoxList && arg0.getStateChange() == ItemEvent.SELECTED) {
768 reloadFromList();
769 }
770 }
771 }