2 Java class SpdGuidDecls is GUI for create library definition elements of spd file.
4 Copyright (c) 2006, Intel Corporation
5 All rights reserved. This program and the accompanying materials
6 are licensed and made available under the terms and conditions of the BSD License
7 which accompanies this distribution. The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
13 package org
.tianocore
.frameworkwizard
.packaging
.ui
;
15 import java
.awt
.Dimension
;
16 import java
.awt
.event
.ActionEvent
;
17 import java
.awt
.event
.ComponentEvent
;
18 import java
.util
.Vector
;
20 import javax
.swing
.JOptionPane
;
21 import javax
.swing
.JPanel
;
22 import javax
.swing
.JTable
;
23 import javax
.swing
.JTextField
;
24 import javax
.swing
.JLabel
;
25 import javax
.swing
.JScrollPane
;
26 import javax
.swing
.JButton
;
27 import javax
.swing
.JFrame
;
28 import javax
.swing
.ListSelectionModel
;
29 import javax
.swing
.event
.InternalFrameAdapter
;
30 import javax
.swing
.event
.InternalFrameEvent
;
31 import javax
.swing
.event
.ListSelectionEvent
;
32 import javax
.swing
.event
.ListSelectionListener
;
33 import javax
.swing
.event
.TableModelEvent
;
34 import javax
.swing
.event
.TableModelListener
;
35 import javax
.swing
.table
.DefaultTableModel
;
36 import javax
.swing
.table
.TableModel
;
38 import org
.tianocore
.PackageSurfaceAreaDocument
;
39 import org
.tianocore
.frameworkwizard
.common
.DataValidation
;
40 import org
.tianocore
.frameworkwizard
.common
.Tools
;
41 import org
.tianocore
.frameworkwizard
.common
.Identifications
.OpeningPackageType
;
42 import org
.tianocore
.frameworkwizard
.common
.ui
.IInternalFrame
;
43 import org
.tianocore
.frameworkwizard
.common
.ui
.StarLabel
;
44 import org
.tianocore
.frameworkwizard
.common
.ui
.iCheckBoxList
.ICheckBoxList
;
45 import org
.tianocore
.frameworkwizard
.platform
.ui
.ListEditor
;
48 GUI for create library definition elements of spd file.
50 @since PackageEditor 1.0
52 public class SpdGuidDecls
extends IInternalFrame
implements TableModelListener
{
56 private static final long serialVersionUID
= 1L;
60 private SpdFileContents sfc
= null;
62 private OpeningPackageType docConsole
= null;
64 private JTable jTable
= null;
66 private DefaultTableModel model
= null;
68 private JPanel jContentPane
= null;
70 private JTextField jTextFieldAdd
= null;
72 private JScrollPane jScrollPane
= null;
74 private JButton jButtonAdd
= null;
76 private JButton jButtonRemove
= null;
78 private JButton jButtonClearAll
= null;
80 private JButton jButtonCancel
= null;
82 private JButton jButtonOk
= null;
84 private JButton jButtonGen
= null;
86 private StarLabel jStarLabel1
= null;
88 private StarLabel jStarLabel2
= null;
90 private StarLabel jStarLabel3
= null;
92 private StarLabel jStarLabel4
= null;
94 protected int selectedRow
= -1;
96 private JLabel jLabelName
= null;
98 private JScrollPane jScrollPaneModule
= null;
100 private JTextField jTextFieldName
= null;
102 private JScrollPane jScrollPaneArch
= null;
104 private JScrollPane jScrollPaneGuid
= null;
106 private JLabel jLabelGuid
= null;
108 private JScrollPane topScrollPane
= null; // @jve:decl-index=0:visual-constraint="10,213"
110 private JLabel jLabelVer
= null;
112 private GenGuidDialog guidDialog
= null;
114 private JTextField jTextFieldVersion
= null;
116 private JLabel jLabel
= null;
118 private JTextField jTextField
= null;
120 private JLabel jLabel1
= null;
122 private JLabel jLabel2
= null;
124 private ICheckBoxList iCheckBoxList
= null;
126 private ICheckBoxList iCheckBoxList1
= null;
128 private ICheckBoxList iCheckBoxList2
= null;
130 private JLabel jLabel3
= null;
135 This method initializes this
138 protected void initialize() {
140 this.setDefaultCloseOperation(javax
.swing
.WindowConstants
.DISPOSE_ON_CLOSE
);
145 This method initializes jTextFieldAdd
147 @return javax.swing.JTextField
149 protected JTextField
getJTextFieldAdd() {
150 if (jTextFieldAdd
== null) {
151 jTextFieldAdd
= new JTextField();
152 jTextFieldAdd
.setBounds(new java
.awt
.Rectangle(137,35,337,20));
153 jTextFieldAdd
.setPreferredSize(new java
.awt
.Dimension(335,20));
156 return jTextFieldAdd
;
160 This method initializes jScrollPane
162 @return javax.swing.JScrollPane
164 protected JScrollPane
getJScrollPane() {
165 if (jScrollPane
== null) {
166 jScrollPane
= new JScrollPane();
167 jScrollPane
.setBounds(new java
.awt
.Rectangle(5,256,472,292));
168 jScrollPane
.setViewportView(getJTable());
174 This method initializes jTable
176 @return javax.swing.JTable
178 protected JTable
getJTable() {
179 if (jTable
== null) {
180 model
= new DefaultTableModel();
181 jTable
= new JTable(model
);
182 jTable
.setRowHeight(20);
183 jTable
.setAutoResizeMode(javax
.swing
.JTable
.AUTO_RESIZE_OFF
);
184 model
.addColumn("Name");
185 model
.addColumn("C_Name");
186 model
.addColumn("GUID Value");
187 model
.addColumn("HelpText");
188 model
.addColumn("SupportedArch");
189 model
.addColumn("SupportedModuleType");
190 model
.addColumn("GuidTypes");
191 jTable
.getColumnModel().getColumn(2).setCellEditor(new GuidEditor());
193 Vector
<String
> vArch
= new Vector
<String
>();
200 jTable
.getColumnModel().getColumn(4).setCellEditor(new ListEditor(vArch
));
202 Vector
<String
> vModule
= new Vector
<String
>();
205 vModule
.add("PEI_CORE");
207 vModule
.add("DXE_CORE");
208 vModule
.add("DXE_DRIVER");
209 vModule
.add("DXE_RUNTIME_DRIVER");
210 vModule
.add("DXE_SAL_DRIVER");
211 vModule
.add("DXE_SMM_DRIVER");
212 vModule
.add("UEFI_DRIVER");
213 vModule
.add("UEFI_APPLICATION");
214 vModule
.add("USER_DEFINED");
215 jTable
.getColumnModel().getColumn(5).setCellEditor(new ListEditor(vModule
));
217 Vector
<String
> vGuid
= new Vector
<String
>();
218 vGuid
.add("DATA_HUB_RECORD");
219 vGuid
.add("EFI_EVENT");
220 vGuid
.add("EFI_SYSTEM_CONFIGURATION_TABLE");
221 vGuid
.add("EFI_VARIABLE");
223 vGuid
.add("HII_PACKAGE_LIST");
225 vGuid
.add("TOKEN_SPACE_GUID");
226 jTable
.getColumnModel().getColumn(6).setCellEditor(new ListEditor(vGuid
));
228 jTable
.setSelectionMode(ListSelectionModel
.SINGLE_SELECTION
);
229 jTable
.getSelectionModel().addListSelectionListener(new ListSelectionListener(){
230 public void valueChanged(ListSelectionEvent e
) {
231 if (e
.getValueIsAdjusting()){
234 ListSelectionModel lsm
= (ListSelectionModel
)e
.getSource();
235 if (lsm
.isSelectionEmpty()) {
239 selectedRow
= lsm
.getMinSelectionIndex();
244 jTable
.getModel().addTableModelListener(this);
250 public void tableChanged(TableModelEvent arg0
) {
251 // TODO Auto-generated method stub
252 int row
= arg0
.getFirstRow();
253 TableModel m
= (TableModel
)arg0
.getSource();
254 if (arg0
.getType() == TableModelEvent
.UPDATE
){
260 protected void updateRow(int row
, TableModel m
){
261 String name
= m
.getValueAt(row
, 0) + "";
262 String cName
= m
.getValueAt(row
, 1) + "";
263 String guid
= m
.getValueAt(row
, 2) + "";
264 String help
= m
.getValueAt(row
, 3) + "";
265 String archList
= null;
266 if (m
.getValueAt(row
, 4) != null){
267 archList
= m
.getValueAt(row
, 4).toString();
269 String modTypeList
= null;
270 if (m
.getValueAt(row
, 5) != null) {
271 modTypeList
= m
.getValueAt(row
, 5).toString();
273 String guidTypeList
= null;
274 if (m
.getValueAt(row
, 6) != null){
275 guidTypeList
= m
.getValueAt(row
, 6).toString();
277 String
[] rowData
= {name
, cName
, guid
, help
};
278 if (!dataValidation(rowData
)){
281 if (docConsole
!= null) {
282 docConsole
.setSaved(false);
284 sfc
.updateSpdGuidDecl(row
, name
, cName
, guid
, help
, archList
, modTypeList
, guidTypeList
);
287 This method initializes jButtonAdd
289 @return javax.swing.JButton
291 protected JButton
getJButtonAdd() {
292 if (jButtonAdd
== null) {
293 jButtonAdd
= new JButton();
294 jButtonAdd
.setBounds(new java
.awt
.Rectangle(167,227,90,20));
295 jButtonAdd
.setText("Add");
296 jButtonAdd
.addActionListener(this);
302 This method initializes jButtonRemove
304 @return javax.swing.JButton
306 protected JButton
getJButtonRemove() {
307 if (jButtonRemove
== null) {
308 jButtonRemove
= new JButton();
309 jButtonRemove
.setBounds(new java
.awt
.Rectangle(270,227,90,20));
310 jButtonRemove
.setText("Remove");
311 jButtonRemove
.addActionListener(this);
313 return jButtonRemove
;
317 This method initializes jButtonRemoveAll
319 @return javax.swing.JButton
321 protected JButton
getJButtonClearAll() {
322 if (jButtonClearAll
== null) {
323 jButtonClearAll
= new JButton();
324 jButtonClearAll
.setBounds(new java
.awt
.Rectangle(380,227,90,20));
325 jButtonClearAll
.setText("Clear All");
326 jButtonClearAll
.addActionListener(this);
328 return jButtonClearAll
;
332 This method initializes jButtonCancel
334 @return javax.swing.JButton
336 protected JButton
getJButtonCancel() {
337 if (jButtonCancel
== null) {
338 jButtonCancel
= new JButton();
339 jButtonCancel
.setPreferredSize(new java
.awt
.Dimension(90, 20));
340 jButtonCancel
.setLocation(new java
.awt
.Point(390, 305));
341 jButtonCancel
.setText("Cancel");
342 jButtonCancel
.setSize(new java
.awt
.Dimension(90, 20));
343 jButtonCancel
.setVisible(false);
344 jButtonCancel
.addActionListener(this);
346 return jButtonCancel
;
350 This method initializes jButton
352 @return javax.swing.JButton
354 protected JButton
getJButtonOk() {
355 if (jButtonOk
== null) {
356 jButtonOk
= new JButton();
357 jButtonOk
.setSize(new java
.awt
.Dimension(90, 20));
358 jButtonOk
.setText("OK");
359 jButtonOk
.setLocation(new java
.awt
.Point(290, 305));
360 jButtonOk
.setVisible(false);
361 jButtonOk
.addActionListener(this);
367 This is the default constructor
369 public SpdGuidDecls() {
376 public SpdGuidDecls(PackageSurfaceAreaDocument
.PackageSurfaceArea inPsa
){
378 sfc
= new SpdFileContents(inPsa
);
382 public SpdGuidDecls(OpeningPackageType opt
) {
383 this(opt
.getXmlSpd());
387 This method initializes this
391 protected void init() {
392 this.setContentPane(getJContentPane());
393 this.addInternalFrameListener(new InternalFrameAdapter(){
394 public void internalFrameDeactivated(InternalFrameEvent e
){
395 if (jTable
.isEditing()) {
396 jTable
.getCellEditor().stopCellEditing();
400 this.setBounds(new java
.awt
.Rectangle(0, 0, 500, 370));
401 this.setVisible(true);
405 protected void init(SpdFileContents sfc
){
406 if (sfc
.getSpdGuidDeclarationCount() == 0) {
410 // initialize table using SpdFileContents object
412 String
[][] saa
= new String
[sfc
.getSpdGuidDeclarationCount()][7];
413 sfc
.getSpdGuidDeclarations(saa
);
415 while (i
< saa
.length
) {
416 model
.addRow(saa
[i
]);
421 protected JScrollPane
getJContentPane(){
422 if (topScrollPane
== null){
423 topScrollPane
= new JScrollPane();
424 topScrollPane
.setSize(new java
.awt
.Dimension(617,500));
425 topScrollPane
.setPreferredSize(new java
.awt
.Dimension(498,500));
426 topScrollPane
.setViewportView(getJContentPane1());
428 return topScrollPane
;
432 This method initializes jContentPane
434 @return javax.swing.JPanel
436 protected JPanel
getJContentPane1() {
437 if (jContentPane
== null) {
438 jLabel3
= new JLabel();
439 jLabel3
.setBounds(new java
.awt
.Rectangle(400,122,103,16));
440 jLabel3
.setText("GUID Type List");
441 jLabel3
.setEnabled(true);
442 jLabel2
= new JLabel();
443 jLabel2
.setBounds(new java
.awt
.Rectangle(197,122,108,16));
444 jLabel2
.setText("Supported Arch");
445 jLabel2
.setEnabled(true);
446 jLabel1
= new JLabel();
447 jLabel1
.setBounds(new java
.awt
.Rectangle(14,120,110,16));
448 jLabel1
.setText("Supported Module");
449 jLabel1
.setEnabled(true);
450 jLabel
= new JLabel();
451 jLabel
.setText("HelpText");
452 jLabel
.setSize(new java
.awt
.Dimension(109,20));
453 jLabel
.setLocation(new java
.awt
.Point(14,85));
454 jLabelVer
= new JLabel();
455 jLabelVer
.setBounds(new java
.awt
.Rectangle(14,60,111,20));
456 jLabelVer
.setText("C_Name");
457 jLabelGuid
= new JLabel();
458 jLabelGuid
.setBounds(new java
.awt
.Rectangle(15,35,112,20));
459 jLabelGuid
.setText("Guid Value");
460 jLabelName
= new JLabel();
461 jLabelName
.setBounds(new java
.awt
.Rectangle(15,10,113,20));
462 jLabelName
.setText("Name");
463 jStarLabel1
= new StarLabel();
464 jStarLabel1
.setLocation(new java
.awt
.Point(0, 10));
465 jStarLabel3
= new StarLabel();
466 jStarLabel3
.setLocation(new java
.awt
.Point(0, 35));
467 jStarLabel4
= new StarLabel();
468 jStarLabel4
.setLocation(new java
.awt
.Point(0, 60));
469 jStarLabel2
= new StarLabel();
470 jStarLabel2
.setLocation(new java
.awt
.Point(0, 85));
471 jStarLabel2
.setVisible(true);
472 jContentPane
= new JPanel();
473 jContentPane
.setLayout(null);
474 jContentPane
.setPreferredSize(new Dimension(480, 375));
475 jContentPane
.add(jStarLabel1
, null);
476 jContentPane
.add(jStarLabel2
, null);
477 jContentPane
.add(jStarLabel3
, null);
478 jContentPane
.add(jStarLabel4
, null);
479 jContentPane
.add(jLabelVer
, null);
480 jContentPane
.add(getJTextFieldVersion(), null);
481 jContentPane
.add(getJTextFieldAdd(), null);
482 jContentPane
.add(getJScrollPane(), null);
483 jContentPane
.add(getJButtonAdd(), null);
484 jContentPane
.add(getJButtonRemove(), null);
485 jContentPane
.add(getJButtonClearAll(), null);
486 jContentPane
.add(getJButtonCancel(), null);
487 jContentPane
.add(getJButtonOk(), null);
489 jContentPane
.add(getJButtonGen(), null);
490 jContentPane
.add(jLabelName
, null);
491 jContentPane
.add(getJTextFieldName(), null);
492 jContentPane
.add(jLabelGuid
, null);
493 jContentPane
.add(jLabel
, null);
494 jContentPane
.add(getJTextField(), null);
495 jContentPane
.add(jLabel1
, null);
496 jContentPane
.add(jLabel2
, null);
497 jContentPane
.add(getJScrollPaneArch(), null);
498 jContentPane
.add(getJScrollPaneGuid(), null);
499 jContentPane
.add(getJScrollPaneModule(), null);
500 jContentPane
.add(jLabel3
, null);
506 fill ComboBoxes with pre-defined contents
508 protected void initFrame() {
510 this.setTitle("GUID Declarations");
515 * @see java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent)
517 public void actionPerformed(ActionEvent arg0
) {
519 if (arg0
.getSource() == jButtonOk
) {
524 if (arg0
.getSource() == jButtonCancel
) {
528 if (arg0
.getSource() == jButtonAdd
) {
530 //ToDo: check before add
531 String
[] row
= {"", "", "", "", "", "", ""};
532 row
[3] = jTextField
.getText();
533 row
[2] = jTextFieldAdd
.getText();
534 row
[1] = jTextFieldVersion
.getText();
535 row
[0] = jTextFieldName
.getText();
536 row
[4] = vectorToString(iCheckBoxList
.getAllCheckedItemsString());
537 if (row
[4].length() == 0) {
540 row
[5] = vectorToString(iCheckBoxList2
.getAllCheckedItemsString());
541 if (row
[5].length() == 0) {
544 row
[6] = vectorToString(iCheckBoxList1
.getAllCheckedItemsString());
545 if (row
[6].length() == 0) {
549 if (!dataValidation(row
)) {
554 jTable
.changeSelection(model
.getRowCount()-1, 0, false, false);
558 // remove selected line
560 if (arg0
.getSource() == jButtonRemove
) {
561 if (jTable
.isEditing()){
562 jTable
.getCellEditor().stopCellEditing();
564 int rowSelected
= selectedRow
;
565 if (rowSelected
>= 0) {
566 model
.removeRow(rowSelected
);
567 removeRow(rowSelected
);
571 if (arg0
.getSource() == jButtonClearAll
) {
572 if (model
.getRowCount() == 0) {
575 model
.setRowCount(0);
579 if (arg0
.getSource() == jButtonGen
) {
580 jTextFieldAdd
.setText(Tools
.generateUuidString());
583 if (arg0
.getActionCommand().equals("GenGuidValue")) {
584 jTextFieldAdd
.setText(guidDialog
.getGuid());
589 protected boolean dataValidation(String
[] row
){
590 if (!DataValidation
.isUiNameType(row
[0])) {
591 JOptionPane
.showMessageDialog(this, "Name is NOT UiNameType.");
594 if (!DataValidation
.isGuid(row
[2])) {
595 JOptionPane
.showMessageDialog(this, "Guid Value is NOT GuidType.");
598 if (!DataValidation
.isC_NameType(row
[1])) {
599 JOptionPane
.showMessageDialog(this, "C_Name is NOT C_NameType.");
602 if (row
[3].length() == 0) {
603 JOptionPane
.showMessageDialog(this, "HelpText could NOT be empty.");
609 protected void addRow(String
[] row
) {
610 Vector
<String
> vArch
= iCheckBoxList
.getAllCheckedItemsString();
611 if (vArch
.size() == 0) {
614 Vector
<String
> vModType
= iCheckBoxList2
.getAllCheckedItemsString();
615 if (vModType
.size() == 0) {
618 Vector
<String
> vguidType
= iCheckBoxList1
.getAllCheckedItemsString();
619 if (vguidType
.size() == 0) {
622 if (docConsole
!= null) {
623 docConsole
.setSaved(false);
625 sfc
.genSpdGuidDeclarations(row
[0], row
[1], row
[2], row
[3], vArch
, vModType
, vguidType
);
628 protected void removeRow(int i
){
629 sfc
.removeSpdGuidDeclaration(i
);
630 if (docConsole
!= null) {
631 docConsole
.setSaved(false);
635 protected void clearAllRow(){
636 sfc
.removeSpdGuidDeclaration();
637 if (docConsole
!= null) {
638 docConsole
.setSaved(false);
643 Add contents in list to sfc
645 protected void save() {
650 This method initializes jButtonBrowse
652 @return javax.swing.JButton
654 protected JButton
getJButtonGen() {
655 if (jButtonGen
== null) {
656 jButtonGen
= new JButton();
657 jButtonGen
.setBounds(new java
.awt
.Rectangle(379,58,92,21));
658 jButtonGen
.setText("Gen GUID");
659 jButtonGen
.setPreferredSize(new java
.awt
.Dimension(80,20));
660 jButtonGen
.addActionListener(this);
666 * This method initializes jTextFieldName
668 * @return javax.swing.JTextField
670 protected JTextField
getJTextFieldName() {
671 if (jTextFieldName
== null) {
672 jTextFieldName
= new JTextField();
673 jTextFieldName
.setBounds(new java
.awt
.Rectangle(138,10,337,20));
674 jTextFieldName
.setPreferredSize(new java
.awt
.Dimension(335,20));
676 return jTextFieldName
;
680 * This method initializes jTextFieldVersion
682 * @return javax.swing.JTextField
684 protected JTextField
getJTextFieldVersion() {
685 if (jTextFieldVersion
== null) {
686 jTextFieldVersion
= new JTextField();
687 jTextFieldVersion
.setBounds(new java
.awt
.Rectangle(137,60,225,20));
688 jTextFieldVersion
.setPreferredSize(new java
.awt
.Dimension(225,20));
690 return jTextFieldVersion
;
693 public void componentResized(ComponentEvent arg0
) {
694 int intPreferredWidth
= 500;
696 resizeComponentWidth(this.jTextFieldName
, this.getWidth(), intPreferredWidth
);
697 resizeComponentWidth(this.jTextFieldAdd
, this.getWidth(), intPreferredWidth
);
698 resizeComponentWidth(this.jTextFieldVersion
, this.getWidth(), intPreferredWidth
);
699 resizeComponentWidth(this.jTextField
, this.getWidth(), intPreferredWidth
);
700 resizeComponentWidth(this.jScrollPane
, this.getWidth(), intPreferredWidth
);
701 relocateComponentX(this.jButtonGen
, this.getWidth(), this.getPreferredSize().width
, 40);
706 * This method initializes jTextField
708 * @return javax.swing.JTextField
710 private JTextField
getJTextField() {
711 if (jTextField
== null) {
712 jTextField
= new JTextField();
713 jTextField
.setBounds(new java
.awt
.Rectangle(136,85,337,20));
714 jTextField
.setPreferredSize(new Dimension(335, 20));
719 private JScrollPane
getJScrollPaneArch() {
720 if (jScrollPaneArch
== null) {
721 jScrollPaneArch
= new JScrollPane();
722 jScrollPaneArch
.setBounds(new java
.awt
.Rectangle(197,142,188,74));
723 jScrollPaneArch
.setPreferredSize(new java
.awt
.Dimension(188, 74));
724 jScrollPaneArch
.setViewportView(getICheckBoxList());
726 return jScrollPaneArch
;
729 * This method initializes iCheckBoxList
731 * @return org.tianocore.frameworkwizard.common.ui.iCheckBoxList.ICheckBoxList
733 private ICheckBoxList
getICheckBoxList() {
734 if (iCheckBoxList
== null) {
735 iCheckBoxList
= new ICheckBoxList();
736 iCheckBoxList
.setBounds(new java
.awt
.Rectangle(197,142,188,74));
737 Vector
<String
> v
= new Vector
<String
>();
744 iCheckBoxList
.setAllItems(v
);
746 return iCheckBoxList
;
749 protected JScrollPane
getJScrollPaneGuid() {
750 if (jScrollPaneGuid
== null) {
751 jScrollPaneGuid
= new JScrollPane();
752 jScrollPaneGuid
.setPreferredSize(new java
.awt
.Dimension(190,74));
753 jScrollPaneGuid
.setLocation(new java
.awt
.Point(400,142));
754 jScrollPaneGuid
.setSize(new java
.awt
.Dimension(260,74));
755 jScrollPaneGuid
.setViewportView(getICheckBoxList1());
757 return jScrollPaneGuid
;
760 * This method initializes iCheckBoxList1
762 * @return org.tianocore.frameworkwizard.common.ui.iCheckBoxList.ICheckBoxList
764 private ICheckBoxList
getICheckBoxList1() {
765 if (iCheckBoxList1
== null) {
766 iCheckBoxList1
= new ICheckBoxList();
767 iCheckBoxList1
.setBounds(new java
.awt
.Rectangle(400,142,177,74));
768 Vector
<String
> v
= new Vector
<String
>();
769 v
.add("DATA_HUB_RECORD");
771 v
.add("EFI_SYSTEM_CONFIGURATION_TABLE");
772 v
.add("EFI_VARIABLE");
774 v
.add("HII_PACKAGE_LIST");
776 v
.add("TOKEN_SPACE_GUID");
778 iCheckBoxList1
.setAllItems(v
);
780 return iCheckBoxList1
;
783 private JScrollPane
getJScrollPaneModule() {
784 if (jScrollPaneModule
== null) {
785 jScrollPaneModule
= new JScrollPane();
786 jScrollPaneModule
.setBounds(new java
.awt
.Rectangle(14,142,170,74));
787 jScrollPaneModule
.setPreferredSize(new java
.awt
.Dimension(170, 74));
788 jScrollPaneModule
.setViewportView(getICheckBoxList2());
790 return jScrollPaneModule
;
793 * This method initializes iCheckBoxList2
795 * @return org.tianocore.frameworkwizard.common.ui.iCheckBoxList.ICheckBoxList
797 private ICheckBoxList
getICheckBoxList2() {
798 if (iCheckBoxList2
== null) {
799 iCheckBoxList2
= new ICheckBoxList();
800 iCheckBoxList2
.setBounds(new java
.awt
.Rectangle(14,142,170,74));
801 Vector
<String
> v
= new Vector
<String
>();
808 v
.add("DXE_RUNTIME_DRIVER");
809 v
.add("DXE_SAL_DRIVER");
810 v
.add("DXE_SMM_DRIVER");
811 v
.add("UEFI_DRIVER");
812 v
.add("UEFI_APPLICATION");
813 v
.add("USER_DEFINED");
814 iCheckBoxList2
.setAllItems(v
);
816 return iCheckBoxList2
;
819 public static void main(String
[] args
){
820 new SpdGuidDecls().setVisible(true);
823 protected DefaultTableModel
getModel() {
827 protected void setModel(DefaultTableModel model
) {
831 protected String
vectorToString(Vector
<String
> v
) {
833 for (int i
= 0; i
< v
.size(); ++i
) {
840 protected Vector
<String
> stringToVector(String s
){
844 String
[] sArray
= s
.split(" ");
845 Vector
<String
> v
= new Vector
<String
>();
846 for (int i
= 0; i
< sArray
.length
; ++i
) {
852 protected JLabel
getJLabel3() {