0a96224da3fcaaa1811e2486517389f593ecdf61
[people/mcb30/edk2.git] / edk2 / Tools / Source / FrameworkWizard / src / org / tianocore / frameworkwizard / platform / ui / FpdDynamicPcdBuildDefinitions.java
1 package org.tianocore.frameworkwizard.platform.ui;\r
2 \r
3 import java.awt.BorderLayout;\r
4 \r
5 import javax.swing.ButtonGroup;\r
6 import javax.swing.JPanel;\r
7 import javax.swing.JScrollPane;\r
8 import javax.swing.JTable;\r
9 import javax.swing.ListSelectionModel;\r
10 import javax.swing.event.ListSelectionEvent;\r
11 import javax.swing.event.ListSelectionListener;\r
12 import javax.swing.table.DefaultTableModel;\r
13 \r
14 import org.tianocore.PlatformSurfaceAreaDocument;\r
15 import org.tianocore.frameworkwizard.common.Identifications.OpeningPlatformType;\r
16 import org.tianocore.frameworkwizard.common.ui.IInternalFrame;\r
17 import javax.swing.JCheckBox;\r
18 import java.awt.FlowLayout;\r
19 import javax.swing.JRadioButton;\r
20 import javax.swing.JButton;\r
21 import javax.swing.JLabel;\r
22 import javax.swing.JTextField;\r
23 \r
24 public class FpdDynamicPcdBuildDefinitions extends IInternalFrame {\r
25 \r
26     /**\r
27      * \r
28      */\r
29     private static final long serialVersionUID = 1L;\r
30     private JPanel jContentPane = null;\r
31     private JPanel jPanel = null;\r
32     private JPanel jPanel1 = null;\r
33     private JPanel jPanel2 = null;\r
34     private JScrollPane jScrollPane = null;\r
35     private JTable jTable = null;\r
36     private DynPcdTableModel model = null; \r
37     private DynPcdTableModel model1 = null;\r
38     private FpdFileContents ffc = null;\r
39     private OpeningPlatformType docConsole = null;\r
40     private JPanel jPanel3 = null;\r
41     private JCheckBox jCheckBox = null;\r
42     private JPanel jPanel4 = null;\r
43     private JRadioButton jRadioButton = null;\r
44     private JRadioButton jRadioButton1 = null;\r
45     private JScrollPane jScrollPane1 = null;\r
46     private JTable jTable1 = null;\r
47     private JButton jButton = null;\r
48     private JLabel jLabel = null;\r
49     private JTextField jTextField = null;\r
50     private JLabel jLabel1 = null;\r
51     private JTextField jTextField1 = null;\r
52     private JLabel jLabel2 = null;\r
53     private JLabel jLabel3 = null;\r
54     private JTextField jTextField2 = null;\r
55     private JLabel jLabel4 = null;\r
56     private JTextField jTextField3 = null;\r
57     private JTextField jTextField4 = null;\r
58     private JLabel jLabel5 = null;\r
59     private JTextField jTextField5 = null;\r
60     private JRadioButton jRadioButton2 = null;\r
61     private ButtonGroup bg = new ButtonGroup();\r
62     private JLabel jLabel6 = null;\r
63     /**\r
64      * This is the default constructor\r
65      */\r
66     public FpdDynamicPcdBuildDefinitions() {\r
67         super();\r
68         initialize();\r
69     }\r
70 \r
71     public FpdDynamicPcdBuildDefinitions(PlatformSurfaceAreaDocument.PlatformSurfaceArea fpd){\r
72         this();\r
73         init(fpd);\r
74     }\r
75     \r
76     public FpdDynamicPcdBuildDefinitions(OpeningPlatformType opt) {\r
77         this(opt.getXmlFpd());\r
78         docConsole = opt;\r
79     }\r
80     \r
81     public void init(PlatformSurfaceAreaDocument.PlatformSurfaceArea fpd) {\r
82         if (ffc == null) {\r
83             ffc = new FpdFileContents(fpd);\r
84         }\r
85         String[][] saa = new String[ffc.getDynamicPcdBuildDataCount()][5];\r
86         ffc.getDynamicPcdBuildData(saa);\r
87         for (int i = 0; i < saa.length; ++i) {\r
88             model.addRow(saa[i]);\r
89         }\r
90         \r
91         saa = new String[ffc.getPlatformDefsSkuInfoCount()][2];\r
92         ffc.getPlatformDefsSkuInfos(saa);\r
93         for (int i = 0; i < saa.length; ++i) {\r
94             model1.addRow(saa[i]);\r
95         }\r
96         \r
97     }\r
98     /**\r
99      * This method initializes this\r
100      * \r
101      * @return void\r
102      */\r
103     private void initialize() {\r
104         this.setSize(661, 558);\r
105         this.setTitle("Dynamic PCD Build Definitions");\r
106         this.setContentPane(getJContentPane());\r
107         this.setVisible(true);\r
108     }\r
109 \r
110     /**\r
111      * This method initializes jContentPane\r
112      * \r
113      * @return javax.swing.JPanel\r
114      */\r
115     private JPanel getJContentPane() {\r
116         if (jContentPane == null) {\r
117             jContentPane = new JPanel();\r
118             jContentPane.setLayout(new BorderLayout());\r
119             jContentPane.add(getJPanel(), java.awt.BorderLayout.NORTH);\r
120             jContentPane.add(getJPanel1(), java.awt.BorderLayout.CENTER);\r
121             jContentPane.add(getJPanel2(), java.awt.BorderLayout.SOUTH);\r
122         }\r
123         return jContentPane;\r
124     }\r
125 \r
126     /**\r
127      * This method initializes jPanel   \r
128      *  \r
129      * @return javax.swing.JPanel       \r
130      */\r
131     private JPanel getJPanel() {\r
132         if (jPanel == null) {\r
133             jPanel = new JPanel();\r
134         }\r
135         return jPanel;\r
136     }\r
137 \r
138     /**\r
139      * This method initializes jPanel1  \r
140      *  \r
141      * @return javax.swing.JPanel       \r
142      */\r
143     private JPanel getJPanel1() {\r
144         if (jPanel1 == null) {\r
145             jPanel1 = new JPanel();\r
146             jPanel1.add(getJScrollPane(), null);\r
147             jPanel1.add(getJPanel3(), null);\r
148             jPanel1.add(getJPanel4(), null);\r
149         }\r
150         return jPanel1;\r
151     }\r
152 \r
153     /**\r
154      * This method initializes jPanel2  \r
155      *  \r
156      * @return javax.swing.JPanel       \r
157      */\r
158     private JPanel getJPanel2() {\r
159         if (jPanel2 == null) {\r
160             jPanel2 = new JPanel();\r
161         }\r
162         return jPanel2;\r
163     }\r
164 \r
165     /**\r
166      * This method initializes jScrollPane      \r
167      *  \r
168      * @return javax.swing.JScrollPane  \r
169      */\r
170     private JScrollPane getJScrollPane() {\r
171         if (jScrollPane == null) {\r
172             jScrollPane = new JScrollPane();\r
173             jScrollPane.setPreferredSize(new java.awt.Dimension(600,200));\r
174             jScrollPane.setViewportView(getJTable());\r
175         }\r
176         return jScrollPane;\r
177     }\r
178 \r
179     /**\r
180      * This method initializes jTable   \r
181      *  \r
182      * @return javax.swing.JTable       \r
183      */\r
184     private JTable getJTable() {\r
185         if (jTable == null) {\r
186             model = new DynPcdTableModel();\r
187             model.addColumn("CName");\r
188             model.addColumn("Token");\r
189             model.addColumn("TokenSpaceGuid");\r
190             model.addColumn("MaxDatumSize");\r
191             model.addColumn("DatumType");\r
192             jTable = new JTable(model);\r
193             jTable.setRowHeight(20);\r
194             jTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);\r
195             jTable.getSelectionModel().addListSelectionListener(new ListSelectionListener(){\r
196                 public void valueChanged(ListSelectionEvent e) {\r
197                     if (e.getValueIsAdjusting()){\r
198                         return;\r
199                     }\r
200                     ListSelectionModel lsm = (ListSelectionModel)e.getSource();\r
201                     if (lsm.isSelectionEmpty()) {\r
202                         return;\r
203                     }\r
204                     else{\r
205                         int selectedRow = lsm.getMinSelectionIndex();\r
206                         \r
207                         displayDetails(selectedRow);\r
208                     }\r
209                 }\r
210             });\r
211         }\r
212         return jTable;\r
213     }\r
214     //\r
215     // should display default sku info here, as no selection event of table1 will be triggered when change selection of rows in table. \r
216     //\r
217     private void displayDetails(int i) {\r
218         jTable1.changeSelection(0, 1, false, false);\r
219         int skuCount = ffc.getDynamicPcdSkuInfoCount(i);\r
220         String defaultVal = ffc.getDynamicPcdBuildDataValue(i);\r
221         if (defaultVal != null) {\r
222             jRadioButton2.setSelected(true);\r
223             jTextField5.setText(defaultVal);\r
224             if ( skuCount == 1) {\r
225                 jCheckBox.setSelected(false);\r
226             }\r
227             else{\r
228                 jCheckBox.setSelected(true);\r
229             }\r
230         }\r
231         \r
232         else if (ffc.getDynamicPcdBuildDataVpdOffset(i) != null) {\r
233             jRadioButton1.setSelected(true);\r
234             jTextField4.setText(ffc.getDynamicPcdBuildDataVpdOffset(i));\r
235             if (skuCount ==1) {\r
236                 jCheckBox.setSelected(false);\r
237                 \r
238             }\r
239             else{\r
240                 jCheckBox.setSelected(true);\r
241             }\r
242         }\r
243         else {\r
244             jRadioButton.setSelected(true);\r
245             String[][] saa = new String[ffc.getDynamicPcdSkuInfoCount(i)][7];\r
246             ffc.getDynamicPcdSkuInfos(i, saa);\r
247             jTextField.setText(saa[0][1]);\r
248             jTextField1.setText(saa[0][2]);\r
249             jTextField2.setText(saa[0][3]);\r
250             jTextField3.setText(saa[0][4]);\r
251             if (skuCount ==1) {\r
252                 jCheckBox.setSelected(false);\r
253             }\r
254             else{\r
255                 jCheckBox.setSelected(true);\r
256             }\r
257         }\r
258         \r
259     }\r
260     \r
261     private void displaySkuInfoDetails(int i) {\r
262         int pcdSelected = jTable.getSelectedRow();\r
263         if (pcdSelected < 0) {\r
264             return;\r
265         }\r
266         \r
267         String[][] saa = new String[ffc.getDynamicPcdSkuInfoCount(pcdSelected)][7];\r
268         ffc.getDynamicPcdSkuInfos(pcdSelected, saa);\r
269         \r
270         if (saa[i][5] != null){\r
271             jRadioButton1.setSelected(true);\r
272             jTextField4.setText(saa[i][5]);\r
273         } \r
274         \r
275         else if (saa[i][1] != null) {\r
276             jRadioButton.setSelected(true);\r
277             jTextField.setText(saa[i][1]);\r
278             jTextField1.setText(saa[i][2]);\r
279             jTextField2.setText(saa[i][3]);\r
280             jTextField3.setText(saa[i][4]);\r
281         }\r
282         \r
283         else{\r
284             jRadioButton2.setSelected(true);\r
285             jTextField5.setText(saa[i][6]);\r
286         }\r
287         \r
288     }\r
289 \r
290     /**\r
291      * This method initializes jPanel3  \r
292      *  \r
293      * @return javax.swing.JPanel       \r
294      */\r
295     private JPanel getJPanel3() {\r
296         if (jPanel3 == null) {\r
297             FlowLayout flowLayout = new FlowLayout();\r
298             flowLayout.setAlignment(java.awt.FlowLayout.LEFT);\r
299             jPanel3 = new JPanel();\r
300             jPanel3.setBorder(javax.swing.BorderFactory.createEtchedBorder(javax.swing.border.EtchedBorder.RAISED));\r
301             jPanel3.setLayout(flowLayout);\r
302             jPanel3.setPreferredSize(new java.awt.Dimension(600,100));\r
303             jPanel3.add(getJCheckBox(), null);\r
304             jPanel3.add(getJScrollPane1(), null);\r
305             jPanel3.add(getJButton(), null);\r
306         }\r
307         return jPanel3;\r
308     }\r
309 \r
310     /**\r
311      * This method initializes jCheckBox        \r
312      *  \r
313      * @return javax.swing.JCheckBox    \r
314      */\r
315     private JCheckBox getJCheckBox() {\r
316         if (jCheckBox == null) {\r
317             jCheckBox = new JCheckBox();\r
318             jCheckBox.setText("SKU Enable");\r
319             jCheckBox.addItemListener(new java.awt.event.ItemListener() {\r
320                 public void itemStateChanged(java.awt.event.ItemEvent e) {\r
321                     jTable1.setEnabled(jCheckBox.isSelected());\r
322                 }\r
323             });\r
324         }\r
325         return jCheckBox;\r
326     }\r
327 \r
328                         \r
329   /**\r
330      * This method initializes jPanel4  \r
331      *  \r
332      * @return javax.swing.JPanel       \r
333      */\r
334     private JPanel getJPanel4() {\r
335         if (jPanel4 == null) {\r
336             jLabel5 = new JLabel();\r
337             jLabel5.setPreferredSize(new java.awt.Dimension(80,20));\r
338             jLabel5.setText("VPD Offset");\r
339             jLabel4 = new JLabel();\r
340             jLabel4.setPreferredSize(new java.awt.Dimension(100,20));\r
341             jLabel4.setText("HII Default Value");\r
342             jLabel3 = new JLabel();\r
343             jLabel3.setText("Variable Offset");\r
344             jLabel3.setPreferredSize(new java.awt.Dimension(90,20));\r
345             jLabel2 = new JLabel();\r
346             jLabel2.setText("                           ");\r
347             jLabel1 = new JLabel();\r
348             jLabel1.setText("Variable GUID");\r
349             jLabel1.setPreferredSize(new java.awt.Dimension(100,20));\r
350             jLabel = new JLabel();\r
351             jLabel.setText("Variable Name");\r
352             jLabel.setToolTipText("");\r
353             jLabel.setPreferredSize(new java.awt.Dimension(90,20));\r
354             FlowLayout flowLayout1 = new FlowLayout();\r
355             flowLayout1.setAlignment(java.awt.FlowLayout.LEFT);\r
356             jPanel4 = new JPanel();\r
357             jPanel4.setBorder(javax.swing.BorderFactory.createEtchedBorder(javax.swing.border.EtchedBorder.LOWERED));\r
358             jPanel4.setLayout(flowLayout1);\r
359             jPanel4.setPreferredSize(new java.awt.Dimension(600,120));\r
360             jPanel4.add(getJRadioButton(), null);\r
361             jPanel4.add(jLabel, null);\r
362             jPanel4.add(getJTextField(), null);\r
363             jPanel4.add(jLabel1, null);\r
364             jPanel4.add(getJTextField1(), null);\r
365             jPanel4.add(jLabel2, null);\r
366             jPanel4.add(jLabel3, null);\r
367             jPanel4.add(getJTextField2(), null);\r
368             jPanel4.add(jLabel4, null);\r
369             jPanel4.add(getJTextField3(), null);\r
370             jPanel4.add(getJRadioButton1(), null);\r
371             jPanel4.add(jLabel5, null);\r
372             jPanel4.add(getJTextField4(), null);\r
373             jLabel6 = new JLabel();\r
374             jLabel6.setText("                           ");\r
375             jPanel4.add(jLabel6, null);\r
376                         jLabel.setEnabled(false);\r
377                         jLabel1.setEnabled(false);\r
378                         jLabel4.setEnabled(false);\r
379                         jLabel3.setEnabled(false);\r
380                         jLabel5.setEnabled(false);\r
381                         jPanel4.add(getJRadioButton2(), null);\r
382                         jPanel4.add(getJTextField5(), null);\r
383             bg.add(jRadioButton);\r
384             bg.add(jRadioButton1);\r
385         }                       \r
386 \r
387         return jPanel4;\r
388     }\r
389 \r
390     /**\r
391      * This method initializes jRadioButton     \r
392      *  \r
393      * @return javax.swing.JRadioButton \r
394      */\r
395     private JRadioButton getJRadioButton() {\r
396         if (jRadioButton == null) {\r
397             jRadioButton = new JRadioButton();\r
398             jRadioButton.setText("HII Enable");\r
399             jRadioButton.addItemListener(new java.awt.event.ItemListener() {\r
400                 public void itemStateChanged(java.awt.event.ItemEvent e) {\r
401                     boolean selected = jRadioButton.isSelected();\r
402                     jLabel.setEnabled(selected);\r
403                     jLabel1.setEnabled(selected);\r
404                     jLabel2.setEnabled(selected);\r
405                     jLabel3.setEnabled(selected);\r
406                     jLabel4.setEnabled(selected);\r
407                     jTextField.setEnabled(selected);\r
408                     jTextField1.setEnabled(selected);\r
409                     jTextField2.setEnabled(selected);\r
410                     jTextField3.setEnabled(selected);\r
411                 }\r
412             });\r
413         }\r
414         return jRadioButton;\r
415     }\r
416 \r
417     /**\r
418      * This method initializes jRadioButton1    \r
419      *  \r
420      * @return javax.swing.JRadioButton \r
421      */\r
422     private JRadioButton getJRadioButton1() {\r
423         if (jRadioButton1 == null) {\r
424             jRadioButton1 = new JRadioButton();\r
425             jRadioButton1.setText("VPD Enable");\r
426             jRadioButton1.addItemListener(new java.awt.event.ItemListener() {\r
427                 public void itemStateChanged(java.awt.event.ItemEvent e) {\r
428                     boolean selected = jRadioButton1.isSelected();\r
429                     jTextField4.setEnabled(selected);\r
430                     jLabel5.setEnabled(selected);\r
431                 }\r
432             });\r
433         }\r
434         return jRadioButton1;\r
435     }\r
436 \r
437     /**\r
438      * This method initializes jScrollPane1     \r
439      *  \r
440      * @return javax.swing.JScrollPane  \r
441      */\r
442     private JScrollPane getJScrollPane1() {\r
443         if (jScrollPane1 == null) {\r
444             jScrollPane1 = new JScrollPane();\r
445             jScrollPane1.setPreferredSize(new java.awt.Dimension(300,80));\r
446             jScrollPane1.setViewportView(getJTable1());\r
447         }\r
448         return jScrollPane1;\r
449     }\r
450 \r
451     /**\r
452      * This method initializes jTable1  \r
453      *  \r
454      * @return javax.swing.JTable       \r
455      */\r
456     private JTable getJTable1() {\r
457         if (jTable1 == null) {\r
458             model1 = new DynPcdTableModel();\r
459             jTable1 = new JTable(model1);\r
460             model1.addColumn("SKU ID");\r
461             model1.addColumn("SKU Name");\r
462             \r
463             jTable1.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);\r
464             jTable1.getSelectionModel().addListSelectionListener(new ListSelectionListener(){\r
465                 public void valueChanged(ListSelectionEvent e) {\r
466                     if (jTable.getSelectedRow() < 0) {\r
467                         return;\r
468                     }\r
469                     if (e.getValueIsAdjusting()){\r
470                         return;\r
471                     }\r
472                     ListSelectionModel lsm = (ListSelectionModel)e.getSource();\r
473                     if (lsm.isSelectionEmpty()) {\r
474                         return;\r
475                     }\r
476                     else{\r
477                         int selected = lsm.getMinSelectionIndex();\r
478                         displaySkuInfoDetails(selected);\r
479                     }\r
480                 }\r
481             });\r
482         }\r
483         return jTable1;\r
484     }\r
485 \r
486     /**\r
487      * This method initializes jButton  \r
488      *  \r
489      * @return javax.swing.JButton      \r
490      */\r
491     private JButton getJButton() {\r
492         if (jButton == null) {\r
493             jButton = new JButton();\r
494             jButton.setPreferredSize(new java.awt.Dimension(180,20));\r
495             jButton.setText(" Update SKU Information");\r
496             jButton.addActionListener(new java.awt.event.ActionListener() {\r
497                 public void actionPerformed(java.awt.event.ActionEvent e) {\r
498                     int pcdSelected = jTable.getSelectedRow();\r
499                     if (pcdSelected < 0) {\r
500                         return;\r
501                     }\r
502                     docConsole.setSaved(false);\r
503                     updateSkuInfo(pcdSelected);\r
504                     \r
505                 }\r
506             });\r
507         }\r
508         return jButton;\r
509     }\r
510 \r
511     private void updateSkuInfo (int pcdSelected) {\r
512         int skuCount = ffc.getDynamicPcdSkuInfoCount(pcdSelected);\r
513         \r
514         String varName = null;\r
515         String varGuid = null;\r
516         String varOffset = null;\r
517         String hiiDefault = null;\r
518         String value = null;\r
519         String vpdOffset = null;\r
520         if (jRadioButton.isSelected()) {\r
521             varName = jTextField.getText();\r
522             varGuid = jTextField1.getText();\r
523             varOffset = jTextField2.getText();\r
524             hiiDefault = jTextField3.getText();\r
525         }\r
526         if (jRadioButton1.isSelected()) {\r
527             vpdOffset = jTextField4.getText();\r
528         }\r
529         if (jRadioButton2.isSelected()) {\r
530             value = jTextField5.getText();\r
531         }\r
532         //\r
533         // SKU disabled. only modify data for default SKU.\r
534         //\r
535         if (!jCheckBox.isSelected()) {\r
536             if (true) {\r
537                 ffc.removeDynamicPcdBuildDataSkuInfo(pcdSelected);\r
538                 if (jRadioButton.isSelected()) {\r
539                     ffc.genDynamicPcdBuildDataSkuInfo("0", varName, varGuid, varOffset, hiiDefault, null, null, pcdSelected);\r
540                 }\r
541                 else if (jRadioButton1.isSelected()){\r
542                     ffc.genDynamicPcdBuildDataSkuInfo("0", null, null, null, null, vpdOffset, null, pcdSelected);\r
543                 }\r
544                 else{\r
545                     ffc.genDynamicPcdBuildDataSkuInfo("0", null, null, null, null, null, value, pcdSelected);\r
546                 }\r
547             }\r
548         }\r
549         //\r
550         // SKU Enabled, need add data to all SKUs.\r
551         //\r
552         if (jCheckBox.isSelected()) {\r
553             if (skuCount == 1) {\r
554                 \r
555                 for (int i = 1; i < jTable1.getRowCount(); ++i) {\r
556                     ffc.genDynamicPcdBuildDataSkuInfo(jTable1.getValueAt(i, 0)+"", varName, varGuid, varOffset, hiiDefault, vpdOffset, value, pcdSelected);\r
557                 }\r
558             }\r
559             else {\r
560                 int row = jTable1.getSelectedRow();\r
561                 if (row < 0) {\r
562                     return;\r
563                 }\r
564                 ffc.updateDynamicPcdBuildDataSkuInfo(jTable1.getValueAt(row, 0)+"", varName, varGuid, varOffset, hiiDefault, vpdOffset, value, pcdSelected);\r
565             }\r
566         }\r
567     }\r
568     /**\r
569      * This method initializes jTextField       \r
570      *  \r
571      * @return javax.swing.JTextField   \r
572      */\r
573     private JTextField getJTextField() {\r
574         if (jTextField == null) {\r
575             jTextField = new JTextField();\r
576             jTextField.setPreferredSize(new java.awt.Dimension(150,20));\r
577             jTextField.setEnabled(false);\r
578         }\r
579         return jTextField;\r
580     }\r
581 \r
582     /**\r
583      * This method initializes jTextField1      \r
584      *  \r
585      * @return javax.swing.JTextField   \r
586      */\r
587     private JTextField getJTextField1() {\r
588         if (jTextField1 == null) {\r
589             jTextField1 = new JTextField();\r
590             jTextField1.setPreferredSize(new java.awt.Dimension(150,20));\r
591             jTextField1.setEnabled(false);\r
592         }\r
593         return jTextField1;\r
594     }\r
595 \r
596     /**\r
597      * This method initializes jTextField2      \r
598      *  \r
599      * @return javax.swing.JTextField   \r
600      */\r
601     private JTextField getJTextField2() {\r
602         if (jTextField2 == null) {\r
603             jTextField2 = new JTextField();\r
604             jTextField2.setPreferredSize(new java.awt.Dimension(150,20));\r
605             jTextField2.setEnabled(false);\r
606         }\r
607         return jTextField2;\r
608     }\r
609 \r
610     /**\r
611      * This method initializes jTextField3      \r
612      *  \r
613      * @return javax.swing.JTextField   \r
614      */\r
615     private JTextField getJTextField3() {\r
616         if (jTextField3 == null) {\r
617             jTextField3 = new JTextField();\r
618             jTextField3.setPreferredSize(new java.awt.Dimension(150,20));\r
619             jTextField3.setEnabled(false);\r
620         }\r
621         return jTextField3;\r
622     }\r
623 \r
624     /**\r
625      * This method initializes jTextField4      \r
626      *  \r
627      * @return javax.swing.JTextField   \r
628      */\r
629     private JTextField getJTextField4() {\r
630         if (jTextField4 == null) {\r
631             jTextField4 = new JTextField();\r
632             jTextField4.setPreferredSize(new java.awt.Dimension(150,20));\r
633             jTextField4.setEnabled(false);\r
634         }\r
635         return jTextField4;\r
636     }\r
637 \r
638     /**\r
639      * This method initializes jTextField5      \r
640      *  \r
641      * @return javax.swing.JTextField   \r
642      */\r
643     private JTextField getJTextField5() {\r
644         if (jTextField5 == null) {\r
645             jTextField5 = new JTextField();\r
646             jTextField5.setPreferredSize(new java.awt.Dimension(150,20));\r
647         }\r
648         return jTextField5;\r
649     }\r
650 \r
651     /**\r
652      * This method initializes jRadioButton2    \r
653      *  \r
654      * @return javax.swing.JRadioButton \r
655      */\r
656     private JRadioButton getJRadioButton2() {\r
657         if (jRadioButton2 == null) {\r
658             jRadioButton2 = new JRadioButton();\r
659             jRadioButton2.setText("Default PCD Value");\r
660             jRadioButton2.setSelected(true);\r
661             jRadioButton2.setPreferredSize(new java.awt.Dimension(175,20));\r
662             jRadioButton2.addItemListener(new java.awt.event.ItemListener() {\r
663                 public void itemStateChanged(java.awt.event.ItemEvent e) {\r
664                     jTextField5.setEnabled(jRadioButton2.isSelected());\r
665                 }\r
666             });\r
667             bg.add(jRadioButton2);\r
668         }\r
669         return jRadioButton2;\r
670     }\r
671 \r
672 }  //  @jve:decl-index=0:visual-constraint="10,10"\r
673 \r
674 class DynPcdTableModel extends DefaultTableModel {\r
675     /**\r
676      * \r
677      */\r
678     private static final long serialVersionUID = 1L;\r
679 \r
680     public boolean isCellEditable(int row, int col) {\r
681         \r
682         return false;\r
683     }\r
684 }\r