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
){
135 jTabbedPane
.setSelectedIndex(0);
136 initPcdBuildDefinition(i
);
140 init will be called each time FpdModuleSA object is to be shown.
141 @param key Module information.
143 public void initPcdBuildDefinition(int i
) {
145 // display pcd for key.
147 model
.setRowCount(0);
148 int pcdCount
= ffc
.getPcdDataCount(i
);
150 String
[][] saa
= new String
[pcdCount
][7];
151 ffc
.getPcdData(i
, saa
);
152 for (int j
= 0; j
< saa
.length
; ++j
) {
153 model
.addRow(saa
[j
]);
158 public void initLibraries(String key
) {
160 // display library classes that need to be resolved. also potential instances for them.
162 resolveLibraryInstances(moduleKey
);
164 // display lib instances already selected for key
166 model1
.setRowCount(0);
167 int instanceCount
= ffc
.getLibraryInstancesCount(key
);
168 if (instanceCount
!= 0) {
169 String
[][] saa
= new String
[instanceCount
][5];
170 ffc
.getLibraryInstances(key
, saa
);
171 for (int i
= 0; i
< saa
.length
; ++i
) {
172 ModuleIdentification mi
= getModuleId(saa
[i
][1] + " " + saa
[i
][2] + " " + saa
[i
][3] + " " + saa
[i
][4]);
174 saa
[i
][0] = mi
.getName();
175 saa
[i
][2] = mi
.getVersion();
176 saa
[i
][4] = mi
.getPackage().getVersion();
178 // re-evaluate lib instance usage when adding a already-selected lib instance.
180 resolveLibraryInstances(saa
[i
][1] + " " + saa
[i
][2] + " " + saa
[i
][3] + " " + saa
[i
][4]);
181 model1
.addRow(saa
[i
]);
189 public void initModuleSAOptions(String key
) {
191 // display module SA options
193 String fvBinding
= ffc
.getFvBinding(key
);
194 if (fvBinding
!= null) {
195 jTextField
.setText(fvBinding
);
197 String fileGuid
= ffc
.getFfsFileNameGuid(key
);
198 if (fileGuid
!= null) {
199 jTextField1
.setText(fileGuid
);
201 String ffsKey
= ffc
.getFfsFormatKey(key
);
202 if (ffsKey
!= null) {
203 jTextField2
.setText(ffsKey
);
206 optionsTableModel
.setRowCount(0);
207 String
[][] saa
= new String
[ffc
.getModuleSAOptionsCount(key
)][6];
208 ffc
.getModuleSAOptions(key
, saa
);
209 for (int i
= 0; i
< saa
.length
; ++i
) {
210 optionsTableModel
.addRow(saa
[i
]);
214 private void resolveLibraryInstances(String key
) {
215 ModuleIdentification mi
= getModuleId(key
);
216 PackageIdentification
[] depPkgList
= null;
218 Map
<String
, XmlObject
> m
= GlobalData
.getNativeMsa(mi
);
219 SurfaceAreaQuery
.setDoc(m
);
221 // Get dependency pkg list into which we will search lib instances.
223 depPkgList
= SurfaceAreaQuery
.getDependencePkg(null);
225 // Get the lib class consumed, produced by this module itself.
227 String
[] classConsumed
= SurfaceAreaQuery
.getLibraryClasses("ALWAYS_CONSUMED");
229 if (this.classConsumed
== null) {
230 this.classConsumed
= new HashMap
<String
, ArrayList
<String
>>();
233 for(int i
= 0; i
< classConsumed
.length
; ++i
){
234 ArrayList
<String
> consumedBy
= this.classConsumed
.get(classConsumed
[i
]);
235 if (consumedBy
== null) {
236 consumedBy
= new ArrayList
<String
>();
239 this.classConsumed
.put(classConsumed
[i
], consumedBy
);
242 String
[] classProduced
= SurfaceAreaQuery
.getLibraryClasses("ALWAYS_PRODUCED");
243 if (this.classProduced
== null) {
244 this.classProduced
= new ArrayList
<String
>();
246 for(int i
= 0; i
< classProduced
.length
; ++i
){
247 if (!this.classProduced
.contains(classProduced
[i
])){
248 this.classProduced
.add(classProduced
[i
]);
252 // Get classes unresolved
254 // Iterator<String> lip = this.classProduced.listIterator();
255 // while(lip.hasNext()){
256 // String clsProduced = lip.next();
257 // this.classConsumed.remove(clsProduced);
261 // find potential instances in all dependency pkgs for classes still in classConsumed.
263 if (classInstanceMap
== null){
264 classInstanceMap
= new HashMap
<String
, ArrayList
<String
>>();
266 Iterator
<String
> lic
= this.classConsumed
.keySet().iterator();
267 while(lic
.hasNext()){
268 String cls
= lic
.next();
269 if (this.classProduced
.contains(cls
) || classInstanceMap
.containsKey(cls
)) {
272 ArrayList
<String
> instances
= getInstancesForClass(cls
, depPkgList
);
273 if (instances
.size() == 0){
274 JOptionPane
.showMessageDialog(frame
, "No Applicable Instance for Library Class " +
275 cls
+ ", Platform Build will Fail.");
277 classInstanceMap
.put(cls
, instances
);
281 showClassToResolved();
288 private ArrayList
<String
> getInstancesForClass(String cls
, PackageIdentification
[] depPkgList
) throws Exception
{
289 ArrayList
<String
> al
= new ArrayList
<String
>();
291 for (int i
= 0; i
< depPkgList
.length
; ++i
) {
292 Set
<ModuleIdentification
> smi
= GlobalData
.getModules(depPkgList
[i
]);
293 Iterator ismi
= smi
.iterator();
294 while(ismi
.hasNext()) {
295 ModuleIdentification mi
= (ModuleIdentification
)ismi
.next();
297 String
[] clsProduced
= getClassProduced(mi
);
299 boolean isPotential
= false;
300 for (int j
= 0; j
< clsProduced
.length
; ++j
) {
301 if (clsProduced
[j
] == null) {
304 if (clsProduced
[j
].equals(cls
)){
307 if (classProduced
.contains(clsProduced
[j
])) {
313 al
.add(mi
.getGuid() + " " + mi
.getVersion() + " " +
314 depPkgList
[i
].getGuid() + " " + depPkgList
[i
].getVersion());
322 private void removeInstance(String key
) {
323 ModuleIdentification mi
= getModuleId(key
);
325 // remove pcd information of instance from current ModuleSA
327 ffc
.removePcdData(key
, mi
);
329 // remove class produced by this instance and add back these produced class to be bound.
331 String
[] clsProduced
= getClassProduced(mi
);
332 for (int i
= 0; i
< clsProduced
.length
; ++i
) {
334 classProduced
.remove(clsProduced
[i
]);
337 // remove class consumed by this instance. we do not need to bound it now.
339 String
[] clsConsumed
= getClassConsumed(mi
);
340 for (int i
= 0; i
< clsConsumed
.length
; ++i
) {
341 ArrayList
<String
> al
= classConsumed
.get(clsConsumed
[i
]);
344 classConsumed
.remove(clsConsumed
[i
]);
348 if (al
.size() == 0) {
349 classConsumed
.remove(clsConsumed
[i
]);
354 showClassToResolved();
358 private ModuleIdentification
getModuleId(String key
){
360 // Get ModuleGuid, ModuleVersion, PackageGuid, PackageVersion, Arch into string array.
362 String
[] keyPart
= key
.split(" ");
363 Set
<PackageIdentification
> spi
= GlobalData
.getPackageList();
364 Iterator ispi
= spi
.iterator();
366 while(ispi
.hasNext()) {
367 PackageIdentification pi
= (PackageIdentification
)ispi
.next();
368 if ( !pi
.getGuid().equals(keyPart
[2])){
372 if (keyPart
[3] != null && keyPart
[3].length() > 0 && !keyPart
[3].equals("null")){
373 if(!pi
.getVersion().equals(keyPart
[3])){
377 Set
<ModuleIdentification
> smi
= GlobalData
.getModules(pi
);
378 Iterator ismi
= smi
.iterator();
379 while(ismi
.hasNext()) {
380 ModuleIdentification mi
= (ModuleIdentification
)ismi
.next();
381 if (mi
.getGuid().equals(keyPart
[0])){
382 if (keyPart
[1] != null && keyPart
[1].length() > 0 && !keyPart
[1].equals("null")){
383 if(!mi
.getVersion().equals(keyPart
[1])){
395 private String
[] getClassProduced(ModuleIdentification mi
){
398 Map
<String
, XmlObject
> m
= GlobalData
.getNativeMsa(mi
);
399 SurfaceAreaQuery
.setDoc(m
);
400 String
[] clsProduced
= SurfaceAreaQuery
.getLibraryClasses("ALWAYS_PRODUCED");
403 }catch (Exception e
) {
406 return new String
[0];
410 private String
[] getClassConsumed(ModuleIdentification mi
){
412 String
[] clsConsumed
= null;
414 Map
<String
, XmlObject
> m
= GlobalData
.getNativeMsa(mi
);
415 SurfaceAreaQuery
.setDoc(m
);
416 clsConsumed
= SurfaceAreaQuery
.getLibraryClasses("ALWAYS_CONSUMED");
418 }catch (Exception e
) {
424 private void showClassToResolved(){
425 model2
.setRowCount(0);
426 if (classConsumed
.size() == 0) {
429 Iterator
<String
> li
= classConsumed
.keySet().iterator();
432 String
[] s
= {li
.next()};
433 if (classConsumed
.get(s
[0]) == null) {
436 if (classConsumed
.get(s
[0]).size() == 0) {
439 if (!classProduced
.contains(s
[0])){
443 model3
.setRowCount(0);
446 * This method initializes this
450 private void initialize() {
451 this.setSize(664, 515);
454 this.setTitle("Module Settings");
455 this.setContentPane(getJContentPane());
459 * This method initializes jContentPane
461 * @return javax.swing.JPanel
463 private JPanel
getJContentPane() {
464 if (jContentPane
== null) {
465 jContentPane
= new JPanel();
466 jContentPane
.setLayout(new BorderLayout());
467 jContentPane
.add(getJTabbedPane(), java
.awt
.BorderLayout
.CENTER
);
468 jContentPane
.add(getJPanel3(), java
.awt
.BorderLayout
.SOUTH
);
474 * This method initializes jTabbedPane
476 * @return javax.swing.JTabbedPane
478 private JTabbedPane
getJTabbedPane() {
479 if (jTabbedPane
== null) {
480 jTabbedPane
= new JTabbedPane();
481 jTabbedPane
.addTab("PCD Build Definition", null, getJPanel(), null);
482 jTabbedPane
.addTab("Module SA Options", null, getJPanel8(), null);
483 jTabbedPane
.addTab("Libraries", null, getJPanel1(), null);
489 * This method initializes jPanel
491 * @return javax.swing.JPanel
493 private JPanel
getJPanel() {
494 if (jPanel
== null) {
495 jLabel
= new JLabel();
496 jLabel
.setText("PcdData");
497 jPanel
= new JPanel();
498 jPanel
.setLayout(new BorderLayout());
499 jPanel
.add(jLabel
, java
.awt
.BorderLayout
.NORTH
);
500 jPanel
.add(getJScrollPane(), java
.awt
.BorderLayout
.CENTER
);
501 jPanel
.add(getJPanel2(), java
.awt
.BorderLayout
.SOUTH
);
502 jPanel
.addComponentListener(new java
.awt
.event
.ComponentAdapter() {
503 public void componentShown(java
.awt
.event
.ComponentEvent e
) {
504 // initPcdBuildDefinition(moduleKey);
513 * This method initializes jPanel1
515 * @return javax.swing.JPanel
517 private JPanel
getJPanel1() {
518 if (jPanel1
== null) {
519 jPanel1
= new JPanel();
520 jPanel1
.setLayout(new BorderLayout());
521 jPanel1
.add(getJSplitPane(), java
.awt
.BorderLayout
.NORTH
);
522 jPanel1
.add(getJPanel6(), java
.awt
.BorderLayout
.SOUTH
);
523 jPanel1
.add(getJPanel7(), java
.awt
.BorderLayout
.CENTER
);
524 jPanel1
.addComponentListener(new java
.awt
.event
.ComponentAdapter() {
525 public void componentShown(java
.awt
.event
.ComponentEvent e
) {
526 initLibraries(moduleKey
);
534 * This method initializes jScrollPane
536 * @return javax.swing.JScrollPane
538 private JScrollPane
getJScrollPane() {
539 if (jScrollPane
== null) {
540 jScrollPane
= new JScrollPane();
541 jScrollPane
.setViewportView(getJTable());
547 * This method initializes jTable
549 * @return javax.swing.JTable
551 private JTable
getJTable() {
552 if (jTable
== null) {
553 model
= new PartialEditableTableModel();
554 jTable
= new JTable(model
);
555 jTable
.setRowHeight(20);
556 jTable
.setAutoResizeMode(javax
.swing
.JTable
.AUTO_RESIZE_OFF
);
557 model
.addColumn("CName");
558 model
.addColumn("TokenSpaceGUID");
559 model
.addColumn("ItemType");
560 model
.addColumn("Token");
561 model
.addColumn("MaxDatumSize");
562 model
.addColumn("DataType");
563 model
.addColumn("DefaultValue");
565 jTable
.setSelectionMode(ListSelectionModel
.SINGLE_SELECTION
);
566 jTable
.getSelectionModel().addListSelectionListener(new ListSelectionListener(){
567 public void valueChanged(ListSelectionEvent e
) {
569 if (e
.getValueIsAdjusting()){
572 ListSelectionModel lsm
= (ListSelectionModel
)e
.getSource();
573 if (lsm
.isSelectionEmpty()) {
577 int selectedRow
= lsm
.getMinSelectionIndex();
578 String cName
= jTable
.getValueAt(selectedRow
, 0)+"";
579 String
[] pcdInfo
= {"", ""};
580 getPcdInfo(cName
, pcdInfo
);
581 jTextArea
.setText(pcdInfo
[0]);
582 initComboBox(pcdInfo
[1]);
583 jComboBox
.setSelectedItem(pcdInfo
[1]);
584 jTextField3
.setEnabled(true);
585 jTextField3
.setVisible(true);
586 jTextField3
.setText(jTable
.getValueAt(selectedRow
, 4)+"");
587 jTextField4
.setEnabled(true);
588 jTextField4
.setText(jTable
.getValueAt(selectedRow
, 6)+"");
589 if (jTable
.getValueAt(selectedRow
, 5).equals("VOID*")) {
590 if (pcdInfo
[1].equals("FEATURE_FLAG")) {
591 jTextField3
.setVisible(false);
593 else if (pcdInfo
[1].equals("FIXED_AT_BUILD")) {
595 jTextField3
.setEnabled(false);
596 jTextField3
.setText(ffc
.setMaxSizeForPointer(jTable
.getValueAt(selectedRow
, 6)+"")+"");
598 catch(Exception except
){
599 JOptionPane
.showMessageDialog(frame
, "Unacceptable PCD Value: " + except
.getMessage());
603 jTextField3
.setText(jTable
.getValueAt(selectedRow
, 4)+"");
607 jTextField3
.setEnabled(false);
610 if (!jTable
.getValueAt(selectedRow
, 2).equals("DYNAMIC") && !jTable
.getValueAt(selectedRow
, 2).equals("DYNAMIC_EX")) {
611 jTextField4
.setText(jTable
.getValueAt(selectedRow
, 6)+"");
612 if (jTable
.getValueAt(selectedRow
, 2).equals("FEATURE_FLAG")){
613 jTextField4
.setVisible(false);
614 jComboBox1
.setVisible(true);
615 jComboBox1
.setSelectedItem(jTable
.getValueAt(selectedRow
, 6)+"");
618 jTextField4
.setVisible(true);
619 jTextField4
.setEnabled(true);
620 jComboBox1
.setVisible(false);
624 jTextField4
.setEnabled(false);
632 jTable
.getModel().addTableModelListener(new TableModelListener() {
633 public void tableChanged(TableModelEvent arg0
) {
634 // TODO Auto-generated method stub
635 // int row = arg0.getFirstRow();
636 // TableModel m = (TableModel)arg0.getSource();
638 if (arg0
.getType() == TableModelEvent
.UPDATE
){
639 //update xml doc here.
648 private void initComboBox(String originalType
) {
649 jComboBox
.removeAllItems();
650 jComboBox
.addItem(originalType
);
651 if (originalType
.equals("PATCHABLE_IN_MODULE")) {
652 jComboBox
.addItem("FIXED_AT_BUILD");
654 if (originalType
.equals("DYNAMIC")) {
655 jComboBox
.addItem("FIXED_AT_BUILD");
656 jComboBox
.addItem("PATCHABLE_IN_MODULE");
660 private void getPcdInfo(String cName
, String
[] sa
) {
661 String
[][] saa
= new String
[ffc
.getLibraryInstancesCount(moduleKey
)][5];
662 ffc
.getLibraryInstances(moduleKey
, saa
);
665 if (ffc
.getPcdBuildDataInfo(getModuleId(moduleKey
), cName
, sa
)) {
668 for (int j
= 0; j
< saa
.length
; ++j
) {
669 if (ffc
.getPcdBuildDataInfo(getModuleId(saa
[j
][1] + " " + saa
[j
][2] + " " + saa
[j
][3] + " " + saa
[j
][4]),
676 JOptionPane
.showMessageDialog(this, "Get PCD details fail: " + e
.getMessage());
681 * This method initializes jPanel2
683 * @return javax.swing.JPanel
685 private JPanel
getJPanel2() {
686 if (jPanel2
== null) {
687 jLabel5
= new JLabel();
688 jLabel5
.setText("PCD Description");
689 jPanel2
= new JPanel();
690 jPanel2
.setPreferredSize(new java
.awt
.Dimension(607,200));
691 jPanel2
.add(jLabel5
, null);
692 jPanel2
.add(getJScrollPane1(), null);
693 jPanel2
.add(getJPanel9(), null);
699 * This method initializes jScrollPane1
701 * @return javax.swing.JScrollPane
703 private JScrollPane
getJScrollPane1() {
704 if (jScrollPane1
== null) {
705 jScrollPane1
= new JScrollPane();
706 jScrollPane1
.setPreferredSize(new java
.awt
.Dimension(500,100));
707 jScrollPane1
.setViewportView(getJTextArea());
713 * This method initializes jTextArea
715 * @return javax.swing.JTextArea
717 private JTextArea
getJTextArea() {
718 if (jTextArea
== null) {
719 jTextArea
= new JTextArea();
720 jTextArea
.setEditable(false);
726 * This method initializes jPanel3
728 * @return javax.swing.JPanel
730 private JPanel
getJPanel3() {
731 if (jPanel3
== null) {
732 FlowLayout flowLayout
= new FlowLayout();
733 flowLayout
.setAlignment(java
.awt
.FlowLayout
.RIGHT
);
734 jPanel3
= new JPanel();
735 jPanel3
.setLayout(flowLayout
);
736 jPanel3
.add(getJButton2(), null);
737 jPanel3
.add(getJButton3(), null);
743 * This method initializes jSplitPane
745 * @return javax.swing.JSplitPane
747 private JSplitPane
getJSplitPane() {
748 if (jSplitPane
== null) {
749 jSplitPane
= new JSplitPane();
750 jSplitPane
.setDividerLocation(200);
751 jSplitPane
.setLeftComponent(getJPanel4());
752 jSplitPane
.setRightComponent(getJPanel5());
753 jSplitPane
.setPreferredSize(new java
.awt
.Dimension(202,200));
759 * This method initializes jPanel4
761 * @return javax.swing.JPanel
763 private JPanel
getJPanel4() {
764 if (jPanel4
== null) {
765 jLabel1
= new JLabel();
766 jLabel1
.setText("Library Classes Uninstantiated");
767 jPanel4
= new JPanel();
768 jPanel4
.add(jLabel1
, null);
769 jPanel4
.add(getJScrollPane3(), null);
775 * This method initializes jPanel5
777 * @return javax.swing.JPanel
779 private JPanel
getJPanel5() {
780 if (jPanel5
== null) {
781 jLabel2
= new JLabel();
782 jLabel2
.setText("Instances Available");
783 jPanel5
= new JPanel();
784 jPanel5
.add(jLabel2
, null);
785 jPanel5
.add(getJScrollPane4(), null);
791 * This method initializes jScrollPane2
793 * @return javax.swing.JScrollPane
795 private JScrollPane
getJScrollPane2() {
796 if (jScrollPane2
== null) {
797 jScrollPane2
= new JScrollPane();
798 jScrollPane2
.setPreferredSize(new java
.awt
.Dimension(453,150));
799 jScrollPane2
.setViewportView(getJTable1());
805 * This method initializes jTable1
807 * @return javax.swing.JTable
809 private JTable
getJTable1() {
810 if (jTable1
== null) {
811 model1
= new LibraryTableModel();
812 model1
.addColumn("Name");
813 model1
.addColumn("ModuleGUID");
814 model1
.addColumn("ModuleVersion");
815 model1
.addColumn("PackageGUID");
816 model1
.addColumn("PackageVersion");
817 jTable1
= new JTable(model1
);
818 jTable1
.setRowHeight(20);
819 jTable1
.setAutoResizeMode(javax
.swing
.JTable
.AUTO_RESIZE_OFF
);
820 jTable1
.setSelectionMode(ListSelectionModel
.SINGLE_SELECTION
);
827 * This method initializes jScrollPane3
829 * @return javax.swing.JScrollPane
831 private JScrollPane
getJScrollPane3() {
832 if (jScrollPane3
== null) {
833 jScrollPane3
= new JScrollPane();
834 jScrollPane3
.setPreferredSize(new java
.awt
.Dimension(200,170));
835 jScrollPane3
.setViewportView(getJTable2());
841 * This method initializes jTable2
843 * @return javax.swing.JTable
845 private JTable
getJTable2() {
846 if (jTable2
== null) {
847 model2
= new LibraryTableModel();
848 model2
.addColumn("LibraryClass");
849 jTable2
= new JTable(model2
);
850 jTable2
.setRowHeight(20);
851 jTable2
.setShowGrid(false);
852 jTable2
.setSelectionMode(ListSelectionModel
.SINGLE_SELECTION
);
853 jTable2
.getSelectionModel().addListSelectionListener(new ListSelectionListener(){
854 public void valueChanged(ListSelectionEvent e
) {
855 if (e
.getValueIsAdjusting()){
858 ListSelectionModel lsm
= (ListSelectionModel
)e
.getSource();
859 if (lsm
.isSelectionEmpty()) {
863 int selectedRow2
= lsm
.getMinSelectionIndex();
864 if (selectedRow2
< 0) {
868 // display potential lib instances according to class selection
870 model3
.setRowCount(0);
871 String cls
= model2
.getValueAt(selectedRow2
, 0).toString();
872 ArrayList
<String
> al
= classInstanceMap
.get(cls
);
873 ListIterator
<String
> li
= al
.listIterator();
874 while(li
.hasNext()) {
875 String instance
= li
.next();
876 String
[] s
= {"", "", "", "", ""};
877 if (getModuleId(instance
) != null) {
878 s
[0] = getModuleId(instance
).getName();
881 String
[] instancePart
= instance
.split(" ");
882 for (int i
= 0; i
< instancePart
.length
; ++i
){
883 s
[i
+1] = instancePart
[i
];
896 * This method initializes jScrollPane4
898 * @return javax.swing.JScrollPane
900 private JScrollPane
getJScrollPane4() {
901 if (jScrollPane4
== null) {
902 jScrollPane4
= new JScrollPane();
903 jScrollPane4
.setPreferredSize(new java
.awt
.Dimension(450,170));
904 jScrollPane4
.setViewportView(getJTable3());
910 * This method initializes jTable3
912 * @return javax.swing.JTable
914 private JTable
getJTable3() {
915 if (jTable3
== null) {
916 model3
= new LibraryTableModel();
917 model3
.addColumn("Name");
918 model3
.addColumn("ModuleGUID");
919 model3
.addColumn("ModuleVersion");
920 model3
.addColumn("PackageGUID");
921 model3
.addColumn("PackageVersion");
922 jTable3
= new JTable(model3
);
923 jTable3
.setRowHeight(20);
924 jTable3
.setAutoResizeMode(javax
.swing
.JTable
.AUTO_RESIZE_OFF
);
925 jTable3
.setSelectionMode(ListSelectionModel
.SINGLE_SELECTION
);
932 * This method initializes jPanel6
934 * @return javax.swing.JPanel
936 private JPanel
getJPanel6() {
937 if (jPanel6
== null) {
938 jPanel6
= new JPanel();
944 * This method initializes jPanel7
946 * @return javax.swing.JPanel
948 private JPanel
getJPanel7() {
949 if (jPanel7
== null) {
950 jLabel4
= new JLabel();
951 jLabel4
.setText("Instance Description");
952 jLabel3
= new JLabel();
953 jLabel3
.setText("Selected Instances");
954 jPanel7
= new JPanel();
955 jPanel7
.add(jLabel4
, null);
956 jPanel7
.add(getJScrollPane5(), null);
957 jPanel7
.add(getJButton(), null);
958 jPanel7
.add(getJButton1(), null);
959 jPanel7
.add(jLabel3
, null);
960 jPanel7
.add(getJScrollPane2(), null);
966 * This method initializes jScrollPane5
968 * @return javax.swing.JScrollPane
970 private JScrollPane
getJScrollPane5() {
971 if (jScrollPane5
== null) {
972 jScrollPane5
= new JScrollPane();
973 jScrollPane5
.setPreferredSize(new java
.awt
.Dimension(300,50));
974 jScrollPane5
.setViewportView(getJTextArea1());
980 * This method initializes jTextArea1
982 * @return javax.swing.JTextArea
984 private JTextArea
getJTextArea1() {
985 if (jTextArea1
== null) {
986 jTextArea1
= new JTextArea();
987 jTextArea1
.setEditable(false);
993 * This method initializes jButton
995 * @return javax.swing.JButton
997 private JButton
getJButton() {
998 if (jButton
== null) {
999 jButton
= new JButton();
1000 jButton
.setPreferredSize(new java
.awt
.Dimension(80,20));
1001 jButton
.setText("Add");
1002 jButton
.addActionListener(new java
.awt
.event
.ActionListener() {
1003 public void actionPerformed(java
.awt
.event
.ActionEvent e
) {
1004 int row
= jTable3
.getSelectedRow();
1008 Object
[] s
= {model3
.getValueAt(row
, 0), model3
.getValueAt(row
, 1),
1009 model3
.getValueAt(row
, 2), model3
.getValueAt(row
, 3),
1010 model3
.getValueAt(row
, 4)};
1012 String instanceValue
= model3
.getValueAt(row
, 1) + " " +
1013 model3
.getValueAt(row
, 2) + " " +
1014 model3
.getValueAt(row
, 3) + " " +
1015 model3
.getValueAt(row
, 4);
1016 ffc
.genLibraryInstance(model3
.getValueAt(row
, 1)+"", model3
.getValueAt(row
, 2)+"", model3
.getValueAt(row
, 3)+"", model3
.getValueAt(row
, 4)+"", moduleKey
);
1018 // Add pcd information of selected instance to current moduleSA
1021 ffc
.addFrameworkModulesPcdBuildDefs(getModuleId(instanceValue
), null, ffc
.getModuleSA(moduleKey
));
1023 catch (Exception exception
) {
1024 JOptionPane
.showMessageDialog(frame
, "PCD Insertion Fail. " + exception
.getMessage());
1026 resolveLibraryInstances(instanceValue
);
1034 * This method initializes jButton1
1036 * @return javax.swing.JButton
1038 private JButton
getJButton1() {
1039 if (jButton1
== null) {
1040 jButton1
= new JButton();
1041 jButton1
.setPreferredSize(new java
.awt
.Dimension(80,20));
1042 jButton1
.setText("Delete");
1043 jButton1
.addActionListener(new java
.awt
.event
.ActionListener() {
1044 public void actionPerformed(java
.awt
.event
.ActionEvent e
) {
1045 int row
= jTable1
.getSelectedRow();
1049 removeInstance(model1
.getValueAt(row
, 1) + " " +
1050 model1
.getValueAt(row
, 2) + " " +
1051 model1
.getValueAt(row
, 3) + " " +
1052 model1
.getValueAt(row
, 4));
1053 ffc
.removeLibraryInstance(moduleKey
, row
);
1054 model1
.removeRow(row
);
1063 * This method initializes jButton2
1065 * @return javax.swing.JButton
1067 private JButton
getJButton2() {
1068 if (jButton2
== null) {
1069 jButton2
= new JButton();
1070 jButton2
.setPreferredSize(new java
.awt
.Dimension(80,20));
1071 jButton2
.setText("Ok");
1072 jButton2
.addActionListener(this);
1078 * This method initializes jButton3
1080 * @return javax.swing.JButton
1082 private JButton
getJButton3() {
1083 if (jButton3
== null) {
1084 jButton3
= new JButton();
1085 jButton3
.setPreferredSize(new java
.awt
.Dimension(80,20));
1086 jButton3
.setText("Cancel");
1087 jButton3
.setVisible(false);
1091 public void actionPerformed(ActionEvent arg0
) {
1093 if (arg0
.getSource() == jButton2
) {
1094 if (jTable4
.isEditing()) {
1095 jTable4
.getCellEditor().stopCellEditing();
1097 ffc
.setFvBinding(moduleKey
, jTextField
.getText());
1098 ffc
.setFfsFileNameGuid(moduleKey
, jTextField1
.getText());
1099 ffc
.setFfsFormatKey(moduleKey
, jTextField2
.getText());
1100 this.setVisible(false);
1104 * This method initializes jPanel8
1106 * @return javax.swing.JPanel
1108 private JPanel
getJPanel8() {
1109 if (jPanel8
== null) {
1110 jLabel8
= new JLabel();
1111 jLabel8
.setText("FFS Format Key");
1112 jLabel7
= new JLabel();
1113 jLabel7
.setText("FFS File GUID");
1114 jLabel6
= new JLabel();
1115 jLabel6
.setText("FV Binding");
1116 jPanel8
= new JPanel();
1117 jPanel8
.add(jLabel6
, null);
1118 jPanel8
.add(getJTextField(), null);
1119 jPanel8
.add(jLabel7
, null);
1120 jPanel8
.add(getJTextField1(), null);
1121 jPanel8
.add(jLabel8
, null);
1122 jPanel8
.add(getJTextField2(), null);
1123 jPanel8
.add(getJScrollPane6(), null);
1124 jPanel8
.add(getJButton4(), null);
1125 jPanel8
.add(getJButton5(), null);
1126 jPanel8
.addComponentListener(new java
.awt
.event
.ComponentAdapter() {
1127 public void componentShown(java
.awt
.event
.ComponentEvent e
) {
1128 initModuleSAOptions(moduleKey
);
1135 * This method initializes jTextField
1137 * @return javax.swing.JTextField
1139 private JTextField
getJTextField() {
1140 if (jTextField
== null) {
1141 jTextField
= new JTextField();
1142 jTextField
.setPreferredSize(new java
.awt
.Dimension(100,20));
1148 * This method initializes jTextField1
1150 * @return javax.swing.JTextField
1152 private JTextField
getJTextField1() {
1153 if (jTextField1
== null) {
1154 jTextField1
= new JTextField();
1155 jTextField1
.setPreferredSize(new java
.awt
.Dimension(100,20));
1161 * This method initializes jTextField2
1163 * @return javax.swing.JTextField
1165 private JTextField
getJTextField2() {
1166 if (jTextField2
== null) {
1167 jTextField2
= new JTextField();
1168 jTextField2
.setPreferredSize(new java
.awt
.Dimension(100,20));
1174 * This method initializes jScrollPane6
1176 * @return javax.swing.JScrollPane
1178 private JScrollPane
getJScrollPane6() {
1179 if (jScrollPane6
== null) {
1180 jScrollPane6
= new JScrollPane();
1181 jScrollPane6
.setPreferredSize(new java
.awt
.Dimension(600,200));
1182 jScrollPane6
.setViewportView(getJTable4());
1184 return jScrollPane6
;
1187 * This method initializes jTable4
1189 * @return javax.swing.JTable
1191 private JTable
getJTable4() {
1192 if (jTable4
== null) {
1193 optionsTableModel
= new DefaultTableModel();
1194 optionsTableModel
.addColumn("BuildTargets");
1195 optionsTableModel
.addColumn("ToolChainFamily");
1196 optionsTableModel
.addColumn("TagName");
1197 optionsTableModel
.addColumn("ToolCode");
1198 optionsTableModel
.addColumn("SupportedArchs");
1199 optionsTableModel
.addColumn("Contents");
1200 jTable4
= new JTable(optionsTableModel
);
1201 jTable4
.setRowHeight(20);
1202 Vector
<String
> vArch
= new Vector
<String
>();
1209 jTable4
.getColumnModel().getColumn(4).setCellEditor(new ListEditor(vArch
));
1210 jTable4
.setSelectionMode(ListSelectionModel
.SINGLE_SELECTION
);
1211 jTable4
.setAutoResizeMode(javax
.swing
.JTable
.AUTO_RESIZE_OFF
);
1212 jTable4
.getModel().addTableModelListener(new TableModelListener() {
1213 public void tableChanged(TableModelEvent arg0
) {
1214 // TODO Auto-generated method stub
1215 int row
= arg0
.getFirstRow();
1216 TableModel m
= (TableModel
)arg0
.getSource();
1218 if (arg0
.getType() == TableModelEvent
.UPDATE
){
1219 //ToDo Data Validition check.
1220 String targets
= m
.getValueAt(row
, 0) + "";
1221 Vector
<Object
> targetName
= null;
1222 if (targets
.length() > 0) {
1223 targetName
= new Vector
<Object
>();
1224 String
[] sArray
= targets
.split(" ");
1225 for (int i
= 0; i
< sArray
.length
; ++i
) {
1226 targetName
.add(sArray
[i
]);
1230 String toolChain
= m
.getValueAt(row
, 1) + "";
1231 String tagName
= m
.getValueAt(row
, 2) + "";
1232 String toolCode
= m
.getValueAt(row
, 3) + "";
1233 String archs
= m
.getValueAt(row
, 4) + "";
1234 Vector
<Object
> supArch
= null;
1235 if (archs
.length() > 0) {
1236 supArch
= new Vector
<Object
>();
1237 String
[] sArray1
= archs
.split(" ");
1238 for (int i
= 0; i
< sArray1
.length
; ++i
) {
1239 supArch
.add(sArray1
[i
]);
1243 String contents
= m
.getValueAt(row
, 5) + "";
1245 ffc
.updateModuleSAOptionsOpt(moduleKey
, row
, targetName
, toolChain
, tagName
, toolCode
, supArch
, contents
);
1253 * This method initializes jButton4
1255 * @return javax.swing.JButton
1257 private JButton
getJButton4() {
1258 if (jButton4
== null) {
1259 jButton4
= new JButton();
1260 jButton4
.setPreferredSize(new java
.awt
.Dimension(80,20));
1261 jButton4
.setText("New");
1262 jButton4
.addActionListener(new java
.awt
.event
.ActionListener() {
1263 public void actionPerformed(java
.awt
.event
.ActionEvent e
) {
1264 String
[] row
= {"", "", "", "", "", ""};
1265 optionsTableModel
.addRow(row
);
1266 Vector
<Object
> v
= new Vector
<Object
>();
1267 Vector
<Object
> v1
= null;
1269 ffc
.genModuleSAOptionsOpt(moduleKey
, v
, "", "", "", v1
, "");
1276 * This method initializes jButton5
1278 * @return javax.swing.JButton
1280 private JButton
getJButton5() {
1281 if (jButton5
== null) {
1282 jButton5
= new JButton();
1283 jButton5
.setPreferredSize(new java
.awt
.Dimension(80,20));
1284 jButton5
.setText("Delete");
1285 jButton5
.addActionListener(new java
.awt
.event
.ActionListener() {
1286 public void actionPerformed(java
.awt
.event
.ActionEvent e
) {
1287 if (jTable4
.getSelectedRow() < 0) {
1291 ffc
.removeModuleSAOptionsOpt(moduleKey
, jTable4
.getSelectedRow());
1292 optionsTableModel
.removeRow(jTable4
.getSelectedRow());
1300 Start the window at the center of screen
1303 protected void centerWindow(int intWidth
, int intHeight
) {
1304 Dimension d
= Toolkit
.getDefaultToolkit().getScreenSize();
1305 this.setLocation((d
.width
- intWidth
) / 2, (d
.height
- intHeight
) / 2);
1309 Start the window at the center of screen
1312 protected void centerWindow() {
1313 centerWindow(this.getSize().width
, this.getSize().height
);
1316 * This method initializes jPanel9
1318 * @return javax.swing.JPanel
1320 private JPanel
getJPanel9() {
1321 if (jPanel9
== null) {
1322 GridLayout gridLayout
= new GridLayout();
1323 gridLayout
.setRows(3);
1324 gridLayout
.setColumns(2);
1325 jPanel9
= new JPanel();
1326 jPanel9
.setLayout(gridLayout
);
1327 jPanel9
.setPreferredSize(new java
.awt
.Dimension(600,90));
1328 jPanel9
.add(getJPanel12(), null);
1329 jPanel9
.add(getJPanel10(), null);
1330 jPanel9
.add(getJPanel11(), null);
1335 * This method initializes jPanel10
1337 * @return javax.swing.JPanel
1339 private JPanel
getJPanel10() {
1340 if (jPanel10
== null) {
1341 FlowLayout flowLayout2
= new FlowLayout();
1342 flowLayout2
.setAlignment(java
.awt
.FlowLayout
.LEFT
);
1343 jLabel10
= new JLabel();
1344 jLabel10
.setText("Max Datum Size");
1345 jPanel10
= new JPanel();
1346 jPanel10
.setLayout(flowLayout2
);
1347 jPanel10
.add(jLabel10
, null);
1348 jPanel10
.add(getJTextField3(), null);
1353 * This method initializes jPanel11
1355 * @return javax.swing.JPanel
1357 private JPanel
getJPanel11() {
1358 if (jPanel11
== null) {
1359 FlowLayout flowLayout3
= new FlowLayout();
1360 flowLayout3
.setAlignment(java
.awt
.FlowLayout
.LEFT
);
1361 jLabel11
= new JLabel();
1362 jLabel11
.setText("Default Value");
1363 jLabel11
.setPreferredSize(new java
.awt
.Dimension(91,16));
1364 jPanel11
= new JPanel();
1365 jPanel11
.setLayout(flowLayout3
);
1366 jPanel11
.add(jLabel11
, null);
1367 jPanel11
.add(getJTextField4(), null);
1368 jPanel11
.add(getJComboBox1(), null);
1373 * This method initializes jPanel12
1375 * @return javax.swing.JPanel
1377 private JPanel
getJPanel12() {
1378 if (jPanel12
== null) {
1379 FlowLayout flowLayout1
= new FlowLayout();
1380 flowLayout1
.setAlignment(java
.awt
.FlowLayout
.LEFT
);
1381 jLabel9
= new JLabel();
1382 jLabel9
.setText("Item Type");
1383 jLabel9
.setPreferredSize(new java
.awt
.Dimension(91,16));
1384 jPanel12
= new JPanel();
1385 jPanel12
.setLayout(flowLayout1
);
1386 jPanel12
.add(jLabel9
, null);
1387 jPanel12
.add(getJComboBox(), null);
1388 jPanel12
.add(getJButton6(), null);
1393 * This method initializes jComboBox
1395 * @return javax.swing.JComboBox
1397 private JComboBox
getJComboBox() {
1398 if (jComboBox
== null) {
1399 jComboBox
= new JComboBox();
1400 jComboBox
.setPreferredSize(new java
.awt
.Dimension(200,20));
1401 jComboBox
.addItemListener(new java
.awt
.event
.ItemListener() {
1402 public void itemStateChanged(java
.awt
.event
.ItemEvent e
) {
1403 int row
= jTable
.getSelectedRow();
1404 if (row
< 0 || jTable
.getValueAt(row
, 2).equals(jComboBox
.getSelectedItem())) {
1407 if (jComboBox
.getItemCount() == 3) {
1408 if (!jComboBox
.getSelectedItem().equals("DYNAMIC")) {
1409 pcdDynamicToNonDynamic(jTable
.getValueAt(row
, 0)+"", jTable
.getValueAt(row
, 1)+"");
1412 pcdNonDynamicToDynamic(jTable
.getValueAt(row
, 0)+"", jTable
.getValueAt(row
, 1)+"");
1421 private void pcdDynamicToNonDynamic(String cName
, String tsGuid
) {
1422 String
[][] saa
= new String
[ffc
.getDynamicPcdBuildDataCount()][5];
1423 ffc
.getDynamicPcdBuildData(saa
);
1424 String maxSize
= "";
1426 for (int i
= 0; i
< saa
.length
; ++i
) {
1427 if (saa
[i
][0].equals(cName
) && saa
[i
][2].equals(tsGuid
)) {
1428 maxSize
= saa
[i
][3];
1429 value
= ffc
.getDynamicPcdBuildDataValue(i
);
1434 ArrayList
<String
> al
= ffc
.getDynPcdMapValue(cName
+ " " + tsGuid
);
1435 for (int i
= 0; i
< al
.size(); ++i
) {
1436 String
[] s
= al
.get(i
).split(" ");
1437 String mKey
= s
[0] + s
[1] + s
[2] + s
[3];
1438 ffc
.updatePcdData(mKey
, cName
, tsGuid
, jComboBox
.getSelectedItem()+"", maxSize
, value
);
1439 s
[4] = jComboBox
.getSelectedItem()+"";
1440 al
.set(i
, s
[0]+" "+s
[1]+" "+s
[2]+" "+s
[3]+" "+s
[4]);
1443 ffc
.removeDynamicPcdBuildData(cName
, tsGuid
);
1446 private void pcdNonDynamicToDynamic(String cName
, String tsGuid
) {
1447 ArrayList
<String
> al
= ffc
.getDynPcdMapValue(cName
+ " " + tsGuid
);
1448 for (int i
= 0; i
< al
.size(); ++i
) {
1449 String
[] s
= al
.get(i
).split(" ");
1450 String mKey
= s
[0] + " " + s
[1]+ " " + s
[2] + " " + s
[3];
1451 ffc
.updatePcdData(mKey
, cName
, tsGuid
, jComboBox
.getSelectedItem()+"", jTextField3
.getText(), jTextField4
.isVisible() ? jTextField4
.getText() : jComboBox1
.getSelectedItem()+"");
1452 s
[4] = jComboBox
.getSelectedItem()+"";
1453 al
.set(i
, s
[0]+" "+s
[1]+" "+s
[2]+" "+s
[3]+" "+s
[4]);
1456 ffc
.addDynamicPcdBuildData(cName
, jTable
.getValueAt(jTable
.getSelectedRow(), 3), tsGuid
, "DYNAMIC", jTable
.getValueAt(jTable
.getSelectedRow(), 5)+"", jTextField4
.isVisible() ? jTextField4
.getText() : jComboBox1
.getSelectedItem()+"");
1459 JOptionPane
.showMessageDialog(frame
, "PCD value format: " + e
.getMessage());
1463 * This method initializes jTextField3
1465 * @return javax.swing.JTextField
1467 private JTextField
getJTextField3() {
1468 if (jTextField3
== null) {
1469 jTextField3
= new JTextField();
1470 jTextField3
.setPreferredSize(new java
.awt
.Dimension(200,20));
1475 * This method initializes jTextField4
1477 * @return javax.swing.JTextField
1479 private JTextField
getJTextField4() {
1480 if (jTextField4
== null) {
1481 jTextField4
= new JTextField();
1482 jTextField4
.setPreferredSize(new java
.awt
.Dimension(200,20));
1487 * This method initializes jButton6
1489 * @return javax.swing.JButton
1491 private JButton
getJButton6() {
1492 if (jButton6
== null) {
1493 jButton6
= new JButton();
1494 jButton6
.setPreferredSize(new java
.awt
.Dimension(150,20));
1495 jButton6
.setText("Update PCD Data");
1496 jButton6
.addActionListener(new java
.awt
.event
.ActionListener() {
1497 public void actionPerformed(java
.awt
.event
.ActionEvent e
) {
1498 int row
= jTable
.getSelectedRow();
1502 model
.setValueAt(jComboBox
.getSelectedItem(), row
, 2);
1503 model
.setValueAt(jTextField3
.getText(), row
, 4);
1504 model
.setValueAt(jTextField4
.isVisible()? jTextField4
.getText():jComboBox1
.getSelectedItem(), row
, 6);
1505 ffc
.updatePcdData(moduleKey
, model
.getValueAt(row
, 0)+"", model
.getValueAt(row
, 1)+"", model
.getValueAt(row
, 2)+"", model
.getValueAt(row
, 4)+"", model
.getValueAt(row
, 6)+"");
1512 * This method initializes jComboBox1
1514 * @return javax.swing.JComboBox
1516 private JComboBox
getJComboBox1() {
1517 if (jComboBox1
== null) {
1518 jComboBox1
= new JComboBox();
1519 jComboBox1
.setPreferredSize(new java
.awt
.Dimension(100,20));
1520 jComboBox1
.setVisible(false);
1521 jComboBox1
.addItem("true");
1522 jComboBox1
.addItem("false");
1528 } // @jve:decl-index=0:visual-constraint="10,10"
1530 class PartialEditableTableModel
extends DefaultTableModel
{
1534 private static final long serialVersionUID
= 1L;
1536 public boolean isCellEditable(int row
, int col
) {
1547 class LibraryTableModel
extends DefaultTableModel
{
1551 private static final long serialVersionUID
= 1L;
1553 public boolean isCellEditable(int row
, int col
) {