1 package org
.tianocore
.frameworkwizard
.platform
.ui
;
3 import java
.awt
.BorderLayout
;
4 import java
.awt
.Dimension
;
5 import java
.awt
.Toolkit
;
7 import javax
.swing
.JFrame
;
8 import javax
.swing
.JOptionPane
;
9 import javax
.swing
.JPanel
;
10 import javax
.swing
.JDialog
;
11 import javax
.swing
.JTabbedPane
;
12 import javax
.swing
.JLabel
;
13 import javax
.swing
.JScrollPane
;
14 import javax
.swing
.JTable
;
15 import javax
.swing
.JTextArea
;
16 import javax
.swing
.JSplitPane
;
17 import javax
.swing
.JButton
;
18 import javax
.swing
.ListSelectionModel
;
19 import javax
.swing
.event
.ListSelectionEvent
;
20 import javax
.swing
.event
.ListSelectionListener
;
21 import javax
.swing
.event
.TableModelEvent
;
22 import javax
.swing
.event
.TableModelListener
;
23 import javax
.swing
.table
.DefaultTableModel
;
24 import javax
.swing
.table
.TableModel
;
26 import org
.apache
.xmlbeans
.XmlObject
;
27 import org
.tianocore
.frameworkwizard
.platform
.ui
.global
.GlobalData
;
28 import org
.tianocore
.frameworkwizard
.platform
.ui
.global
.SurfaceAreaQuery
;
29 import org
.tianocore
.frameworkwizard
.platform
.ui
.id
.ModuleIdentification
;
30 import org
.tianocore
.frameworkwizard
.platform
.ui
.id
.PackageIdentification
;
32 import java
.awt
.FlowLayout
;
33 import java
.awt
.event
.ActionEvent
;
34 import java
.awt
.event
.ActionListener
;
35 import java
.util
.ArrayList
;
36 import java
.util
.HashMap
;
37 import java
.util
.Iterator
;
38 import java
.util
.ListIterator
;
41 import java
.util
.Vector
;
43 import javax
.swing
.JTextField
;
44 import java
.awt
.GridLayout
;
45 import javax
.swing
.JComboBox
;
47 public class FpdModuleSA
extends JDialog
implements ActionListener
{
52 private static final long serialVersionUID
= 1L;
54 private JPanel jContentPane
= null;
55 private JTabbedPane jTabbedPane
= null;
56 private JPanel jPanel
= null;
57 private JPanel jPanel1
= null;
58 private JLabel jLabel
= null;
59 private JScrollPane jScrollPane
= null;
60 private JTable jTable
= null;
61 private JPanel jPanel2
= null;
62 private JScrollPane jScrollPane1
= null;
63 private JTextArea jTextArea
= null;
64 private JPanel jPanel3
= null;
65 private JSplitPane jSplitPane
= null;
66 private JPanel jPanel4
= null;
67 private JPanel jPanel5
= null;
68 private JLabel jLabel1
= null;
69 private JLabel jLabel2
= null;
70 private JScrollPane jScrollPane2
= null;
71 private JTable jTable1
= null;
72 private JScrollPane jScrollPane3
= null;
73 private JTable jTable2
= null;
74 private JScrollPane jScrollPane4
= null;
75 private JTable jTable3
= null;
76 private JPanel jPanel6
= null;
77 private JPanel jPanel7
= null;
78 private JScrollPane jScrollPane5
= null;
79 private JTextArea jTextArea1
= null;
80 private JLabel jLabel3
= null;
81 private JLabel jLabel4
= null;
82 private JButton jButton
= null;
83 private JButton jButton1
= null;
84 private JLabel jLabel5
= null;
85 private JButton jButton2
= null;
86 private JButton jButton3
= null;
87 private PartialEditableTableModel model
= null;
88 private LibraryTableModel model1
= null;
89 private LibraryTableModel model2
= null;
90 private LibraryTableModel model3
= null;
91 private DefaultTableModel optionsTableModel
= null;
92 private FpdFileContents ffc
= null;
93 private String moduleKey
= null;
94 private HashMap
<String
, ArrayList
<String
>> classInstanceMap
= null;
95 private ArrayList
<String
> classProduced
= null;
96 private HashMap
<String
, ArrayList
<String
>> classConsumed
= null;
97 private JPanel jPanel8
= null;
98 private JLabel jLabel6
= null;
99 private JTextField jTextField
= null;
100 private JLabel jLabel7
= null;
101 private JTextField jTextField1
= null;
102 private JLabel jLabel8
= null;
103 private JTextField jTextField2
= null;
104 private JScrollPane jScrollPane6
= null;
105 private JTable jTable4
= null;
106 private JButton jButton4
= null;
107 private JButton jButton5
= null;
108 private JPanel jPanel9
= null;
109 private JPanel jPanel10
= null;
110 private JPanel jPanel11
= null;
111 private JPanel jPanel12
= null;
112 private JLabel jLabel9
= null;
113 private JComboBox jComboBox
= null;
114 private JLabel jLabel10
= null;
115 private JTextField jTextField3
= null;
116 private JLabel jLabel11
= null;
117 private JTextField jTextField4
= null;
118 private JButton jButton6
= null;
119 private JComboBox jComboBox1
= null;
121 * This is the default constructor
123 public FpdModuleSA() {
127 public FpdModuleSA(FpdFileContents ffc
) {
132 public void setKey(String k
){
134 jTabbedPane
.setSelectedIndex(0);
138 init will be called each time FpdModuleSA object is to be shown.
139 @param key Module information.
141 public void initPcdBuildDefinition(String key
) {
143 // display pcd for key.
145 model
.setRowCount(0);
146 int pcdCount
= ffc
.getPcdDataCount(key
);
148 String
[][] saa
= new String
[pcdCount
][7];
149 ffc
.getPcdData(key
, saa
);
150 for (int i
= 0; i
< saa
.length
; ++i
) {
151 model
.addRow(saa
[i
]);
156 public void initLibraries(String key
) {
158 // display library classes that need to be resolved. also potential instances for them.
160 resolveLibraryInstances(key
);
162 // display lib instances already selected for key
164 model1
.setRowCount(0);
165 int instanceCount
= ffc
.getLibraryInstancesCount(key
);
166 if (instanceCount
!= 0) {
167 String
[][] saa
= new String
[instanceCount
][5];
168 ffc
.getLibraryInstances(key
, saa
);
169 for (int i
= 0; i
< saa
.length
; ++i
) {
170 ModuleIdentification mi
= getModuleId(saa
[i
][1] + " " + saa
[i
][2] + " " + saa
[i
][3] + " " + saa
[i
][4]);
172 saa
[i
][0] = mi
.getName();
173 saa
[i
][2] = mi
.getVersion();
174 saa
[i
][4] = mi
.getPackage().getVersion();
176 // re-evaluate lib instance usage when adding a already-selected lib instance.
178 resolveLibraryInstances(saa
[i
][1] + " " + saa
[i
][2] + " " + saa
[i
][3] + " " + saa
[i
][4]);
179 model1
.addRow(saa
[i
]);
187 public void initModuleSAOptions(String key
) {
189 // display module SA options
191 String fvBinding
= ffc
.getFvBinding(key
);
192 if (fvBinding
!= null) {
193 jTextField
.setText(fvBinding
);
195 String fileGuid
= ffc
.getFfsFileNameGuid(key
);
196 if (fileGuid
!= null) {
197 jTextField1
.setText(fileGuid
);
199 String ffsKey
= ffc
.getFfsFormatKey(key
);
200 if (ffsKey
!= null) {
201 jTextField2
.setText(ffsKey
);
205 private void resolveLibraryInstances(String key
) {
206 ModuleIdentification mi
= getModuleId(key
);
207 PackageIdentification
[] depPkgList
= null;
209 Map
<String
, XmlObject
> m
= GlobalData
.getNativeMsa(mi
);
210 SurfaceAreaQuery
.setDoc(m
);
212 // Get dependency pkg list into which we will search lib instances.
214 depPkgList
= SurfaceAreaQuery
.getDependencePkg(null);
216 // Get the lib class consumed, produced by this module itself.
218 String
[] classConsumed
= SurfaceAreaQuery
.getLibraryClasses("ALWAYS_CONSUMED");
220 if (this.classConsumed
== null) {
221 this.classConsumed
= new HashMap
<String
, ArrayList
<String
>>();
224 for(int i
= 0; i
< classConsumed
.length
; ++i
){
225 ArrayList
<String
> consumedBy
= this.classConsumed
.get(classConsumed
[i
]);
226 if (consumedBy
== null) {
227 consumedBy
= new ArrayList
<String
>();
230 this.classConsumed
.put(classConsumed
[i
], consumedBy
);
233 String
[] classProduced
= SurfaceAreaQuery
.getLibraryClasses("ALWAYS_PRODUCED");
234 if (this.classProduced
== null) {
235 this.classProduced
= new ArrayList
<String
>();
237 for(int i
= 0; i
< classProduced
.length
; ++i
){
238 if (!this.classProduced
.contains(classProduced
[i
])){
239 this.classProduced
.add(classProduced
[i
]);
243 // Get classes unresolved
245 // Iterator<String> lip = this.classProduced.listIterator();
246 // while(lip.hasNext()){
247 // String clsProduced = lip.next();
248 // this.classConsumed.remove(clsProduced);
252 // find potential instances in all dependency pkgs for classes still in classConsumed.
254 if (classInstanceMap
== null){
255 classInstanceMap
= new HashMap
<String
, ArrayList
<String
>>();
257 Iterator
<String
> lic
= this.classConsumed
.keySet().iterator();
258 while(lic
.hasNext()){
259 String cls
= lic
.next();
260 if (this.classProduced
.contains(cls
) || classInstanceMap
.containsKey(cls
)) {
263 ArrayList
<String
> instances
= getInstancesForClass(cls
, depPkgList
);
264 if (instances
.size() == 0){
265 JOptionPane
.showMessageDialog(frame
, "No Applicable Instance for Library Class " +
266 cls
+ ", Platform Build will Fail.");
268 classInstanceMap
.put(cls
, instances
);
272 showClassToResolved();
279 private ArrayList
<String
> getInstancesForClass(String cls
, PackageIdentification
[] depPkgList
) throws Exception
{
280 ArrayList
<String
> al
= new ArrayList
<String
>();
282 for (int i
= 0; i
< depPkgList
.length
; ++i
) {
283 Set
<ModuleIdentification
> smi
= GlobalData
.getModules(depPkgList
[i
]);
284 Iterator ismi
= smi
.iterator();
285 while(ismi
.hasNext()) {
286 ModuleIdentification mi
= (ModuleIdentification
)ismi
.next();
288 String
[] clsProduced
= getClassProduced(mi
);
290 boolean isPotential
= false;
291 for (int j
= 0; j
< clsProduced
.length
; ++j
) {
292 if (clsProduced
[j
] == null) {
295 if (clsProduced
[j
].equals(cls
)){
298 if (classProduced
.contains(clsProduced
[j
])) {
304 al
.add(mi
.getGuid() + " " + mi
.getVersion() + " " +
305 depPkgList
[i
].getGuid() + " " + depPkgList
[i
].getVersion());
313 private void removeInstance(String key
) {
314 ModuleIdentification mi
= getModuleId(key
);
316 // remove pcd information of instance from current ModuleSA
318 ffc
.removePcdData(moduleKey
, mi
);
320 // remove class produced by this instance and add back these produced class to be bound.
322 String
[] clsProduced
= getClassProduced(mi
);
323 for (int i
= 0; i
< clsProduced
.length
; ++i
) {
325 classProduced
.remove(clsProduced
[i
]);
328 // remove class consumed by this instance. we do not need to bound it now.
330 String
[] clsConsumed
= getClassConsumed(mi
);
331 for (int i
= 0; i
< clsConsumed
.length
; ++i
) {
332 ArrayList
<String
> al
= classConsumed
.get(clsConsumed
[i
]);
335 classConsumed
.remove(clsConsumed
[i
]);
339 if (al
.size() == 0) {
340 classConsumed
.remove(clsConsumed
[i
]);
345 showClassToResolved();
349 private ModuleIdentification
getModuleId(String key
){
351 // Get ModuleGuid, ModuleVersion, PackageGuid, PackageVersion into string array.
353 String
[] keyPart
= key
.split(" ");
354 Set
<PackageIdentification
> spi
= GlobalData
.getPackageList();
355 Iterator ispi
= spi
.iterator();
357 while(ispi
.hasNext()) {
358 PackageIdentification pi
= (PackageIdentification
)ispi
.next();
359 if ( !pi
.getGuid().equals(keyPart
[2])){
360 // || !pi.getVersion().equals(keyPart[3])){
363 Set
<ModuleIdentification
> smi
= GlobalData
.getModules(pi
);
364 Iterator ismi
= smi
.iterator();
365 while(ismi
.hasNext()) {
366 ModuleIdentification mi
= (ModuleIdentification
)ismi
.next();
367 if (mi
.getGuid().equals(keyPart
[0])){
368 // && mi.getVersion().equals(keyPart[1])){
376 private String
[] getClassProduced(ModuleIdentification mi
){
379 Map
<String
, XmlObject
> m
= GlobalData
.getNativeMsa(mi
);
380 SurfaceAreaQuery
.setDoc(m
);
381 String
[] clsProduced
= SurfaceAreaQuery
.getLibraryClasses("ALWAYS_PRODUCED");
384 }catch (Exception e
) {
387 return new String
[0];
391 private String
[] getClassConsumed(ModuleIdentification mi
){
393 String
[] clsConsumed
= null;
395 Map
<String
, XmlObject
> m
= GlobalData
.getNativeMsa(mi
);
396 SurfaceAreaQuery
.setDoc(m
);
397 clsConsumed
= SurfaceAreaQuery
.getLibraryClasses("ALWAYS_CONSUMED");
399 }catch (Exception e
) {
405 private void showClassToResolved(){
406 model2
.setRowCount(0);
407 if (classConsumed
.size() == 0) {
410 Iterator
<String
> li
= classConsumed
.keySet().iterator();
413 String
[] s
= {li
.next()};
414 if (classConsumed
.get(s
[0]) == null) {
417 if (classConsumed
.get(s
[0]).size() == 0) {
420 if (!classProduced
.contains(s
[0])){
424 model3
.setRowCount(0);
427 * This method initializes this
431 private void initialize() {
432 this.setSize(664, 515);
435 this.setTitle("Module Settings");
436 this.setContentPane(getJContentPane());
440 * This method initializes jContentPane
442 * @return javax.swing.JPanel
444 private JPanel
getJContentPane() {
445 if (jContentPane
== null) {
446 jContentPane
= new JPanel();
447 jContentPane
.setLayout(new BorderLayout());
448 jContentPane
.add(getJTabbedPane(), java
.awt
.BorderLayout
.CENTER
);
449 jContentPane
.add(getJPanel3(), java
.awt
.BorderLayout
.SOUTH
);
455 * This method initializes jTabbedPane
457 * @return javax.swing.JTabbedPane
459 private JTabbedPane
getJTabbedPane() {
460 if (jTabbedPane
== null) {
461 jTabbedPane
= new JTabbedPane();
462 jTabbedPane
.addTab("PCD Build Definition", null, getJPanel(), null);
463 jTabbedPane
.addTab("Module SA Options", null, getJPanel8(), null);
464 jTabbedPane
.addTab("Libraries", null, getJPanel1(), null);
470 * This method initializes jPanel
472 * @return javax.swing.JPanel
474 private JPanel
getJPanel() {
475 if (jPanel
== null) {
476 jLabel
= new JLabel();
477 jLabel
.setText("PcdData");
478 jPanel
= new JPanel();
479 jPanel
.setLayout(new BorderLayout());
480 jPanel
.add(jLabel
, java
.awt
.BorderLayout
.NORTH
);
481 jPanel
.add(getJScrollPane(), java
.awt
.BorderLayout
.CENTER
);
482 jPanel
.add(getJPanel2(), java
.awt
.BorderLayout
.SOUTH
);
483 jPanel
.addComponentListener(new java
.awt
.event
.ComponentAdapter() {
484 public void componentShown(java
.awt
.event
.ComponentEvent e
) {
485 initPcdBuildDefinition(moduleKey
);
494 * This method initializes jPanel1
496 * @return javax.swing.JPanel
498 private JPanel
getJPanel1() {
499 if (jPanel1
== null) {
500 jPanel1
= new JPanel();
501 jPanel1
.setLayout(new BorderLayout());
502 jPanel1
.add(getJSplitPane(), java
.awt
.BorderLayout
.NORTH
);
503 jPanel1
.add(getJPanel6(), java
.awt
.BorderLayout
.SOUTH
);
504 jPanel1
.add(getJPanel7(), java
.awt
.BorderLayout
.CENTER
);
505 jPanel1
.addComponentListener(new java
.awt
.event
.ComponentAdapter() {
506 public void componentShown(java
.awt
.event
.ComponentEvent e
) {
507 initLibraries(moduleKey
);
515 * This method initializes jScrollPane
517 * @return javax.swing.JScrollPane
519 private JScrollPane
getJScrollPane() {
520 if (jScrollPane
== null) {
521 jScrollPane
= new JScrollPane();
522 jScrollPane
.setViewportView(getJTable());
528 * This method initializes jTable
530 * @return javax.swing.JTable
532 private JTable
getJTable() {
533 if (jTable
== null) {
534 model
= new PartialEditableTableModel();
535 jTable
= new JTable(model
);
536 jTable
.setRowHeight(20);
537 jTable
.setAutoResizeMode(javax
.swing
.JTable
.AUTO_RESIZE_OFF
);
538 model
.addColumn("CName");
539 model
.addColumn("TokenSpaceGUID");
540 model
.addColumn("ItemType");
541 model
.addColumn("Token");
542 model
.addColumn("MaxDatumSize");
543 model
.addColumn("DataType");
544 model
.addColumn("DefaultValue");
546 jTable
.setSelectionMode(ListSelectionModel
.SINGLE_SELECTION
);
547 jTable
.getSelectionModel().addListSelectionListener(new ListSelectionListener(){
548 public void valueChanged(ListSelectionEvent e
) {
550 if (e
.getValueIsAdjusting()){
553 ListSelectionModel lsm
= (ListSelectionModel
)e
.getSource();
554 if (lsm
.isSelectionEmpty()) {
558 int selectedRow
= lsm
.getMinSelectionIndex();
559 String cName
= jTable
.getValueAt(selectedRow
, 0)+"";
560 String
[] pcdInfo
= {"", ""};
561 getPcdInfo(cName
, pcdInfo
);
562 jTextArea
.setText(pcdInfo
[0]);
563 initComboBox(pcdInfo
[1]);
564 jComboBox
.setSelectedItem(pcdInfo
[1]);
565 jTextField3
.setEnabled(true);
566 jTextField3
.setVisible(true);
567 jTextField3
.setText(jTable
.getValueAt(selectedRow
, 4)+"");
568 jTextField4
.setEnabled(true);
569 jTextField4
.setText(jTable
.getValueAt(selectedRow
, 6)+"");
570 if (jTable
.getValueAt(selectedRow
, 5).equals("VOID*")) {
571 if (pcdInfo
[1].equals("FEATURE_FLAG")) {
572 jTextField3
.setVisible(false);
574 else if (pcdInfo
[1].equals("FIXED_AT_BUILD")) {
576 jTextField3
.setEnabled(false);
577 jTextField3
.setText(ffc
.setMaxSizeForPointer(jTable
.getValueAt(selectedRow
, 6)+"")+"");
579 catch(Exception except
){
580 JOptionPane
.showMessageDialog(frame
, "Unacceptable PCD Value: " + except
.getMessage());
584 jTextField3
.setText(jTable
.getValueAt(selectedRow
, 4)+"");
588 jTextField3
.setEnabled(false);
591 if (!jTable
.getValueAt(selectedRow
, 2).equals("DYNAMIC") && !jTable
.getValueAt(selectedRow
, 2).equals("DYNAMIC_EX")) {
592 jTextField4
.setText(jTable
.getValueAt(selectedRow
, 6)+"");
593 if (jTable
.getValueAt(selectedRow
, 2).equals("FEATURE_FLAG")){
594 jTextField4
.setVisible(false);
595 jComboBox1
.setVisible(true);
596 jComboBox1
.setSelectedItem(jTable
.getValueAt(selectedRow
, 6)+"");
599 jTextField4
.setVisible(true);
600 jTextField4
.setEnabled(true);
601 jComboBox1
.setVisible(false);
605 jTextField4
.setEnabled(false);
613 jTable
.getModel().addTableModelListener(new TableModelListener() {
614 public void tableChanged(TableModelEvent arg0
) {
615 // TODO Auto-generated method stub
616 // int row = arg0.getFirstRow();
617 // TableModel m = (TableModel)arg0.getSource();
619 if (arg0
.getType() == TableModelEvent
.UPDATE
){
620 //update xml doc here.
629 private void initComboBox(String originalType
) {
630 jComboBox
.removeAllItems();
631 jComboBox
.addItem(originalType
);
632 if (originalType
.equals("PATCHABLE_IN_MODULE")) {
633 jComboBox
.addItem("FIXED_AT_BUILD");
635 if (originalType
.equals("DYNAMIC")) {
636 jComboBox
.addItem("FIXED_AT_BUILD");
637 jComboBox
.addItem("PATCHABLE_IN_MODULE");
641 private void getPcdInfo(String cName
, String
[] sa
) {
642 String
[][] saa
= new String
[ffc
.getLibraryInstancesCount(moduleKey
)][5];
643 ffc
.getLibraryInstances(moduleKey
, saa
);
646 if (ffc
.getPcdBuildDataInfo(getModuleId(moduleKey
), cName
, sa
)) {
649 for (int j
= 0; j
< saa
.length
; ++j
) {
650 if (ffc
.getPcdBuildDataInfo(getModuleId(saa
[j
][1] + " " + saa
[j
][2] + " " + saa
[j
][3] + " " + saa
[j
][4]),
657 JOptionPane
.showMessageDialog(this, "Get PCD details fail: " + e
.getMessage());
662 * This method initializes jPanel2
664 * @return javax.swing.JPanel
666 private JPanel
getJPanel2() {
667 if (jPanel2
== null) {
668 jLabel5
= new JLabel();
669 jLabel5
.setText("PCD Description");
670 jPanel2
= new JPanel();
671 jPanel2
.setPreferredSize(new java
.awt
.Dimension(607,200));
672 jPanel2
.add(jLabel5
, null);
673 jPanel2
.add(getJScrollPane1(), null);
674 jPanel2
.add(getJPanel9(), null);
680 * This method initializes jScrollPane1
682 * @return javax.swing.JScrollPane
684 private JScrollPane
getJScrollPane1() {
685 if (jScrollPane1
== null) {
686 jScrollPane1
= new JScrollPane();
687 jScrollPane1
.setPreferredSize(new java
.awt
.Dimension(500,100));
688 jScrollPane1
.setViewportView(getJTextArea());
694 * This method initializes jTextArea
696 * @return javax.swing.JTextArea
698 private JTextArea
getJTextArea() {
699 if (jTextArea
== null) {
700 jTextArea
= new JTextArea();
701 jTextArea
.setEditable(false);
707 * This method initializes jPanel3
709 * @return javax.swing.JPanel
711 private JPanel
getJPanel3() {
712 if (jPanel3
== null) {
713 FlowLayout flowLayout
= new FlowLayout();
714 flowLayout
.setAlignment(java
.awt
.FlowLayout
.RIGHT
);
715 jPanel3
= new JPanel();
716 jPanel3
.setLayout(flowLayout
);
717 jPanel3
.add(getJButton2(), null);
718 jPanel3
.add(getJButton3(), null);
724 * This method initializes jSplitPane
726 * @return javax.swing.JSplitPane
728 private JSplitPane
getJSplitPane() {
729 if (jSplitPane
== null) {
730 jSplitPane
= new JSplitPane();
731 jSplitPane
.setDividerLocation(200);
732 jSplitPane
.setLeftComponent(getJPanel4());
733 jSplitPane
.setRightComponent(getJPanel5());
734 jSplitPane
.setPreferredSize(new java
.awt
.Dimension(202,200));
740 * This method initializes jPanel4
742 * @return javax.swing.JPanel
744 private JPanel
getJPanel4() {
745 if (jPanel4
== null) {
746 jLabel1
= new JLabel();
747 jLabel1
.setText("Library Classes Consumed");
748 jPanel4
= new JPanel();
749 jPanel4
.add(jLabel1
, null);
750 jPanel4
.add(getJScrollPane3(), null);
756 * This method initializes jPanel5
758 * @return javax.swing.JPanel
760 private JPanel
getJPanel5() {
761 if (jPanel5
== null) {
762 jLabel2
= new JLabel();
763 jLabel2
.setText("Instances Available");
764 jPanel5
= new JPanel();
765 jPanel5
.add(jLabel2
, null);
766 jPanel5
.add(getJScrollPane4(), null);
772 * This method initializes jScrollPane2
774 * @return javax.swing.JScrollPane
776 private JScrollPane
getJScrollPane2() {
777 if (jScrollPane2
== null) {
778 jScrollPane2
= new JScrollPane();
779 jScrollPane2
.setPreferredSize(new java
.awt
.Dimension(453,150));
780 jScrollPane2
.setViewportView(getJTable1());
786 * This method initializes jTable1
788 * @return javax.swing.JTable
790 private JTable
getJTable1() {
791 if (jTable1
== null) {
792 model1
= new LibraryTableModel();
793 model1
.addColumn("Name");
794 model1
.addColumn("ModuleGUID");
795 model1
.addColumn("ModuleVersion");
796 model1
.addColumn("PackageGUID");
797 model1
.addColumn("PackageVersion");
798 jTable1
= new JTable(model1
);
799 jTable1
.setRowHeight(20);
800 jTable1
.setAutoResizeMode(javax
.swing
.JTable
.AUTO_RESIZE_OFF
);
801 jTable1
.setSelectionMode(ListSelectionModel
.SINGLE_SELECTION
);
808 * This method initializes jScrollPane3
810 * @return javax.swing.JScrollPane
812 private JScrollPane
getJScrollPane3() {
813 if (jScrollPane3
== null) {
814 jScrollPane3
= new JScrollPane();
815 jScrollPane3
.setPreferredSize(new java
.awt
.Dimension(200,170));
816 jScrollPane3
.setViewportView(getJTable2());
822 * This method initializes jTable2
824 * @return javax.swing.JTable
826 private JTable
getJTable2() {
827 if (jTable2
== null) {
828 model2
= new LibraryTableModel();
829 model2
.addColumn("LibraryClass");
830 jTable2
= new JTable(model2
);
831 jTable2
.setRowHeight(20);
832 jTable2
.setShowGrid(false);
833 jTable2
.setSelectionMode(ListSelectionModel
.SINGLE_SELECTION
);
834 jTable2
.getSelectionModel().addListSelectionListener(new ListSelectionListener(){
835 public void valueChanged(ListSelectionEvent e
) {
836 if (e
.getValueIsAdjusting()){
839 ListSelectionModel lsm
= (ListSelectionModel
)e
.getSource();
840 if (lsm
.isSelectionEmpty()) {
844 int selectedRow2
= lsm
.getMinSelectionIndex();
845 if (selectedRow2
< 0) {
849 // display potential lib instances according to class selection
851 model3
.setRowCount(0);
852 String cls
= model2
.getValueAt(selectedRow2
, 0).toString();
853 ArrayList
<String
> al
= classInstanceMap
.get(cls
);
854 ListIterator
<String
> li
= al
.listIterator();
855 while(li
.hasNext()) {
856 String instance
= li
.next();
857 String
[] s
= {"", "", "", "", ""};
858 if (getModuleId(instance
) != null) {
859 s
[0] = getModuleId(instance
).getName();
862 String
[] instancePart
= instance
.split(" ");
863 for (int i
= 0; i
< instancePart
.length
; ++i
){
864 s
[i
+1] = instancePart
[i
];
877 * This method initializes jScrollPane4
879 * @return javax.swing.JScrollPane
881 private JScrollPane
getJScrollPane4() {
882 if (jScrollPane4
== null) {
883 jScrollPane4
= new JScrollPane();
884 jScrollPane4
.setPreferredSize(new java
.awt
.Dimension(450,170));
885 jScrollPane4
.setViewportView(getJTable3());
891 * This method initializes jTable3
893 * @return javax.swing.JTable
895 private JTable
getJTable3() {
896 if (jTable3
== null) {
897 model3
= new LibraryTableModel();
898 model3
.addColumn("Name");
899 model3
.addColumn("ModuleGUID");
900 model3
.addColumn("ModuleVersion");
901 model3
.addColumn("PackageGUID");
902 model3
.addColumn("PackageVersion");
903 jTable3
= new JTable(model3
);
904 jTable3
.setRowHeight(20);
905 jTable3
.setAutoResizeMode(javax
.swing
.JTable
.AUTO_RESIZE_OFF
);
906 jTable3
.setSelectionMode(ListSelectionModel
.SINGLE_SELECTION
);
913 * This method initializes jPanel6
915 * @return javax.swing.JPanel
917 private JPanel
getJPanel6() {
918 if (jPanel6
== null) {
919 jPanel6
= new JPanel();
925 * This method initializes jPanel7
927 * @return javax.swing.JPanel
929 private JPanel
getJPanel7() {
930 if (jPanel7
== null) {
931 jLabel4
= new JLabel();
932 jLabel4
.setText("Instance Description");
933 jLabel3
= new JLabel();
934 jLabel3
.setText("Selected Instances");
935 jPanel7
= new JPanel();
936 jPanel7
.add(jLabel4
, null);
937 jPanel7
.add(getJScrollPane5(), null);
938 jPanel7
.add(getJButton(), null);
939 jPanel7
.add(getJButton1(), null);
940 jPanel7
.add(jLabel3
, null);
941 jPanel7
.add(getJScrollPane2(), null);
947 * This method initializes jScrollPane5
949 * @return javax.swing.JScrollPane
951 private JScrollPane
getJScrollPane5() {
952 if (jScrollPane5
== null) {
953 jScrollPane5
= new JScrollPane();
954 jScrollPane5
.setPreferredSize(new java
.awt
.Dimension(300,50));
955 jScrollPane5
.setViewportView(getJTextArea1());
961 * This method initializes jTextArea1
963 * @return javax.swing.JTextArea
965 private JTextArea
getJTextArea1() {
966 if (jTextArea1
== null) {
967 jTextArea1
= new JTextArea();
968 jTextArea1
.setEditable(false);
974 * This method initializes jButton
976 * @return javax.swing.JButton
978 private JButton
getJButton() {
979 if (jButton
== null) {
980 jButton
= new JButton();
981 jButton
.setPreferredSize(new java
.awt
.Dimension(80,20));
982 jButton
.setText("Add");
983 jButton
.addActionListener(new java
.awt
.event
.ActionListener() {
984 public void actionPerformed(java
.awt
.event
.ActionEvent e
) {
985 int row
= jTable3
.getSelectedRow();
989 Object
[] s
= {model3
.getValueAt(row
, 0), model3
.getValueAt(row
, 1),
990 model3
.getValueAt(row
, 2), model3
.getValueAt(row
, 3),
991 model3
.getValueAt(row
, 4)};
993 String instanceValue
= model3
.getValueAt(row
, 1) + " " +
994 model3
.getValueAt(row
, 2) + " " +
995 model3
.getValueAt(row
, 3) + " " +
996 model3
.getValueAt(row
, 4);
997 ffc
.genLibraryInstance(model3
.getValueAt(row
, 1)+"", model3
.getValueAt(row
, 2)+"", model3
.getValueAt(row
, 3)+"", model3
.getValueAt(row
, 4)+"", moduleKey
);
999 // Add pcd information of selected instance to current moduleSA
1002 ffc
.addFrameworkModulesPcdBuildDefs(getModuleId(instanceValue
), ffc
.getModuleSA(moduleKey
));
1004 catch (Exception exception
) {
1005 JOptionPane
.showMessageDialog(frame
, "PCD Insertion Fail. " + exception
.getMessage());
1007 resolveLibraryInstances(instanceValue
);
1015 * This method initializes jButton1
1017 * @return javax.swing.JButton
1019 private JButton
getJButton1() {
1020 if (jButton1
== null) {
1021 jButton1
= new JButton();
1022 jButton1
.setPreferredSize(new java
.awt
.Dimension(80,20));
1023 jButton1
.setText("Delete");
1024 jButton1
.addActionListener(new java
.awt
.event
.ActionListener() {
1025 public void actionPerformed(java
.awt
.event
.ActionEvent e
) {
1026 int row
= jTable1
.getSelectedRow();
1030 removeInstance(model1
.getValueAt(row
, 1) + " " +
1031 model1
.getValueAt(row
, 2) + " " +
1032 model1
.getValueAt(row
, 3) + " " +
1033 model1
.getValueAt(row
, 4));
1034 ffc
.removeLibraryInstance(moduleKey
, row
);
1035 model1
.removeRow(row
);
1044 * This method initializes jButton2
1046 * @return javax.swing.JButton
1048 private JButton
getJButton2() {
1049 if (jButton2
== null) {
1050 jButton2
= new JButton();
1051 jButton2
.setPreferredSize(new java
.awt
.Dimension(80,20));
1052 jButton2
.setText("Ok");
1053 jButton2
.addActionListener(this);
1059 * This method initializes jButton3
1061 * @return javax.swing.JButton
1063 private JButton
getJButton3() {
1064 if (jButton3
== null) {
1065 jButton3
= new JButton();
1066 jButton3
.setPreferredSize(new java
.awt
.Dimension(80,20));
1067 jButton3
.setText("Cancel");
1068 jButton3
.setVisible(false);
1072 public void actionPerformed(ActionEvent arg0
) {
1074 if (arg0
.getSource() == jButton2
) {
1075 // ffc.removeLibraryInstances(moduleKey);
1076 // for (int i = 0; i < model1.getRowCount(); ++i) {
1077 // String mg = model1.getValueAt(i, 1)+"";
1078 // String mv = model1.getValueAt(i, 2)+"";
1079 // String pg = model1.getValueAt(i, 3)+"";
1080 // String pv = model1.getValueAt(i, 4)+"";
1081 // ffc.genLibraryInstance(mg, mv, pg, pv, moduleKey);
1083 this.setVisible(false);
1087 * This method initializes jPanel8
1089 * @return javax.swing.JPanel
1091 private JPanel
getJPanel8() {
1092 if (jPanel8
== null) {
1093 jLabel8
= new JLabel();
1094 jLabel8
.setText("FFS Format Key");
1095 jLabel7
= new JLabel();
1096 jLabel7
.setText("FFS File GUID");
1097 jLabel6
= new JLabel();
1098 jLabel6
.setText("FV Binding");
1099 jPanel8
= new JPanel();
1100 jPanel8
.add(jLabel6
, null);
1101 jPanel8
.add(getJTextField(), null);
1102 jPanel8
.add(jLabel7
, null);
1103 jPanel8
.add(getJTextField1(), null);
1104 jPanel8
.add(jLabel8
, null);
1105 jPanel8
.add(getJTextField2(), null);
1106 jPanel8
.add(getJScrollPane6(), null);
1107 jPanel8
.add(getJButton4(), null);
1108 jPanel8
.add(getJButton5(), null);
1109 jPanel8
.addComponentListener(new java
.awt
.event
.ComponentAdapter() {
1110 public void componentShown(java
.awt
.event
.ComponentEvent e
) {
1111 initModuleSAOptions(moduleKey
);
1118 * This method initializes jTextField
1120 * @return javax.swing.JTextField
1122 private JTextField
getJTextField() {
1123 if (jTextField
== null) {
1124 jTextField
= new JTextField();
1125 jTextField
.setPreferredSize(new java
.awt
.Dimension(100,20));
1126 jTextField
.addFocusListener(new java
.awt
.event
.FocusAdapter() {
1127 public void focusLost(java
.awt
.event
.FocusEvent e
) {
1128 ffc
.setFvBinding(moduleKey
, jTextField
.getText());
1135 * This method initializes jTextField1
1137 * @return javax.swing.JTextField
1139 private JTextField
getJTextField1() {
1140 if (jTextField1
== null) {
1141 jTextField1
= new JTextField();
1142 jTextField1
.setPreferredSize(new java
.awt
.Dimension(100,20));
1143 jTextField1
.addFocusListener(new java
.awt
.event
.FocusAdapter() {
1144 public void focusLost(java
.awt
.event
.FocusEvent e
) {
1145 ffc
.setFfsFileNameGuid(moduleKey
, jTextField1
.getText());
1152 * This method initializes jTextField2
1154 * @return javax.swing.JTextField
1156 private JTextField
getJTextField2() {
1157 if (jTextField2
== null) {
1158 jTextField2
= new JTextField();
1159 jTextField2
.setPreferredSize(new java
.awt
.Dimension(100,20));
1160 jTextField2
.addFocusListener(new java
.awt
.event
.FocusAdapter() {
1161 public void focusLost(java
.awt
.event
.FocusEvent e
) {
1162 ffc
.setFfsFormatKey(moduleKey
, jTextField2
.getText());
1169 * This method initializes jScrollPane6
1171 * @return javax.swing.JScrollPane
1173 private JScrollPane
getJScrollPane6() {
1174 if (jScrollPane6
== null) {
1175 jScrollPane6
= new JScrollPane();
1176 jScrollPane6
.setPreferredSize(new java
.awt
.Dimension(600,200));
1177 jScrollPane6
.setViewportView(getJTable4());
1179 return jScrollPane6
;
1182 * This method initializes jTable4
1184 * @return javax.swing.JTable
1186 private JTable
getJTable4() {
1187 if (jTable4
== null) {
1188 optionsTableModel
= new DefaultTableModel();
1189 optionsTableModel
.addColumn("BuildTargets");
1190 optionsTableModel
.addColumn("ToolChainFamily");
1191 optionsTableModel
.addColumn("TagName");
1192 optionsTableModel
.addColumn("ToolCode");
1193 optionsTableModel
.addColumn("SupportedArchs");
1194 optionsTableModel
.addColumn("Contents");
1195 jTable4
= new JTable(optionsTableModel
);
1196 jTable4
.setRowHeight(20);
1197 Vector
<String
> vArch
= new Vector
<String
>();
1204 jTable4
.getColumnModel().getColumn(4).setCellEditor(new ListEditor(vArch
));
1205 jTable4
.setSelectionMode(ListSelectionModel
.SINGLE_SELECTION
);
1206 jTable4
.setAutoResizeMode(javax
.swing
.JTable
.AUTO_RESIZE_OFF
);
1207 jTable4
.getModel().addTableModelListener(new TableModelListener() {
1208 public void tableChanged(TableModelEvent arg0
) {
1209 // TODO Auto-generated method stub
1210 int row
= arg0
.getFirstRow();
1211 TableModel m
= (TableModel
)arg0
.getSource();
1213 if (arg0
.getType() == TableModelEvent
.UPDATE
){
1214 //ToDo Data Validition check.
1215 String targets
= m
.getValueAt(row
, 0) + "";
1216 Vector
<Object
> targetName
= null;
1217 if (targets
.length() > 0) {
1218 targetName
= new Vector
<Object
>();
1219 String
[] sArray
= targets
.split(" ");
1220 for (int i
= 0; i
< sArray
.length
; ++i
) {
1221 targetName
.add(sArray
[i
]);
1225 String toolChain
= m
.getValueAt(row
, 1) + "";
1226 String tagName
= m
.getValueAt(row
, 2) + "";
1227 String toolCode
= m
.getValueAt(row
, 3) + "";
1228 String archs
= m
.getValueAt(row
, 4) + "";
1229 Vector
<Object
> supArch
= null;
1230 if (archs
.length() > 0) {
1231 supArch
= new Vector
<Object
>();
1232 String
[] sArray1
= archs
.split(" ");
1233 for (int i
= 0; i
< sArray1
.length
; ++i
) {
1234 supArch
.add(sArray1
[i
]);
1238 String contents
= m
.getValueAt(row
, 5) + "";
1240 ffc
.updateModuleSAOptionsOpt(moduleKey
, row
, targetName
, toolChain
, tagName
, toolCode
, supArch
, contents
);
1248 * This method initializes jButton4
1250 * @return javax.swing.JButton
1252 private JButton
getJButton4() {
1253 if (jButton4
== null) {
1254 jButton4
= new JButton();
1255 jButton4
.setPreferredSize(new java
.awt
.Dimension(80,20));
1256 jButton4
.setText("New");
1257 jButton4
.addActionListener(new java
.awt
.event
.ActionListener() {
1258 public void actionPerformed(java
.awt
.event
.ActionEvent e
) {
1259 String
[] row
= {"", "", "", "", "IA32", ""};
1260 optionsTableModel
.addRow(row
);
1261 Vector
<Object
> v
= new Vector
<Object
>();
1262 Vector
<Object
> v1
= new Vector
<Object
>();
1264 ffc
.genModuleSAOptionsOpt(moduleKey
, v
, "", "", "", v1
, "");
1271 * This method initializes jButton5
1273 * @return javax.swing.JButton
1275 private JButton
getJButton5() {
1276 if (jButton5
== null) {
1277 jButton5
= new JButton();
1278 jButton5
.setPreferredSize(new java
.awt
.Dimension(80,20));
1279 jButton5
.setText("Delete");
1280 jButton5
.addActionListener(new java
.awt
.event
.ActionListener() {
1281 public void actionPerformed(java
.awt
.event
.ActionEvent e
) {
1282 if (jTable4
.getSelectedRow() < 0) {
1286 ffc
.removeModuleSAOptionsOpt(moduleKey
, jTable4
.getSelectedRow());
1287 optionsTableModel
.removeRow(jTable4
.getSelectedRow());
1295 Start the window at the center of screen
1298 protected void centerWindow(int intWidth
, int intHeight
) {
1299 Dimension d
= Toolkit
.getDefaultToolkit().getScreenSize();
1300 this.setLocation((d
.width
- intWidth
) / 2, (d
.height
- intHeight
) / 2);
1304 Start the window at the center of screen
1307 protected void centerWindow() {
1308 centerWindow(this.getSize().width
, this.getSize().height
);
1311 * This method initializes jPanel9
1313 * @return javax.swing.JPanel
1315 private JPanel
getJPanel9() {
1316 if (jPanel9
== null) {
1317 GridLayout gridLayout
= new GridLayout();
1318 gridLayout
.setRows(3);
1319 gridLayout
.setColumns(2);
1320 jPanel9
= new JPanel();
1321 jPanel9
.setLayout(gridLayout
);
1322 jPanel9
.setPreferredSize(new java
.awt
.Dimension(600,90));
1323 jPanel9
.add(getJPanel12(), null);
1324 jPanel9
.add(getJPanel10(), null);
1325 jPanel9
.add(getJPanel11(), null);
1330 * This method initializes jPanel10
1332 * @return javax.swing.JPanel
1334 private JPanel
getJPanel10() {
1335 if (jPanel10
== null) {
1336 FlowLayout flowLayout2
= new FlowLayout();
1337 flowLayout2
.setAlignment(java
.awt
.FlowLayout
.LEFT
);
1338 jLabel10
= new JLabel();
1339 jLabel10
.setText("Max Datum Size");
1340 jPanel10
= new JPanel();
1341 jPanel10
.setLayout(flowLayout2
);
1342 jPanel10
.add(jLabel10
, null);
1343 jPanel10
.add(getJTextField3(), null);
1348 * This method initializes jPanel11
1350 * @return javax.swing.JPanel
1352 private JPanel
getJPanel11() {
1353 if (jPanel11
== null) {
1354 FlowLayout flowLayout3
= new FlowLayout();
1355 flowLayout3
.setAlignment(java
.awt
.FlowLayout
.LEFT
);
1356 jLabel11
= new JLabel();
1357 jLabel11
.setText("Default Value");
1358 jLabel11
.setPreferredSize(new java
.awt
.Dimension(91,16));
1359 jPanel11
= new JPanel();
1360 jPanel11
.setLayout(flowLayout3
);
1361 jPanel11
.add(jLabel11
, null);
1362 jPanel11
.add(getJTextField4(), null);
1363 jPanel11
.add(getJComboBox1(), null);
1368 * This method initializes jPanel12
1370 * @return javax.swing.JPanel
1372 private JPanel
getJPanel12() {
1373 if (jPanel12
== null) {
1374 FlowLayout flowLayout1
= new FlowLayout();
1375 flowLayout1
.setAlignment(java
.awt
.FlowLayout
.LEFT
);
1376 jLabel9
= new JLabel();
1377 jLabel9
.setText("Item Type");
1378 jLabel9
.setPreferredSize(new java
.awt
.Dimension(91,16));
1379 jPanel12
= new JPanel();
1380 jPanel12
.setLayout(flowLayout1
);
1381 jPanel12
.add(jLabel9
, null);
1382 jPanel12
.add(getJComboBox(), null);
1383 jPanel12
.add(getJButton6(), null);
1388 * This method initializes jComboBox
1390 * @return javax.swing.JComboBox
1392 private JComboBox
getJComboBox() {
1393 if (jComboBox
== null) {
1394 jComboBox
= new JComboBox();
1395 jComboBox
.setPreferredSize(new java
.awt
.Dimension(200,20));
1396 jComboBox
.addItemListener(new java
.awt
.event
.ItemListener() {
1397 public void itemStateChanged(java
.awt
.event
.ItemEvent e
) {
1398 int row
= jTable
.getSelectedRow();
1399 if (row
< 0 || jTable
.getValueAt(row
, 2).equals(jComboBox
.getSelectedItem())) {
1402 if (jComboBox
.getItemCount() == 3) {
1403 if (!jComboBox
.getSelectedItem().equals("DYNAMIC")) {
1404 pcdDynamicToNonDynamic(jTable
.getValueAt(row
, 0)+"", jTable
.getValueAt(row
, 1)+"");
1407 pcdNonDynamicToDynamic(jTable
.getValueAt(row
, 0)+"", jTable
.getValueAt(row
, 1)+"");
1416 private void pcdDynamicToNonDynamic(String cName
, String tsGuid
) {
1417 String
[][] saa
= new String
[ffc
.getDynamicPcdBuildDataCount()][5];
1418 ffc
.getDynamicPcdBuildData(saa
);
1419 String maxSize
= "";
1421 for (int i
= 0; i
< saa
.length
; ++i
) {
1422 if (saa
[i
][0].equals(cName
) && saa
[i
][2].equals(tsGuid
)) {
1423 maxSize
= saa
[i
][3];
1424 value
= ffc
.getDynamicPcdBuildDataValue(i
);
1429 ArrayList
<String
> al
= ffc
.getDynPcdMapValue(cName
+ " " + tsGuid
);
1430 for (int i
= 0; i
< al
.size(); ++i
) {
1431 String
[] s
= al
.get(i
).split(" ");
1432 String mKey
= s
[0] + s
[1] + s
[2] + s
[3];
1433 ffc
.updatePcdData(mKey
, cName
, tsGuid
, jComboBox
.getSelectedItem()+"", maxSize
, value
);
1434 s
[4] = jComboBox
.getSelectedItem()+"";
1435 al
.set(i
, s
[0]+" "+s
[1]+" "+s
[2]+" "+s
[3]+" "+s
[4]);
1438 ffc
.removeDynamicPcdBuildData(cName
, tsGuid
);
1441 private void pcdNonDynamicToDynamic(String cName
, String tsGuid
) {
1442 ArrayList
<String
> al
= ffc
.getDynPcdMapValue(cName
+ " " + tsGuid
);
1443 for (int i
= 0; i
< al
.size(); ++i
) {
1444 String
[] s
= al
.get(i
).split(" ");
1445 String mKey
= s
[0] + s
[1] + s
[2] + s
[3];
1446 ffc
.updatePcdData(mKey
, cName
, tsGuid
, jComboBox
.getSelectedItem()+"", jTextField3
.getText(), jTextField4
.isVisible() ? jTextField4
.getText() : jComboBox1
.getSelectedItem()+"");
1447 s
[4] = jComboBox
.getSelectedItem()+"";
1448 al
.set(i
, s
[0]+" "+s
[1]+" "+s
[2]+" "+s
[3]+" "+s
[4]);
1451 ffc
.addDynamicPcdBuildData(cName
, jTable
.getValueAt(jTable
.getSelectedRow(), 3), tsGuid
, "DYNAMIC", jTable
.getValueAt(jTable
.getSelectedRow(), 5)+"", jTextField4
.isVisible() ? jTextField4
.getText() : jComboBox1
.getSelectedItem()+"");
1454 JOptionPane
.showMessageDialog(frame
, "PCD value format: " + e
.getMessage());
1458 * This method initializes jTextField3
1460 * @return javax.swing.JTextField
1462 private JTextField
getJTextField3() {
1463 if (jTextField3
== null) {
1464 jTextField3
= new JTextField();
1465 jTextField3
.setPreferredSize(new java
.awt
.Dimension(200,20));
1470 * This method initializes jTextField4
1472 * @return javax.swing.JTextField
1474 private JTextField
getJTextField4() {
1475 if (jTextField4
== null) {
1476 jTextField4
= new JTextField();
1477 jTextField4
.setPreferredSize(new java
.awt
.Dimension(200,20));
1482 * This method initializes jButton6
1484 * @return javax.swing.JButton
1486 private JButton
getJButton6() {
1487 if (jButton6
== null) {
1488 jButton6
= new JButton();
1489 jButton6
.setPreferredSize(new java
.awt
.Dimension(150,20));
1490 jButton6
.setText("Update PCD Data");
1491 jButton6
.addActionListener(new java
.awt
.event
.ActionListener() {
1492 public void actionPerformed(java
.awt
.event
.ActionEvent e
) {
1493 int row
= jTable
.getSelectedRow();
1497 model
.setValueAt(jComboBox
.getSelectedItem(), row
, 2);
1498 model
.setValueAt(jTextField3
.getText(), row
, 4);
1499 model
.setValueAt(jTextField4
.isVisible()? jTextField4
.getText():jComboBox1
.getSelectedItem(), row
, 6);
1500 ffc
.updatePcdData(moduleKey
, model
.getValueAt(row
, 0)+"", model
.getValueAt(row
, 1)+"", model
.getValueAt(row
, 2)+"", model
.getValueAt(row
, 4)+"", model
.getValueAt(row
, 6)+"");
1507 * This method initializes jComboBox1
1509 * @return javax.swing.JComboBox
1511 private JComboBox
getJComboBox1() {
1512 if (jComboBox1
== null) {
1513 jComboBox1
= new JComboBox();
1514 jComboBox1
.setPreferredSize(new java
.awt
.Dimension(100,20));
1515 jComboBox1
.setVisible(false);
1516 jComboBox1
.addItem("true");
1517 jComboBox1
.addItem("false");
1523 } // @jve:decl-index=0:visual-constraint="10,10"
1525 class PartialEditableTableModel
extends DefaultTableModel
{
1529 private static final long serialVersionUID
= 1L;
1531 public boolean isCellEditable(int row
, int col
) {
1542 class LibraryTableModel
extends DefaultTableModel
{
1546 private static final long serialVersionUID
= 1L;
1548 public boolean isCellEditable(int row
, int col
) {