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
, int i
){
134 jTabbedPane
.setSelectedIndex(0);
135 initPcdBuildDefinition(i
);
139 init will be called each time FpdModuleSA object is to be shown.
140 @param key Module information.
142 public void initPcdBuildDefinition(int i
) {
144 // display pcd for key.
146 model
.setRowCount(0);
147 int pcdCount
= ffc
.getPcdDataCount(i
);
149 String
[][] saa
= new String
[pcdCount
][7];
150 ffc
.getPcdData(i
, saa
);
151 for (int j
= 0; j
< saa
.length
; ++j
) {
152 model
.addRow(saa
[j
]);
157 public void initLibraries(String key
) {
159 // display library classes that need to be resolved. also potential instances for them.
161 resolveLibraryInstances(key
);
163 // display lib instances already selected for key
165 model1
.setRowCount(0);
166 int instanceCount
= ffc
.getLibraryInstancesCount(key
);
167 if (instanceCount
!= 0) {
168 String
[][] saa
= new String
[instanceCount
][5];
169 ffc
.getLibraryInstances(key
, saa
);
170 for (int i
= 0; i
< saa
.length
; ++i
) {
171 ModuleIdentification mi
= getModuleId(saa
[i
][1] + " " + saa
[i
][2] + " " + saa
[i
][3] + " " + saa
[i
][4]);
173 saa
[i
][0] = mi
.getName();
174 saa
[i
][2] = mi
.getVersion();
175 saa
[i
][4] = mi
.getPackage().getVersion();
177 // re-evaluate lib instance usage when adding a already-selected lib instance.
179 resolveLibraryInstances(saa
[i
][1] + " " + saa
[i
][2] + " " + saa
[i
][3] + " " + saa
[i
][4]);
180 model1
.addRow(saa
[i
]);
188 public void initModuleSAOptions(String key
) {
190 // display module SA options
192 String fvBinding
= ffc
.getFvBinding(key
);
193 if (fvBinding
!= null) {
194 jTextField
.setText(fvBinding
);
196 String fileGuid
= ffc
.getFfsFileNameGuid(key
);
197 if (fileGuid
!= null) {
198 jTextField1
.setText(fileGuid
);
200 String ffsKey
= ffc
.getFfsFormatKey(key
);
201 if (ffsKey
!= null) {
202 jTextField2
.setText(ffsKey
);
206 private void resolveLibraryInstances(String key
) {
207 ModuleIdentification mi
= getModuleId(key
);
208 PackageIdentification
[] depPkgList
= null;
210 Map
<String
, XmlObject
> m
= GlobalData
.getNativeMsa(mi
);
211 SurfaceAreaQuery
.setDoc(m
);
213 // Get dependency pkg list into which we will search lib instances.
215 depPkgList
= SurfaceAreaQuery
.getDependencePkg(null);
217 // Get the lib class consumed, produced by this module itself.
219 String
[] classConsumed
= SurfaceAreaQuery
.getLibraryClasses("ALWAYS_CONSUMED");
221 if (this.classConsumed
== null) {
222 this.classConsumed
= new HashMap
<String
, ArrayList
<String
>>();
225 for(int i
= 0; i
< classConsumed
.length
; ++i
){
226 ArrayList
<String
> consumedBy
= this.classConsumed
.get(classConsumed
[i
]);
227 if (consumedBy
== null) {
228 consumedBy
= new ArrayList
<String
>();
231 this.classConsumed
.put(classConsumed
[i
], consumedBy
);
234 String
[] classProduced
= SurfaceAreaQuery
.getLibraryClasses("ALWAYS_PRODUCED");
235 if (this.classProduced
== null) {
236 this.classProduced
= new ArrayList
<String
>();
238 for(int i
= 0; i
< classProduced
.length
; ++i
){
239 if (!this.classProduced
.contains(classProduced
[i
])){
240 this.classProduced
.add(classProduced
[i
]);
244 // Get classes unresolved
246 // Iterator<String> lip = this.classProduced.listIterator();
247 // while(lip.hasNext()){
248 // String clsProduced = lip.next();
249 // this.classConsumed.remove(clsProduced);
253 // find potential instances in all dependency pkgs for classes still in classConsumed.
255 if (classInstanceMap
== null){
256 classInstanceMap
= new HashMap
<String
, ArrayList
<String
>>();
258 Iterator
<String
> lic
= this.classConsumed
.keySet().iterator();
259 while(lic
.hasNext()){
260 String cls
= lic
.next();
261 if (this.classProduced
.contains(cls
) || classInstanceMap
.containsKey(cls
)) {
264 ArrayList
<String
> instances
= getInstancesForClass(cls
, depPkgList
);
265 if (instances
.size() == 0){
266 JOptionPane
.showMessageDialog(frame
, "No Applicable Instance for Library Class " +
267 cls
+ ", Platform Build will Fail.");
269 classInstanceMap
.put(cls
, instances
);
273 showClassToResolved();
280 private ArrayList
<String
> getInstancesForClass(String cls
, PackageIdentification
[] depPkgList
) throws Exception
{
281 ArrayList
<String
> al
= new ArrayList
<String
>();
283 for (int i
= 0; i
< depPkgList
.length
; ++i
) {
284 Set
<ModuleIdentification
> smi
= GlobalData
.getModules(depPkgList
[i
]);
285 Iterator ismi
= smi
.iterator();
286 while(ismi
.hasNext()) {
287 ModuleIdentification mi
= (ModuleIdentification
)ismi
.next();
289 String
[] clsProduced
= getClassProduced(mi
);
291 boolean isPotential
= false;
292 for (int j
= 0; j
< clsProduced
.length
; ++j
) {
293 if (clsProduced
[j
] == null) {
296 if (clsProduced
[j
].equals(cls
)){
299 if (classProduced
.contains(clsProduced
[j
])) {
305 al
.add(mi
.getGuid() + " " + mi
.getVersion() + " " +
306 depPkgList
[i
].getGuid() + " " + depPkgList
[i
].getVersion());
314 private void removeInstance(String key
) {
315 ModuleIdentification mi
= getModuleId(key
);
317 // remove pcd information of instance from current ModuleSA
319 ffc
.removePcdData(moduleKey
, mi
);
321 // remove class produced by this instance and add back these produced class to be bound.
323 String
[] clsProduced
= getClassProduced(mi
);
324 for (int i
= 0; i
< clsProduced
.length
; ++i
) {
326 classProduced
.remove(clsProduced
[i
]);
329 // remove class consumed by this instance. we do not need to bound it now.
331 String
[] clsConsumed
= getClassConsumed(mi
);
332 for (int i
= 0; i
< clsConsumed
.length
; ++i
) {
333 ArrayList
<String
> al
= classConsumed
.get(clsConsumed
[i
]);
336 classConsumed
.remove(clsConsumed
[i
]);
340 if (al
.size() == 0) {
341 classConsumed
.remove(clsConsumed
[i
]);
346 showClassToResolved();
350 private ModuleIdentification
getModuleId(String key
){
352 // Get ModuleGuid, ModuleVersion, PackageGuid, PackageVersion into string array.
354 String
[] keyPart
= key
.split(" ");
355 Set
<PackageIdentification
> spi
= GlobalData
.getPackageList();
356 Iterator ispi
= spi
.iterator();
358 while(ispi
.hasNext()) {
359 PackageIdentification pi
= (PackageIdentification
)ispi
.next();
360 if ( !pi
.getGuid().equals(keyPart
[2])){
361 // || !pi.getVersion().equals(keyPart[3])){
364 Set
<ModuleIdentification
> smi
= GlobalData
.getModules(pi
);
365 Iterator ismi
= smi
.iterator();
366 while(ismi
.hasNext()) {
367 ModuleIdentification mi
= (ModuleIdentification
)ismi
.next();
368 if (mi
.getGuid().equals(keyPart
[0])){
369 // && mi.getVersion().equals(keyPart[1])){
377 private String
[] getClassProduced(ModuleIdentification mi
){
380 Map
<String
, XmlObject
> m
= GlobalData
.getNativeMsa(mi
);
381 SurfaceAreaQuery
.setDoc(m
);
382 String
[] clsProduced
= SurfaceAreaQuery
.getLibraryClasses("ALWAYS_PRODUCED");
385 }catch (Exception e
) {
388 return new String
[0];
392 private String
[] getClassConsumed(ModuleIdentification mi
){
394 String
[] clsConsumed
= null;
396 Map
<String
, XmlObject
> m
= GlobalData
.getNativeMsa(mi
);
397 SurfaceAreaQuery
.setDoc(m
);
398 clsConsumed
= SurfaceAreaQuery
.getLibraryClasses("ALWAYS_CONSUMED");
400 }catch (Exception e
) {
406 private void showClassToResolved(){
407 model2
.setRowCount(0);
408 if (classConsumed
.size() == 0) {
411 Iterator
<String
> li
= classConsumed
.keySet().iterator();
414 String
[] s
= {li
.next()};
415 if (classConsumed
.get(s
[0]) == null) {
418 if (classConsumed
.get(s
[0]).size() == 0) {
421 if (!classProduced
.contains(s
[0])){
425 model3
.setRowCount(0);
428 * This method initializes this
432 private void initialize() {
433 this.setSize(664, 515);
436 this.setTitle("Module Settings");
437 this.setContentPane(getJContentPane());
441 * This method initializes jContentPane
443 * @return javax.swing.JPanel
445 private JPanel
getJContentPane() {
446 if (jContentPane
== null) {
447 jContentPane
= new JPanel();
448 jContentPane
.setLayout(new BorderLayout());
449 jContentPane
.add(getJTabbedPane(), java
.awt
.BorderLayout
.CENTER
);
450 jContentPane
.add(getJPanel3(), java
.awt
.BorderLayout
.SOUTH
);
456 * This method initializes jTabbedPane
458 * @return javax.swing.JTabbedPane
460 private JTabbedPane
getJTabbedPane() {
461 if (jTabbedPane
== null) {
462 jTabbedPane
= new JTabbedPane();
463 jTabbedPane
.addTab("PCD Build Definition", null, getJPanel(), null);
464 jTabbedPane
.addTab("Module SA Options", null, getJPanel8(), null);
465 jTabbedPane
.addTab("Libraries", null, getJPanel1(), null);
471 * This method initializes jPanel
473 * @return javax.swing.JPanel
475 private JPanel
getJPanel() {
476 if (jPanel
== null) {
477 jLabel
= new JLabel();
478 jLabel
.setText("PcdData");
479 jPanel
= new JPanel();
480 jPanel
.setLayout(new BorderLayout());
481 jPanel
.add(jLabel
, java
.awt
.BorderLayout
.NORTH
);
482 jPanel
.add(getJScrollPane(), java
.awt
.BorderLayout
.CENTER
);
483 jPanel
.add(getJPanel2(), java
.awt
.BorderLayout
.SOUTH
);
484 jPanel
.addComponentListener(new java
.awt
.event
.ComponentAdapter() {
485 public void componentShown(java
.awt
.event
.ComponentEvent e
) {
486 // initPcdBuildDefinition(moduleKey);
495 * This method initializes jPanel1
497 * @return javax.swing.JPanel
499 private JPanel
getJPanel1() {
500 if (jPanel1
== null) {
501 jPanel1
= new JPanel();
502 jPanel1
.setLayout(new BorderLayout());
503 jPanel1
.add(getJSplitPane(), java
.awt
.BorderLayout
.NORTH
);
504 jPanel1
.add(getJPanel6(), java
.awt
.BorderLayout
.SOUTH
);
505 jPanel1
.add(getJPanel7(), java
.awt
.BorderLayout
.CENTER
);
506 jPanel1
.addComponentListener(new java
.awt
.event
.ComponentAdapter() {
507 public void componentShown(java
.awt
.event
.ComponentEvent e
) {
508 initLibraries(moduleKey
);
516 * This method initializes jScrollPane
518 * @return javax.swing.JScrollPane
520 private JScrollPane
getJScrollPane() {
521 if (jScrollPane
== null) {
522 jScrollPane
= new JScrollPane();
523 jScrollPane
.setViewportView(getJTable());
529 * This method initializes jTable
531 * @return javax.swing.JTable
533 private JTable
getJTable() {
534 if (jTable
== null) {
535 model
= new PartialEditableTableModel();
536 jTable
= new JTable(model
);
537 jTable
.setRowHeight(20);
538 jTable
.setAutoResizeMode(javax
.swing
.JTable
.AUTO_RESIZE_OFF
);
539 model
.addColumn("CName");
540 model
.addColumn("TokenSpaceGUID");
541 model
.addColumn("ItemType");
542 model
.addColumn("Token");
543 model
.addColumn("MaxDatumSize");
544 model
.addColumn("DataType");
545 model
.addColumn("DefaultValue");
547 jTable
.setSelectionMode(ListSelectionModel
.SINGLE_SELECTION
);
548 jTable
.getSelectionModel().addListSelectionListener(new ListSelectionListener(){
549 public void valueChanged(ListSelectionEvent e
) {
551 if (e
.getValueIsAdjusting()){
554 ListSelectionModel lsm
= (ListSelectionModel
)e
.getSource();
555 if (lsm
.isSelectionEmpty()) {
559 int selectedRow
= lsm
.getMinSelectionIndex();
560 String cName
= jTable
.getValueAt(selectedRow
, 0)+"";
561 String
[] pcdInfo
= {"", ""};
562 getPcdInfo(cName
, pcdInfo
);
563 jTextArea
.setText(pcdInfo
[0]);
564 initComboBox(pcdInfo
[1]);
565 jComboBox
.setSelectedItem(pcdInfo
[1]);
566 jTextField3
.setEnabled(true);
567 jTextField3
.setVisible(true);
568 jTextField3
.setText(jTable
.getValueAt(selectedRow
, 4)+"");
569 jTextField4
.setEnabled(true);
570 jTextField4
.setText(jTable
.getValueAt(selectedRow
, 6)+"");
571 if (jTable
.getValueAt(selectedRow
, 5).equals("VOID*")) {
572 if (pcdInfo
[1].equals("FEATURE_FLAG")) {
573 jTextField3
.setVisible(false);
575 else if (pcdInfo
[1].equals("FIXED_AT_BUILD")) {
577 jTextField3
.setEnabled(false);
578 jTextField3
.setText(ffc
.setMaxSizeForPointer(jTable
.getValueAt(selectedRow
, 6)+"")+"");
580 catch(Exception except
){
581 JOptionPane
.showMessageDialog(frame
, "Unacceptable PCD Value: " + except
.getMessage());
585 jTextField3
.setText(jTable
.getValueAt(selectedRow
, 4)+"");
589 jTextField3
.setEnabled(false);
592 if (!jTable
.getValueAt(selectedRow
, 2).equals("DYNAMIC") && !jTable
.getValueAt(selectedRow
, 2).equals("DYNAMIC_EX")) {
593 jTextField4
.setText(jTable
.getValueAt(selectedRow
, 6)+"");
594 if (jTable
.getValueAt(selectedRow
, 2).equals("FEATURE_FLAG")){
595 jTextField4
.setVisible(false);
596 jComboBox1
.setVisible(true);
597 jComboBox1
.setSelectedItem(jTable
.getValueAt(selectedRow
, 6)+"");
600 jTextField4
.setVisible(true);
601 jTextField4
.setEnabled(true);
602 jComboBox1
.setVisible(false);
606 jTextField4
.setEnabled(false);
614 jTable
.getModel().addTableModelListener(new TableModelListener() {
615 public void tableChanged(TableModelEvent arg0
) {
616 // TODO Auto-generated method stub
617 // int row = arg0.getFirstRow();
618 // TableModel m = (TableModel)arg0.getSource();
620 if (arg0
.getType() == TableModelEvent
.UPDATE
){
621 //update xml doc here.
630 private void initComboBox(String originalType
) {
631 jComboBox
.removeAllItems();
632 jComboBox
.addItem(originalType
);
633 if (originalType
.equals("PATCHABLE_IN_MODULE")) {
634 jComboBox
.addItem("FIXED_AT_BUILD");
636 if (originalType
.equals("DYNAMIC")) {
637 jComboBox
.addItem("FIXED_AT_BUILD");
638 jComboBox
.addItem("PATCHABLE_IN_MODULE");
642 private void getPcdInfo(String cName
, String
[] sa
) {
643 String
[][] saa
= new String
[ffc
.getLibraryInstancesCount(moduleKey
)][5];
644 ffc
.getLibraryInstances(moduleKey
, saa
);
647 if (ffc
.getPcdBuildDataInfo(getModuleId(moduleKey
), cName
, sa
)) {
650 for (int j
= 0; j
< saa
.length
; ++j
) {
651 if (ffc
.getPcdBuildDataInfo(getModuleId(saa
[j
][1] + " " + saa
[j
][2] + " " + saa
[j
][3] + " " + saa
[j
][4]),
658 JOptionPane
.showMessageDialog(this, "Get PCD details fail: " + e
.getMessage());
663 * This method initializes jPanel2
665 * @return javax.swing.JPanel
667 private JPanel
getJPanel2() {
668 if (jPanel2
== null) {
669 jLabel5
= new JLabel();
670 jLabel5
.setText("PCD Description");
671 jPanel2
= new JPanel();
672 jPanel2
.setPreferredSize(new java
.awt
.Dimension(607,200));
673 jPanel2
.add(jLabel5
, null);
674 jPanel2
.add(getJScrollPane1(), null);
675 jPanel2
.add(getJPanel9(), null);
681 * This method initializes jScrollPane1
683 * @return javax.swing.JScrollPane
685 private JScrollPane
getJScrollPane1() {
686 if (jScrollPane1
== null) {
687 jScrollPane1
= new JScrollPane();
688 jScrollPane1
.setPreferredSize(new java
.awt
.Dimension(500,100));
689 jScrollPane1
.setViewportView(getJTextArea());
695 * This method initializes jTextArea
697 * @return javax.swing.JTextArea
699 private JTextArea
getJTextArea() {
700 if (jTextArea
== null) {
701 jTextArea
= new JTextArea();
702 jTextArea
.setEditable(false);
708 * This method initializes jPanel3
710 * @return javax.swing.JPanel
712 private JPanel
getJPanel3() {
713 if (jPanel3
== null) {
714 FlowLayout flowLayout
= new FlowLayout();
715 flowLayout
.setAlignment(java
.awt
.FlowLayout
.RIGHT
);
716 jPanel3
= new JPanel();
717 jPanel3
.setLayout(flowLayout
);
718 jPanel3
.add(getJButton2(), null);
719 jPanel3
.add(getJButton3(), null);
725 * This method initializes jSplitPane
727 * @return javax.swing.JSplitPane
729 private JSplitPane
getJSplitPane() {
730 if (jSplitPane
== null) {
731 jSplitPane
= new JSplitPane();
732 jSplitPane
.setDividerLocation(200);
733 jSplitPane
.setLeftComponent(getJPanel4());
734 jSplitPane
.setRightComponent(getJPanel5());
735 jSplitPane
.setPreferredSize(new java
.awt
.Dimension(202,200));
741 * This method initializes jPanel4
743 * @return javax.swing.JPanel
745 private JPanel
getJPanel4() {
746 if (jPanel4
== null) {
747 jLabel1
= new JLabel();
748 jLabel1
.setText("Library Classes Consumed");
749 jPanel4
= new JPanel();
750 jPanel4
.add(jLabel1
, null);
751 jPanel4
.add(getJScrollPane3(), null);
757 * This method initializes jPanel5
759 * @return javax.swing.JPanel
761 private JPanel
getJPanel5() {
762 if (jPanel5
== null) {
763 jLabel2
= new JLabel();
764 jLabel2
.setText("Instances Available");
765 jPanel5
= new JPanel();
766 jPanel5
.add(jLabel2
, null);
767 jPanel5
.add(getJScrollPane4(), null);
773 * This method initializes jScrollPane2
775 * @return javax.swing.JScrollPane
777 private JScrollPane
getJScrollPane2() {
778 if (jScrollPane2
== null) {
779 jScrollPane2
= new JScrollPane();
780 jScrollPane2
.setPreferredSize(new java
.awt
.Dimension(453,150));
781 jScrollPane2
.setViewportView(getJTable1());
787 * This method initializes jTable1
789 * @return javax.swing.JTable
791 private JTable
getJTable1() {
792 if (jTable1
== null) {
793 model1
= new LibraryTableModel();
794 model1
.addColumn("Name");
795 model1
.addColumn("ModuleGUID");
796 model1
.addColumn("ModuleVersion");
797 model1
.addColumn("PackageGUID");
798 model1
.addColumn("PackageVersion");
799 jTable1
= new JTable(model1
);
800 jTable1
.setRowHeight(20);
801 jTable1
.setAutoResizeMode(javax
.swing
.JTable
.AUTO_RESIZE_OFF
);
802 jTable1
.setSelectionMode(ListSelectionModel
.SINGLE_SELECTION
);
809 * This method initializes jScrollPane3
811 * @return javax.swing.JScrollPane
813 private JScrollPane
getJScrollPane3() {
814 if (jScrollPane3
== null) {
815 jScrollPane3
= new JScrollPane();
816 jScrollPane3
.setPreferredSize(new java
.awt
.Dimension(200,170));
817 jScrollPane3
.setViewportView(getJTable2());
823 * This method initializes jTable2
825 * @return javax.swing.JTable
827 private JTable
getJTable2() {
828 if (jTable2
== null) {
829 model2
= new LibraryTableModel();
830 model2
.addColumn("LibraryClass");
831 jTable2
= new JTable(model2
);
832 jTable2
.setRowHeight(20);
833 jTable2
.setShowGrid(false);
834 jTable2
.setSelectionMode(ListSelectionModel
.SINGLE_SELECTION
);
835 jTable2
.getSelectionModel().addListSelectionListener(new ListSelectionListener(){
836 public void valueChanged(ListSelectionEvent e
) {
837 if (e
.getValueIsAdjusting()){
840 ListSelectionModel lsm
= (ListSelectionModel
)e
.getSource();
841 if (lsm
.isSelectionEmpty()) {
845 int selectedRow2
= lsm
.getMinSelectionIndex();
846 if (selectedRow2
< 0) {
850 // display potential lib instances according to class selection
852 model3
.setRowCount(0);
853 String cls
= model2
.getValueAt(selectedRow2
, 0).toString();
854 ArrayList
<String
> al
= classInstanceMap
.get(cls
);
855 ListIterator
<String
> li
= al
.listIterator();
856 while(li
.hasNext()) {
857 String instance
= li
.next();
858 String
[] s
= {"", "", "", "", ""};
859 if (getModuleId(instance
) != null) {
860 s
[0] = getModuleId(instance
).getName();
863 String
[] instancePart
= instance
.split(" ");
864 for (int i
= 0; i
< instancePart
.length
; ++i
){
865 s
[i
+1] = instancePart
[i
];
878 * This method initializes jScrollPane4
880 * @return javax.swing.JScrollPane
882 private JScrollPane
getJScrollPane4() {
883 if (jScrollPane4
== null) {
884 jScrollPane4
= new JScrollPane();
885 jScrollPane4
.setPreferredSize(new java
.awt
.Dimension(450,170));
886 jScrollPane4
.setViewportView(getJTable3());
892 * This method initializes jTable3
894 * @return javax.swing.JTable
896 private JTable
getJTable3() {
897 if (jTable3
== null) {
898 model3
= new LibraryTableModel();
899 model3
.addColumn("Name");
900 model3
.addColumn("ModuleGUID");
901 model3
.addColumn("ModuleVersion");
902 model3
.addColumn("PackageGUID");
903 model3
.addColumn("PackageVersion");
904 jTable3
= new JTable(model3
);
905 jTable3
.setRowHeight(20);
906 jTable3
.setAutoResizeMode(javax
.swing
.JTable
.AUTO_RESIZE_OFF
);
907 jTable3
.setSelectionMode(ListSelectionModel
.SINGLE_SELECTION
);
914 * This method initializes jPanel6
916 * @return javax.swing.JPanel
918 private JPanel
getJPanel6() {
919 if (jPanel6
== null) {
920 jPanel6
= new JPanel();
926 * This method initializes jPanel7
928 * @return javax.swing.JPanel
930 private JPanel
getJPanel7() {
931 if (jPanel7
== null) {
932 jLabel4
= new JLabel();
933 jLabel4
.setText("Instance Description");
934 jLabel3
= new JLabel();
935 jLabel3
.setText("Selected Instances");
936 jPanel7
= new JPanel();
937 jPanel7
.add(jLabel4
, null);
938 jPanel7
.add(getJScrollPane5(), null);
939 jPanel7
.add(getJButton(), null);
940 jPanel7
.add(getJButton1(), null);
941 jPanel7
.add(jLabel3
, null);
942 jPanel7
.add(getJScrollPane2(), null);
948 * This method initializes jScrollPane5
950 * @return javax.swing.JScrollPane
952 private JScrollPane
getJScrollPane5() {
953 if (jScrollPane5
== null) {
954 jScrollPane5
= new JScrollPane();
955 jScrollPane5
.setPreferredSize(new java
.awt
.Dimension(300,50));
956 jScrollPane5
.setViewportView(getJTextArea1());
962 * This method initializes jTextArea1
964 * @return javax.swing.JTextArea
966 private JTextArea
getJTextArea1() {
967 if (jTextArea1
== null) {
968 jTextArea1
= new JTextArea();
969 jTextArea1
.setEditable(false);
975 * This method initializes jButton
977 * @return javax.swing.JButton
979 private JButton
getJButton() {
980 if (jButton
== null) {
981 jButton
= new JButton();
982 jButton
.setPreferredSize(new java
.awt
.Dimension(80,20));
983 jButton
.setText("Add");
984 jButton
.addActionListener(new java
.awt
.event
.ActionListener() {
985 public void actionPerformed(java
.awt
.event
.ActionEvent e
) {
986 int row
= jTable3
.getSelectedRow();
990 Object
[] s
= {model3
.getValueAt(row
, 0), model3
.getValueAt(row
, 1),
991 model3
.getValueAt(row
, 2), model3
.getValueAt(row
, 3),
992 model3
.getValueAt(row
, 4)};
994 String instanceValue
= model3
.getValueAt(row
, 1) + " " +
995 model3
.getValueAt(row
, 2) + " " +
996 model3
.getValueAt(row
, 3) + " " +
997 model3
.getValueAt(row
, 4);
998 ffc
.genLibraryInstance(model3
.getValueAt(row
, 1)+"", model3
.getValueAt(row
, 2)+"", model3
.getValueAt(row
, 3)+"", model3
.getValueAt(row
, 4)+"", moduleKey
);
1000 // Add pcd information of selected instance to current moduleSA
1003 ffc
.addFrameworkModulesPcdBuildDefs(getModuleId(instanceValue
), ffc
.getModuleSA(moduleKey
));
1005 catch (Exception exception
) {
1006 JOptionPane
.showMessageDialog(frame
, "PCD Insertion Fail. " + exception
.getMessage());
1008 resolveLibraryInstances(instanceValue
);
1016 * This method initializes jButton1
1018 * @return javax.swing.JButton
1020 private JButton
getJButton1() {
1021 if (jButton1
== null) {
1022 jButton1
= new JButton();
1023 jButton1
.setPreferredSize(new java
.awt
.Dimension(80,20));
1024 jButton1
.setText("Delete");
1025 jButton1
.addActionListener(new java
.awt
.event
.ActionListener() {
1026 public void actionPerformed(java
.awt
.event
.ActionEvent e
) {
1027 int row
= jTable1
.getSelectedRow();
1031 removeInstance(model1
.getValueAt(row
, 1) + " " +
1032 model1
.getValueAt(row
, 2) + " " +
1033 model1
.getValueAt(row
, 3) + " " +
1034 model1
.getValueAt(row
, 4));
1035 ffc
.removeLibraryInstance(moduleKey
, row
);
1036 model1
.removeRow(row
);
1045 * This method initializes jButton2
1047 * @return javax.swing.JButton
1049 private JButton
getJButton2() {
1050 if (jButton2
== null) {
1051 jButton2
= new JButton();
1052 jButton2
.setPreferredSize(new java
.awt
.Dimension(80,20));
1053 jButton2
.setText("Ok");
1054 jButton2
.addActionListener(this);
1060 * This method initializes jButton3
1062 * @return javax.swing.JButton
1064 private JButton
getJButton3() {
1065 if (jButton3
== null) {
1066 jButton3
= new JButton();
1067 jButton3
.setPreferredSize(new java
.awt
.Dimension(80,20));
1068 jButton3
.setText("Cancel");
1069 jButton3
.setVisible(false);
1073 public void actionPerformed(ActionEvent arg0
) {
1075 if (arg0
.getSource() == jButton2
) {
1076 // ffc.removeLibraryInstances(moduleKey);
1077 // for (int i = 0; i < model1.getRowCount(); ++i) {
1078 // String mg = model1.getValueAt(i, 1)+"";
1079 // String mv = model1.getValueAt(i, 2)+"";
1080 // String pg = model1.getValueAt(i, 3)+"";
1081 // String pv = model1.getValueAt(i, 4)+"";
1082 // ffc.genLibraryInstance(mg, mv, pg, pv, moduleKey);
1084 this.setVisible(false);
1088 * This method initializes jPanel8
1090 * @return javax.swing.JPanel
1092 private JPanel
getJPanel8() {
1093 if (jPanel8
== null) {
1094 jLabel8
= new JLabel();
1095 jLabel8
.setText("FFS Format Key");
1096 jLabel7
= new JLabel();
1097 jLabel7
.setText("FFS File GUID");
1098 jLabel6
= new JLabel();
1099 jLabel6
.setText("FV Binding");
1100 jPanel8
= new JPanel();
1101 jPanel8
.add(jLabel6
, null);
1102 jPanel8
.add(getJTextField(), null);
1103 jPanel8
.add(jLabel7
, null);
1104 jPanel8
.add(getJTextField1(), null);
1105 jPanel8
.add(jLabel8
, null);
1106 jPanel8
.add(getJTextField2(), null);
1107 jPanel8
.add(getJScrollPane6(), null);
1108 jPanel8
.add(getJButton4(), null);
1109 jPanel8
.add(getJButton5(), null);
1110 jPanel8
.addComponentListener(new java
.awt
.event
.ComponentAdapter() {
1111 public void componentShown(java
.awt
.event
.ComponentEvent e
) {
1112 initModuleSAOptions(moduleKey
);
1119 * This method initializes jTextField
1121 * @return javax.swing.JTextField
1123 private JTextField
getJTextField() {
1124 if (jTextField
== null) {
1125 jTextField
= new JTextField();
1126 jTextField
.setPreferredSize(new java
.awt
.Dimension(100,20));
1127 jTextField
.addFocusListener(new java
.awt
.event
.FocusAdapter() {
1128 public void focusLost(java
.awt
.event
.FocusEvent e
) {
1129 ffc
.setFvBinding(moduleKey
, jTextField
.getText());
1136 * This method initializes jTextField1
1138 * @return javax.swing.JTextField
1140 private JTextField
getJTextField1() {
1141 if (jTextField1
== null) {
1142 jTextField1
= new JTextField();
1143 jTextField1
.setPreferredSize(new java
.awt
.Dimension(100,20));
1144 jTextField1
.addFocusListener(new java
.awt
.event
.FocusAdapter() {
1145 public void focusLost(java
.awt
.event
.FocusEvent e
) {
1146 ffc
.setFfsFileNameGuid(moduleKey
, jTextField1
.getText());
1153 * This method initializes jTextField2
1155 * @return javax.swing.JTextField
1157 private JTextField
getJTextField2() {
1158 if (jTextField2
== null) {
1159 jTextField2
= new JTextField();
1160 jTextField2
.setPreferredSize(new java
.awt
.Dimension(100,20));
1161 jTextField2
.addFocusListener(new java
.awt
.event
.FocusAdapter() {
1162 public void focusLost(java
.awt
.event
.FocusEvent e
) {
1163 ffc
.setFfsFormatKey(moduleKey
, jTextField2
.getText());
1170 * This method initializes jScrollPane6
1172 * @return javax.swing.JScrollPane
1174 private JScrollPane
getJScrollPane6() {
1175 if (jScrollPane6
== null) {
1176 jScrollPane6
= new JScrollPane();
1177 jScrollPane6
.setPreferredSize(new java
.awt
.Dimension(600,200));
1178 jScrollPane6
.setViewportView(getJTable4());
1180 return jScrollPane6
;
1183 * This method initializes jTable4
1185 * @return javax.swing.JTable
1187 private JTable
getJTable4() {
1188 if (jTable4
== null) {
1189 optionsTableModel
= new DefaultTableModel();
1190 optionsTableModel
.addColumn("BuildTargets");
1191 optionsTableModel
.addColumn("ToolChainFamily");
1192 optionsTableModel
.addColumn("TagName");
1193 optionsTableModel
.addColumn("ToolCode");
1194 optionsTableModel
.addColumn("SupportedArchs");
1195 optionsTableModel
.addColumn("Contents");
1196 jTable4
= new JTable(optionsTableModel
);
1197 jTable4
.setRowHeight(20);
1198 Vector
<String
> vArch
= new Vector
<String
>();
1205 jTable4
.getColumnModel().getColumn(4).setCellEditor(new ListEditor(vArch
));
1206 jTable4
.setSelectionMode(ListSelectionModel
.SINGLE_SELECTION
);
1207 jTable4
.setAutoResizeMode(javax
.swing
.JTable
.AUTO_RESIZE_OFF
);
1208 jTable4
.getModel().addTableModelListener(new TableModelListener() {
1209 public void tableChanged(TableModelEvent arg0
) {
1210 // TODO Auto-generated method stub
1211 int row
= arg0
.getFirstRow();
1212 TableModel m
= (TableModel
)arg0
.getSource();
1214 if (arg0
.getType() == TableModelEvent
.UPDATE
){
1215 //ToDo Data Validition check.
1216 String targets
= m
.getValueAt(row
, 0) + "";
1217 Vector
<Object
> targetName
= null;
1218 if (targets
.length() > 0) {
1219 targetName
= new Vector
<Object
>();
1220 String
[] sArray
= targets
.split(" ");
1221 for (int i
= 0; i
< sArray
.length
; ++i
) {
1222 targetName
.add(sArray
[i
]);
1226 String toolChain
= m
.getValueAt(row
, 1) + "";
1227 String tagName
= m
.getValueAt(row
, 2) + "";
1228 String toolCode
= m
.getValueAt(row
, 3) + "";
1229 String archs
= m
.getValueAt(row
, 4) + "";
1230 Vector
<Object
> supArch
= null;
1231 if (archs
.length() > 0) {
1232 supArch
= new Vector
<Object
>();
1233 String
[] sArray1
= archs
.split(" ");
1234 for (int i
= 0; i
< sArray1
.length
; ++i
) {
1235 supArch
.add(sArray1
[i
]);
1239 String contents
= m
.getValueAt(row
, 5) + "";
1241 ffc
.updateModuleSAOptionsOpt(moduleKey
, row
, targetName
, toolChain
, tagName
, toolCode
, supArch
, contents
);
1249 * This method initializes jButton4
1251 * @return javax.swing.JButton
1253 private JButton
getJButton4() {
1254 if (jButton4
== null) {
1255 jButton4
= new JButton();
1256 jButton4
.setPreferredSize(new java
.awt
.Dimension(80,20));
1257 jButton4
.setText("New");
1258 jButton4
.addActionListener(new java
.awt
.event
.ActionListener() {
1259 public void actionPerformed(java
.awt
.event
.ActionEvent e
) {
1260 String
[] row
= {"", "", "", "", "IA32", ""};
1261 optionsTableModel
.addRow(row
);
1262 Vector
<Object
> v
= new Vector
<Object
>();
1263 Vector
<Object
> v1
= new Vector
<Object
>();
1265 ffc
.genModuleSAOptionsOpt(moduleKey
, v
, "", "", "", v1
, "");
1272 * This method initializes jButton5
1274 * @return javax.swing.JButton
1276 private JButton
getJButton5() {
1277 if (jButton5
== null) {
1278 jButton5
= new JButton();
1279 jButton5
.setPreferredSize(new java
.awt
.Dimension(80,20));
1280 jButton5
.setText("Delete");
1281 jButton5
.addActionListener(new java
.awt
.event
.ActionListener() {
1282 public void actionPerformed(java
.awt
.event
.ActionEvent e
) {
1283 if (jTable4
.getSelectedRow() < 0) {
1287 ffc
.removeModuleSAOptionsOpt(moduleKey
, jTable4
.getSelectedRow());
1288 optionsTableModel
.removeRow(jTable4
.getSelectedRow());
1296 Start the window at the center of screen
1299 protected void centerWindow(int intWidth
, int intHeight
) {
1300 Dimension d
= Toolkit
.getDefaultToolkit().getScreenSize();
1301 this.setLocation((d
.width
- intWidth
) / 2, (d
.height
- intHeight
) / 2);
1305 Start the window at the center of screen
1308 protected void centerWindow() {
1309 centerWindow(this.getSize().width
, this.getSize().height
);
1312 * This method initializes jPanel9
1314 * @return javax.swing.JPanel
1316 private JPanel
getJPanel9() {
1317 if (jPanel9
== null) {
1318 GridLayout gridLayout
= new GridLayout();
1319 gridLayout
.setRows(3);
1320 gridLayout
.setColumns(2);
1321 jPanel9
= new JPanel();
1322 jPanel9
.setLayout(gridLayout
);
1323 jPanel9
.setPreferredSize(new java
.awt
.Dimension(600,90));
1324 jPanel9
.add(getJPanel12(), null);
1325 jPanel9
.add(getJPanel10(), null);
1326 jPanel9
.add(getJPanel11(), null);
1331 * This method initializes jPanel10
1333 * @return javax.swing.JPanel
1335 private JPanel
getJPanel10() {
1336 if (jPanel10
== null) {
1337 FlowLayout flowLayout2
= new FlowLayout();
1338 flowLayout2
.setAlignment(java
.awt
.FlowLayout
.LEFT
);
1339 jLabel10
= new JLabel();
1340 jLabel10
.setText("Max Datum Size");
1341 jPanel10
= new JPanel();
1342 jPanel10
.setLayout(flowLayout2
);
1343 jPanel10
.add(jLabel10
, null);
1344 jPanel10
.add(getJTextField3(), null);
1349 * This method initializes jPanel11
1351 * @return javax.swing.JPanel
1353 private JPanel
getJPanel11() {
1354 if (jPanel11
== null) {
1355 FlowLayout flowLayout3
= new FlowLayout();
1356 flowLayout3
.setAlignment(java
.awt
.FlowLayout
.LEFT
);
1357 jLabel11
= new JLabel();
1358 jLabel11
.setText("Default Value");
1359 jLabel11
.setPreferredSize(new java
.awt
.Dimension(91,16));
1360 jPanel11
= new JPanel();
1361 jPanel11
.setLayout(flowLayout3
);
1362 jPanel11
.add(jLabel11
, null);
1363 jPanel11
.add(getJTextField4(), null);
1364 jPanel11
.add(getJComboBox1(), null);
1369 * This method initializes jPanel12
1371 * @return javax.swing.JPanel
1373 private JPanel
getJPanel12() {
1374 if (jPanel12
== null) {
1375 FlowLayout flowLayout1
= new FlowLayout();
1376 flowLayout1
.setAlignment(java
.awt
.FlowLayout
.LEFT
);
1377 jLabel9
= new JLabel();
1378 jLabel9
.setText("Item Type");
1379 jLabel9
.setPreferredSize(new java
.awt
.Dimension(91,16));
1380 jPanel12
= new JPanel();
1381 jPanel12
.setLayout(flowLayout1
);
1382 jPanel12
.add(jLabel9
, null);
1383 jPanel12
.add(getJComboBox(), null);
1384 jPanel12
.add(getJButton6(), null);
1389 * This method initializes jComboBox
1391 * @return javax.swing.JComboBox
1393 private JComboBox
getJComboBox() {
1394 if (jComboBox
== null) {
1395 jComboBox
= new JComboBox();
1396 jComboBox
.setPreferredSize(new java
.awt
.Dimension(200,20));
1397 jComboBox
.addItemListener(new java
.awt
.event
.ItemListener() {
1398 public void itemStateChanged(java
.awt
.event
.ItemEvent e
) {
1399 int row
= jTable
.getSelectedRow();
1400 if (row
< 0 || jTable
.getValueAt(row
, 2).equals(jComboBox
.getSelectedItem())) {
1403 if (jComboBox
.getItemCount() == 3) {
1404 if (!jComboBox
.getSelectedItem().equals("DYNAMIC")) {
1405 pcdDynamicToNonDynamic(jTable
.getValueAt(row
, 0)+"", jTable
.getValueAt(row
, 1)+"");
1408 pcdNonDynamicToDynamic(jTable
.getValueAt(row
, 0)+"", jTable
.getValueAt(row
, 1)+"");
1417 private void pcdDynamicToNonDynamic(String cName
, String tsGuid
) {
1418 String
[][] saa
= new String
[ffc
.getDynamicPcdBuildDataCount()][5];
1419 ffc
.getDynamicPcdBuildData(saa
);
1420 String maxSize
= "";
1422 for (int i
= 0; i
< saa
.length
; ++i
) {
1423 if (saa
[i
][0].equals(cName
) && saa
[i
][2].equals(tsGuid
)) {
1424 maxSize
= saa
[i
][3];
1425 value
= ffc
.getDynamicPcdBuildDataValue(i
);
1430 ArrayList
<String
> al
= ffc
.getDynPcdMapValue(cName
+ " " + tsGuid
);
1431 for (int i
= 0; i
< al
.size(); ++i
) {
1432 String
[] s
= al
.get(i
).split(" ");
1433 String mKey
= s
[0] + s
[1] + s
[2] + s
[3];
1434 ffc
.updatePcdData(mKey
, cName
, tsGuid
, jComboBox
.getSelectedItem()+"", maxSize
, value
);
1435 s
[4] = jComboBox
.getSelectedItem()+"";
1436 al
.set(i
, s
[0]+" "+s
[1]+" "+s
[2]+" "+s
[3]+" "+s
[4]);
1439 ffc
.removeDynamicPcdBuildData(cName
, tsGuid
);
1442 private void pcdNonDynamicToDynamic(String cName
, String tsGuid
) {
1443 ArrayList
<String
> al
= ffc
.getDynPcdMapValue(cName
+ " " + tsGuid
);
1444 for (int i
= 0; i
< al
.size(); ++i
) {
1445 String
[] s
= al
.get(i
).split(" ");
1446 String mKey
= s
[0] + s
[1] + s
[2] + s
[3];
1447 ffc
.updatePcdData(mKey
, cName
, tsGuid
, jComboBox
.getSelectedItem()+"", jTextField3
.getText(), jTextField4
.isVisible() ? jTextField4
.getText() : jComboBox1
.getSelectedItem()+"");
1448 s
[4] = jComboBox
.getSelectedItem()+"";
1449 al
.set(i
, s
[0]+" "+s
[1]+" "+s
[2]+" "+s
[3]+" "+s
[4]);
1452 ffc
.addDynamicPcdBuildData(cName
, jTable
.getValueAt(jTable
.getSelectedRow(), 3), tsGuid
, "DYNAMIC", jTable
.getValueAt(jTable
.getSelectedRow(), 5)+"", jTextField4
.isVisible() ? jTextField4
.getText() : jComboBox1
.getSelectedItem()+"");
1455 JOptionPane
.showMessageDialog(frame
, "PCD value format: " + e
.getMessage());
1459 * This method initializes jTextField3
1461 * @return javax.swing.JTextField
1463 private JTextField
getJTextField3() {
1464 if (jTextField3
== null) {
1465 jTextField3
= new JTextField();
1466 jTextField3
.setPreferredSize(new java
.awt
.Dimension(200,20));
1471 * This method initializes jTextField4
1473 * @return javax.swing.JTextField
1475 private JTextField
getJTextField4() {
1476 if (jTextField4
== null) {
1477 jTextField4
= new JTextField();
1478 jTextField4
.setPreferredSize(new java
.awt
.Dimension(200,20));
1483 * This method initializes jButton6
1485 * @return javax.swing.JButton
1487 private JButton
getJButton6() {
1488 if (jButton6
== null) {
1489 jButton6
= new JButton();
1490 jButton6
.setPreferredSize(new java
.awt
.Dimension(150,20));
1491 jButton6
.setText("Update PCD Data");
1492 jButton6
.addActionListener(new java
.awt
.event
.ActionListener() {
1493 public void actionPerformed(java
.awt
.event
.ActionEvent e
) {
1494 int row
= jTable
.getSelectedRow();
1498 model
.setValueAt(jComboBox
.getSelectedItem(), row
, 2);
1499 model
.setValueAt(jTextField3
.getText(), row
, 4);
1500 model
.setValueAt(jTextField4
.isVisible()? jTextField4
.getText():jComboBox1
.getSelectedItem(), row
, 6);
1501 ffc
.updatePcdData(moduleKey
, model
.getValueAt(row
, 0)+"", model
.getValueAt(row
, 1)+"", model
.getValueAt(row
, 2)+"", model
.getValueAt(row
, 4)+"", model
.getValueAt(row
, 6)+"");
1508 * This method initializes jComboBox1
1510 * @return javax.swing.JComboBox
1512 private JComboBox
getJComboBox1() {
1513 if (jComboBox1
== null) {
1514 jComboBox1
= new JComboBox();
1515 jComboBox1
.setPreferredSize(new java
.awt
.Dimension(100,20));
1516 jComboBox1
.setVisible(false);
1517 jComboBox1
.addItem("true");
1518 jComboBox1
.addItem("false");
1524 } // @jve:decl-index=0:visual-constraint="10,10"
1526 class PartialEditableTableModel
extends DefaultTableModel
{
1530 private static final long serialVersionUID
= 1L;
1532 public boolean isCellEditable(int row
, int col
) {
1543 class LibraryTableModel
extends DefaultTableModel
{
1547 private static final long serialVersionUID
= 1L;
1549 public boolean isCellEditable(int row
, int col
) {