f273d8db66718e16d2ff1324a609386a446ed145
[people/mcb30/edk2.git] / edk2 / Tools / Source / FrameworkWizard / src / org / tianocore / frameworkwizard / platform / ui / FpdBuildOptions.java
1 /** @file\r
2  \r
3  The file is used to create, update BuildOptions of Fpd file\r
4  \r
5  Copyright (c) 2006, Intel Corporation\r
6  All rights reserved. This program and the accompanying materials\r
7  are licensed and made available under the terms and conditions of the BSD License\r
8  which accompanies this distribution.  The full text of the license may be found at\r
9  http://opensource.org/licenses/bsd-license.php\r
10  \r
11  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
12  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
13  \r
14  **/\r
15 package org.tianocore.frameworkwizard.platform.ui;\r
16 \r
17 import java.awt.BorderLayout;\r
18 \r
19 import javax.swing.JPanel;\r
20 import javax.swing.JTabbedPane;\r
21 import javax.swing.JCheckBox;\r
22 import javax.swing.JLabel;\r
23 import java.awt.FlowLayout;\r
24 import javax.swing.AbstractAction;\r
25 import java.awt.event.ActionEvent;\r
26 import java.awt.event.ActionListener;\r
27 \r
28 import javax.swing.DefaultCellEditor;\r
29 import javax.swing.JFileChooser;\r
30 import javax.swing.JFrame;\r
31 import javax.swing.JOptionPane;\r
32 import javax.swing.JTextField;\r
33 import javax.swing.JButton;\r
34 import javax.swing.JScrollPane;\r
35 import javax.swing.JTable;\r
36 import javax.swing.JComboBox;\r
37 import javax.swing.ListSelectionModel;\r
38 import javax.swing.event.InternalFrameAdapter;\r
39 import javax.swing.event.InternalFrameEvent;\r
40 import javax.swing.event.ListSelectionEvent;\r
41 import javax.swing.event.ListSelectionListener;\r
42 import javax.swing.event.TableModelEvent;\r
43 import javax.swing.event.TableModelListener;\r
44 import javax.swing.table.DefaultTableModel;\r
45 import javax.swing.table.TableModel;\r
46 \r
47 import org.tianocore.PlatformSurfaceAreaDocument;\r
48 import org.tianocore.frameworkwizard.common.DataValidation;\r
49 import org.tianocore.frameworkwizard.common.Identifications.OpeningPlatformType;\r
50 import org.tianocore.frameworkwizard.common.ui.IInternalFrame;\r
51 \r
52 import java.io.File;\r
53 import java.util.ArrayList;\r
54 import java.util.Iterator;\r
55 import java.util.LinkedHashMap;\r
56 import java.util.Set;\r
57 import java.util.Vector;\r
58 import java.awt.Dimension;\r
59 \r
60 public class FpdBuildOptions extends IInternalFrame {\r
61 \r
62     private static final long serialVersionUID = 1L;\r
63     static JFrame frame;\r
64     private JPanel jContentPane = null;\r
65     private JPanel jPanel = null;\r
66     private JPanel jPanel1 = null;\r
67     private JPanel jPanel2 = null;\r
68     private JPanel jPanel3 = null;\r
69     private JTabbedPane jTabbedPane = null;\r
70     private JPanel jPanel8 = null;\r
71     private JPanel jPanel9 = null;\r
72     private JPanel jPanel10 = null;\r
73     private JPanel jPanel11 = null;\r
74     private JTextField jTextField2 = null;\r
75     private JLabel jLabel3 = null;\r
76     private JTextField jTextField3 = null;\r
77     private JButton jButton4 = null;\r
78     private JButton jButton5 = null;\r
79     private JTextField jTextField4 = null;\r
80     private JScrollPane jScrollPane2 = null;\r
81     private JTable jTable2 = null;\r
82     private DefaultTableModel ffsTableModel = null;\r
83     private DefaultTableModel sectionsTableModel = null;\r
84     private DefaultTableModel sectionTableModel = null;\r
85     private DefaultTableModel subsectionsTableModel = null;\r
86     private DefaultTableModel antTaskTableModel = null;\r
87     private DefaultTableModel ffsAttributesTableModel = null;\r
88     private DefaultTableModel optionsTableModel = null;\r
89     private JPanel jPanel13 = null;\r
90     private JPanel jPanel18 = null;\r
91     private JPanel jPanel15 = null;\r
92     private JPanel jPanel16 = null;\r
93     private JPanel jPanel17 = null;\r
94     private JLabel jLabel7 = null;\r
95     private JTextField jTextField6 = null;\r
96     private JButton jButton8 = null;\r
97     private JButton jButton9 = null;\r
98     private JScrollPane jScrollPane5 = null;\r
99     private JTable jTable4 = null;\r
100     private JPanel jPanel19 = null;\r
101     private JPanel jPanel20 = null;\r
102     private JLabel jLabel9 = null;\r
103     private JTextField jTextField7 = null;\r
104     private JLabel jLabel10 = null;\r
105     private JComboBox jComboBox2 = null;\r
106     private JLabel jLabel11 = null;\r
107     private JLabel jLabel12 = null;\r
108     private JTextField jTextField8 = null;\r
109     private JScrollPane jScrollPane6 = null;\r
110     private JTable jTable5 = null;\r
111     private JButton jButton10 = null;\r
112     private JButton jButton11 = null;\r
113     private JButton jButton17 = null;\r
114     private JButton jButton18 = null;\r
115     private FpdFileContents ffc = null;\r
116     private OpeningPlatformType docConsole = null;\r
117     private JCheckBox jCheckBox9 = null;\r
118     private JCheckBox jCheckBox10 = null;\r
119     private JCheckBox jCheckBox11 = null;\r
120     private JCheckBox jCheckBox12 = null;\r
121     private JCheckBox jCheckBox13 = null;\r
122     private JCheckBox jCheckBox14 = null;\r
123     private JLabel jLabel14 = null;\r
124     private JTextField jTextField12 = null;\r
125     private JTextField jTextField13 = null;\r
126     private JLabel jLabel15 = null;\r
127     private int selectedRow = -1;\r
128     private JLabel jLabel = null;\r
129     private JLabel jLabel1 = null;\r
130     private JScrollPane jScrollPane = null;\r
131     private JTable jTable = null;\r
132     private JLabel jLabel2 = null;\r
133     private JScrollPane jScrollPane1 = null;\r
134     private JTable jTable1 = null;\r
135     private JLabel jLabel4 = null;\r
136     private JScrollPane jScrollPane3 = null;\r
137     private JTable jTable3 = null;\r
138     private JLabel jLabel5 = null;\r
139     private JTextField jTextField = null;\r
140     private JPanel jPanel4 = null;\r
141     private JLabel jLabel6 = null;\r
142     private JButton jButton = null;\r
143     private JButton jButton1 = null;\r
144     private JButton jButton2 = null;\r
145     private JButton jButton3 = null;\r
146     private JLabel jLabel8 = null;\r
147     private JButton jButton6 = null;\r
148     private JButton jButton7 = null;\r
149     private JScrollPane jScrollPane4 = null;\r
150     private JTable jTable6 = null;\r
151     private JButton jButton12 = null;\r
152     private JTextField jTextField1 = null;\r
153     /**\r
154      * This method initializes jPanel   \r
155      *  \r
156      * @return javax.swing.JPanel       \r
157      */\r
158     private JPanel getJPanel() {\r
159         if (jPanel == null) {\r
160             jPanel = new JPanel();\r
161         }\r
162         return jPanel;\r
163     }\r
164 \r
165     /**\r
166      * This method initializes jPanel1  \r
167      *  \r
168      * @return javax.swing.JPanel       \r
169      */\r
170     private JPanel getJPanel1() {\r
171         if (jPanel1 == null) {\r
172             jPanel1 = new JPanel();\r
173         }\r
174         return jPanel1;\r
175     }\r
176 \r
177     /**\r
178      * This method initializes jPanel2  \r
179      *  \r
180      * @return javax.swing.JPanel       \r
181      */\r
182     private JPanel getJPanel2() {\r
183         if (jPanel2 == null) {\r
184             jPanel2 = new JPanel();\r
185         }\r
186         return jPanel2;\r
187     }\r
188 \r
189     /**\r
190      * This method initializes jPanel3  \r
191      *  \r
192      * @return javax.swing.JPanel       \r
193      */\r
194     private JPanel getJPanel3() {\r
195         if (jPanel3 == null) {\r
196             jPanel3 = new JPanel();\r
197         }\r
198         return jPanel3;\r
199     }\r
200 \r
201     /**\r
202      * This method initializes jTabbedPane      \r
203      *  \r
204      * @return javax.swing.JTabbedPane  \r
205      */\r
206     private JTabbedPane getJTabbedPane() {\r
207         if (jTabbedPane == null) {\r
208             jTabbedPane = new JTabbedPane();\r
209             jTabbedPane.addTab("FFS", null, getJPanel13(), null);\r
210             jTabbedPane.addTab("Options", null, getJPanel20(), null);\r
211             jTabbedPane.addTab("User Defined ANT Tasks", null, getJPanel8(), null);\r
212         }\r
213         return jTabbedPane;\r
214     }\r
215 \r
216     \r
217     /**\r
218      * This method initializes jPanel8  \r
219      *  \r
220      * @return javax.swing.JPanel       \r
221      */\r
222     private JPanel getJPanel8() {\r
223         if (jPanel8 == null) {\r
224             jPanel8 = new JPanel();\r
225             jPanel8.setLayout(new BorderLayout());\r
226             jPanel8.add(getJPanel9(), java.awt.BorderLayout.NORTH);\r
227             jPanel8.add(getJPanel10(), java.awt.BorderLayout.SOUTH);\r
228             jPanel8.add(getJPanel11(), java.awt.BorderLayout.CENTER);\r
229 \r
230         }\r
231         return jPanel8;\r
232     }\r
233 \r
234     /**\r
235      * This method initializes jPanel9  \r
236      *  \r
237      * @return javax.swing.JPanel       \r
238      */\r
239     private JPanel getJPanel9() {\r
240         if (jPanel9 == null) {\r
241             jLabel = new JLabel();\r
242             jLabel.setText("ANT Task File");\r
243             jLabel.setPreferredSize(new java.awt.Dimension(80,20));\r
244             FlowLayout flowLayout8 = new FlowLayout();\r
245             flowLayout8.setAlignment(java.awt.FlowLayout.LEFT);\r
246             jLabel3 = new JLabel();\r
247             jLabel3.setText("ID");\r
248             jPanel9 = new JPanel();\r
249             jPanel9.setLayout(flowLayout8);\r
250             jPanel9.add(jLabel, null);\r
251             jPanel9.add(getJTextField2(), null);\r
252             jPanel9.add(getJButton12(), null);\r
253             jPanel9.add(jLabel3, null);\r
254             jPanel9.add(getJTextField3(), null);\r
255         }\r
256         return jPanel9;\r
257     }\r
258 \r
259     /**\r
260      * This method initializes jPanel10 \r
261      *  \r
262      * @return javax.swing.JPanel       \r
263      */\r
264     private JPanel getJPanel10() {\r
265         if (jPanel10 == null) {\r
266             jPanel10 = new JPanel();\r
267         }\r
268         return jPanel10;\r
269     }\r
270 \r
271     /**\r
272      * This method initializes jPanel11 \r
273      *  \r
274      * @return javax.swing.JPanel       \r
275      */\r
276     private JPanel getJPanel11() {\r
277         if (jPanel11 == null) {\r
278             jLabel1 = new JLabel();\r
279             jLabel1.setText("ANT Command Options");\r
280             jLabel1.setPreferredSize(new java.awt.Dimension(131,20));\r
281             FlowLayout flowLayout3 = new FlowLayout();\r
282             flowLayout3.setHgap(5);\r
283             flowLayout3.setAlignment(java.awt.FlowLayout.LEFT);\r
284             jPanel11 = new JPanel();\r
285             jPanel11.setLayout(flowLayout3);\r
286             jPanel11.add(jLabel1, null);\r
287             jPanel11.add(getJTextField4(), null);\r
288             jPanel11.add(getJButton4(), null);\r
289             jPanel11.add(getJButton5(), null);\r
290             jPanel11.add(getJScrollPane2(), null);\r
291         }\r
292         return jPanel11;\r
293     }\r
294 \r
295     /**\r
296      * This method initializes jTextField2      \r
297      *  \r
298      * @return javax.swing.JTextField   \r
299      */\r
300     private JTextField getJTextField2() {\r
301         if (jTextField2 == null) {\r
302             jTextField2 = new JTextField();\r
303             jTextField2.setPreferredSize(new java.awt.Dimension(200,20));\r
304         }\r
305         return jTextField2;\r
306     }\r
307 \r
308     /**\r
309      * This method initializes jTextField3      \r
310      *  \r
311      * @return javax.swing.JTextField   \r
312      */\r
313     private JTextField getJTextField3() {\r
314         if (jTextField3 == null) {\r
315             jTextField3 = new JTextField();\r
316             jTextField3.setPreferredSize(new java.awt.Dimension(100,20));\r
317         }\r
318         return jTextField3;\r
319     }\r
320 \r
321     /**\r
322      * This method initializes jButton4 \r
323      *  \r
324      * @return javax.swing.JButton      \r
325      */\r
326     private JButton getJButton4() {\r
327         if (jButton4 == null) {\r
328             jButton4 = new JButton();\r
329             jButton4.setPreferredSize(new java.awt.Dimension(90,20));\r
330             jButton4.setText("Add");\r
331             jButton4.addActionListener(new ActionListener() {\r
332                 public void actionPerformed(ActionEvent e) {\r
333                     if (!DataValidation.isInt(jTextField3.getText()) || jTextField3.getText().length() != 8) {\r
334                         JOptionPane.showMessageDialog(frame, "ID must be an 8-digit integer.");\r
335                         return;\r
336                     }\r
337                     Object[] o = {jTextField3.getText(), null, null};\r
338                         o[1] = jTextField2.getText();\r
339                         o[2] = jTextField4.getText();\r
340                         ffc.genBuildOptionsUserDefAntTask(o[0]+"", o[1]+"", o[2]+"");\r
341                     antTaskTableModel.addRow(o);\r
342                     docConsole.setSaved(false);\r
343                 }\r
344             });\r
345         }\r
346         return jButton4;\r
347     }\r
348 \r
349     /**\r
350      * This method initializes jButton5 \r
351      *  \r
352      * @return javax.swing.JButton      \r
353      */\r
354     private JButton getJButton5() {\r
355         if (jButton5 == null) {\r
356             jButton5 = new JButton();\r
357             jButton5.setPreferredSize(new java.awt.Dimension(90,20));\r
358             jButton5.setText("Delete");\r
359             jButton5.addActionListener(new ActionListener() {\r
360                 public void actionPerformed(ActionEvent e) {\r
361                     if (selectedRow >= 0) {\r
362                         docConsole.setSaved(false);\r
363                         antTaskTableModel.removeRow(selectedRow);\r
364                         ffc.removeBuildOptionsUserDefAntTask(selectedRow);\r
365                     }\r
366                 }\r
367             });\r
368         }\r
369         return jButton5;\r
370     }\r
371 \r
372     /**\r
373      * This method initializes jTextField4      \r
374      *  \r
375      * @return javax.swing.JTextField   \r
376      */\r
377     private JTextField getJTextField4() {\r
378         if (jTextField4 == null) {\r
379             jTextField4 = new JTextField();\r
380             jTextField4.setPreferredSize(new java.awt.Dimension(270,20));\r
381             jTextField4.setEnabled(true);\r
382         }\r
383         return jTextField4;\r
384     }\r
385 \r
386     /**\r
387      * This method initializes jScrollPane2     \r
388      *  \r
389      * @return javax.swing.JScrollPane  \r
390      */\r
391     private JScrollPane getJScrollPane2() {\r
392         if (jScrollPane2 == null) {\r
393             jScrollPane2 = new JScrollPane();\r
394             jScrollPane2.setPreferredSize(new java.awt.Dimension(600,100));\r
395             jScrollPane2.setViewportView(getJTable2());\r
396         }\r
397         return jScrollPane2;\r
398     }\r
399 \r
400     /**\r
401      * This method initializes jTable2  \r
402      *  \r
403      * @return javax.swing.JTable       \r
404      */\r
405     private JTable getJTable2() {\r
406         if (jTable2 == null) {\r
407             antTaskTableModel = new DefaultTableModel();\r
408             jTable2 = new JTable(antTaskTableModel);\r
409             jTable2.setRowHeight(20);\r
410             antTaskTableModel.addColumn("ID");\r
411             antTaskTableModel.addColumn("Filename");\r
412             antTaskTableModel.addColumn("ANT Command Options");\r
413             \r
414             jTable2.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);\r
415             jTable2.getSelectionModel().addListSelectionListener(new ListSelectionListener(){\r
416                 public void valueChanged(ListSelectionEvent e) {\r
417                     selectedRow = -1;\r
418                     if (e.getValueIsAdjusting()){\r
419                         return;\r
420                     }\r
421                     ListSelectionModel lsm = (ListSelectionModel)e.getSource();\r
422                     if (lsm.isSelectionEmpty()) {\r
423                         return;\r
424                     }\r
425                     else{\r
426                         selectedRow = lsm.getMinSelectionIndex();\r
427                     }\r
428                 }\r
429             });\r
430             \r
431             jTable2.getModel().addTableModelListener(new TableModelListener() {\r
432                 public void tableChanged(TableModelEvent arg0) {\r
433                     // TODO Auto-generated method stub\r
434                     int row = arg0.getFirstRow();\r
435                     TableModel m = (TableModel)arg0.getSource();\r
436                     if (arg0.getType() == TableModelEvent.UPDATE){\r
437                         //ToDo Data Validition check.\r
438                         String id = m.getValueAt(row, 0) + "";\r
439                         String file = m.getValueAt(row, 1) + "";\r
440                         String execOrder = m.getValueAt(row, 2) + "";\r
441                         if (id.length() == 0) {\r
442                             return;\r
443                         }\r
444                         if (file.length() == 0 && execOrder.length() == 0){\r
445                             return;\r
446                         }\r
447                         if (file.length() == 0) {\r
448                             file = null;\r
449                         }\r
450                         if (execOrder.length() == 0) {\r
451                             execOrder = null;\r
452                         }\r
453                         ffc.updateBuildOptionsUserDefAntTask(row, id, file, execOrder);\r
454                         \r
455                     }\r
456                 }\r
457             });\r
458         }\r
459         return jTable2;\r
460     }\r
461 \r
462     /**\r
463      * This method initializes jPanel13 \r
464      *  \r
465      * @return javax.swing.JPanel       \r
466      */\r
467     private JPanel getJPanel13() {\r
468         if (jPanel13 == null) {\r
469             jPanel13 = new JPanel();\r
470             jPanel13.setLayout(new BorderLayout());\r
471             jPanel13.add(getJPanel18(), java.awt.BorderLayout.CENTER);\r
472             jPanel13.add(getJScrollPane(), java.awt.BorderLayout.WEST);\r
473         }\r
474         return jPanel13;\r
475     }\r
476 \r
477     /**\r
478      * This method initializes jPanel18 \r
479      *  \r
480      * @return javax.swing.JPanel       \r
481      */\r
482     private JPanel getJPanel18() {\r
483         if (jPanel18 == null) {\r
484             jPanel18 = new JPanel();\r
485             jPanel18.setLayout(new BorderLayout());\r
486             jPanel18.add(getJPanel15(), java.awt.BorderLayout.NORTH);\r
487             jPanel18.add(getJPanel16(), java.awt.BorderLayout.SOUTH);\r
488             jPanel18.add(getJPanel17(), java.awt.BorderLayout.EAST);\r
489             jPanel18.add(getJPanel19(), java.awt.BorderLayout.CENTER);\r
490         }\r
491         return jPanel18;\r
492     }\r
493 \r
494     /**\r
495      * This method initializes jPanel15 \r
496      *  \r
497      * @return javax.swing.JPanel       \r
498      */\r
499     private JPanel getJPanel15() {\r
500         if (jPanel15 == null) {\r
501             jLabel5 = new JLabel();\r
502             jLabel5.setText("Encapsulation Type");\r
503             FlowLayout flowLayout5 = new FlowLayout();\r
504             flowLayout5.setAlignment(java.awt.FlowLayout.RIGHT);\r
505             jLabel7 = new JLabel();\r
506             jLabel7.setText("FFS Key");\r
507             jPanel15 = new JPanel();\r
508             jPanel15.setLayout(flowLayout5);\r
509             jPanel15.add(jLabel7, null);\r
510             jPanel15.add(getJTextField6(), null);\r
511             jPanel15.add(jLabel5, null);\r
512             jPanel15.add(getJTextField(), null);\r
513             jPanel15.add(getJButton8(), null);\r
514             jPanel15.add(getJButton9(), null);\r
515         }\r
516         return jPanel15;\r
517     }\r
518 \r
519     /**\r
520      * This method initializes jPanel16 \r
521      *  \r
522      * @return javax.swing.JPanel       \r
523      */\r
524     private JPanel getJPanel16() {\r
525         if (jPanel16 == null) {\r
526             jLabel6 = new JLabel();\r
527             jLabel6.setText("Attributes");\r
528             FlowLayout flowLayout6 = new FlowLayout();\r
529             flowLayout6.setHgap(5);\r
530             flowLayout6.setVgap(20);\r
531             flowLayout6.setAlignment(java.awt.FlowLayout.CENTER);\r
532             jPanel16 = new JPanel();\r
533             jPanel16.setPreferredSize(new java.awt.Dimension(491,130));\r
534             jPanel16.setLayout(flowLayout6);\r
535             jPanel16.add(jLabel6, null);\r
536             jPanel16.add(getJScrollPane5(), null);\r
537             jPanel16.add(getJPanel4(), null);\r
538         }\r
539         return jPanel16;\r
540     }\r
541 \r
542     /**\r
543      * This method initializes jPanel17 \r
544      *  \r
545      * @return javax.swing.JPanel       \r
546      */\r
547     private JPanel getJPanel17() {\r
548         if (jPanel17 == null) {\r
549             jPanel17 = new JPanel();\r
550         }\r
551         return jPanel17;\r
552     }\r
553 \r
554     /**\r
555      * This method initializes jTextField6      \r
556      *  \r
557      * @return javax.swing.JTextField   \r
558      */\r
559     private JTextField getJTextField6() {\r
560         if (jTextField6 == null) {\r
561             jTextField6 = new JTextField();\r
562             jTextField6.setPreferredSize(new java.awt.Dimension(100,20));\r
563             jTextField6.setEditable(true);\r
564             jTextField6.addFocusListener(new java.awt.event.FocusAdapter() {\r
565                 public void focusLost(java.awt.event.FocusEvent e) {\r
566                     if (jTable.getSelectedRow() < 0) {\r
567                         return;\r
568                     }\r
569 //                    ffc.updateBuildOptionsFfsKey(jTable.getSelectedRow(), jTextField6.getText());\r
570                 }\r
571             });\r
572         }\r
573         return jTextField6;\r
574     }\r
575 \r
576     /**\r
577      * This method initializes jButton8 \r
578      *  \r
579      * @return javax.swing.JButton      \r
580      */\r
581     private JButton getJButton8() {\r
582         if (jButton8 == null) {\r
583             jButton8 = new JButton();\r
584             jButton8.setPreferredSize(new java.awt.Dimension(70,20));\r
585             jButton8.setText("Add");\r
586             jButton8.addActionListener(new AbstractAction() {\r
587                 /**\r
588                  * \r
589                  */\r
590                 private static final long serialVersionUID = -2923720717273384221L;\r
591 \r
592                 public void actionPerformed(java.awt.event.ActionEvent e) {\r
593                     if (jTextField6.getText().length() > 0) {\r
594                         String[] row = {jTextField6.getText()};\r
595                         ffsTableModel.addRow(row);\r
596                         docConsole.setSaved(false);\r
597                         ffc.genBuildOptionsFfs(jTextField6.getText(), jTextField.getText());\r
598                     }\r
599                 }\r
600             });\r
601         }\r
602         return jButton8;\r
603     }\r
604 \r
605     /**\r
606      * This method initializes jButton9 \r
607      *  \r
608      * @return javax.swing.JButton      \r
609      */\r
610     private JButton getJButton9() {\r
611         if (jButton9 == null) {\r
612             jButton9 = new JButton();\r
613             jButton9.setPreferredSize(new java.awt.Dimension(70,20));\r
614             jButton9.setText("Delete");\r
615             jButton9.addActionListener(new AbstractAction() {\r
616                 /**\r
617                  * \r
618                  */\r
619                 private static final long serialVersionUID = -4002678939178194476L;\r
620 \r
621                 public void actionPerformed(ActionEvent arg0){\r
622                     if (jTable.getSelectedRow() < 0) {\r
623                         return;\r
624                     }\r
625                     docConsole.setSaved(false);\r
626                     ffc.removeBuildOptionsFfs(jTable.getSelectedRow());\r
627                 }\r
628             });\r
629         }\r
630         return jButton9;\r
631     }\r
632 \r
633     /**\r
634      * This method initializes jScrollPane5     \r
635      *  \r
636      * @return javax.swing.JScrollPane  \r
637      */\r
638     private JScrollPane getJScrollPane5() {\r
639         if (jScrollPane5 == null) {\r
640             jScrollPane5 = new JScrollPane();\r
641             jScrollPane5.setPreferredSize(new java.awt.Dimension(350,100));\r
642             jScrollPane5.setViewportView(getJTable4());\r
643         }\r
644         return jScrollPane5;\r
645     }\r
646 \r
647     /**\r
648      * This method initializes jTable4  \r
649      *  \r
650      * @return javax.swing.JTable       \r
651      */\r
652     private JTable getJTable4() {\r
653         if (jTable4 == null) {\r
654             ffsAttributesTableModel = new DefaultTableModel();\r
655             jTable4 = new JTable(ffsAttributesTableModel);\r
656             jTable4.setPreferredSize(new java.awt.Dimension(400,80));\r
657             jTable4.setRowHeight(20);\r
658             ffsAttributesTableModel.addColumn("Name");\r
659             ffsAttributesTableModel.addColumn("Value");\r
660             \r
661             jTable4.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);\r
662             jTable4.getModel().addTableModelListener(new TableModelListener() {\r
663                 public void tableChanged(TableModelEvent arg0) {\r
664                     // TODO Auto-generated method stub\r
665                     int row = arg0.getFirstRow();\r
666                     TableModel m = (TableModel)arg0.getSource();\r
667                     if (arg0.getType() == TableModelEvent.UPDATE){\r
668                         //ToDo Data Validition check.\r
669                         String name = m.getValueAt(row, 0) + "";\r
670                         String value = m.getValueAt(row, 1) + "";\r
671                         \r
672                         if (name.length() == 0) {\r
673                             return;\r
674                         }\r
675                         if (value.length() == 0){\r
676                             return;\r
677                         }\r
678                         docConsole.setSaved(false);\r
679                         ffc.updateBuildOptionsFfsAttribute(jTable.getSelectedRow(), row, name, value);\r
680                     }\r
681                 }\r
682             });\r
683         }\r
684         return jTable4;\r
685     }\r
686 \r
687     /**\r
688      * This method initializes jPanel19 \r
689      *  \r
690      * @return javax.swing.JPanel       \r
691      */\r
692     private JPanel getJPanel19() {\r
693         if (jPanel19 == null) {\r
694             jLabel8 = new JLabel();\r
695             jLabel8.setText("Sections");\r
696             jLabel4 = new JLabel();\r
697             jLabel4.setText("Sub-Sections");\r
698             jLabel2 = new JLabel();\r
699             jLabel2.setText("Section");\r
700             jPanel19 = new JPanel();\r
701             jPanel19.setLayout(new FlowLayout());\r
702             jPanel19.add(jLabel2, null);\r
703             jPanel19.add(getJButton(), null);\r
704             jPanel19.add(getJButton1(), null);\r
705             jPanel19.add(getJScrollPane1(), null);\r
706             jPanel19.add(jLabel8, null);\r
707             jPanel19.add(getJButton6(), null);\r
708             jPanel19.add(getJButton7(), null);\r
709             jPanel19.add(getJScrollPane4(), null);\r
710             jPanel19.add(jLabel4, null);\r
711             jPanel19.add(getJButton2(), null);\r
712             jPanel19.add(getJButton3(), null);\r
713             jPanel19.add(getJScrollPane3(), null);\r
714         }\r
715         return jPanel19;\r
716     }\r
717 \r
718     /**\r
719      * This method initializes jPanel20 \r
720      *  \r
721      * @return javax.swing.JPanel       \r
722      */\r
723     private JPanel getJPanel20() {\r
724         if (jPanel20 == null) {\r
725             jLabel15 = new JLabel();\r
726             jLabel15.setText("Tag Name");\r
727             FlowLayout flowLayout9 = new FlowLayout();\r
728             flowLayout9.setAlignment(java.awt.FlowLayout.LEFT);\r
729             jLabel14 = new JLabel();\r
730             jLabel14.setText("Build Targets");\r
731             jLabel12 = new JLabel();\r
732             jLabel12.setText("Tool Command");\r
733             jLabel11 = new JLabel();\r
734             jLabel11.setText("Supported Arch");\r
735             jLabel10 = new JLabel();\r
736             jLabel10.setText("Tool Chain Family");\r
737             jLabel9 = new JLabel();\r
738             jLabel9.setText("Option Contents");\r
739             jPanel20 = new JPanel();\r
740             jPanel20.setLayout(flowLayout9);\r
741             jPanel20.add(jLabel14, null);\r
742             jPanel20.add(getJTextField12(), null);\r
743             jPanel20.add(jLabel10, null);\r
744             jPanel20.add(getJTextField1(), null);\r
745             jPanel20.add(getJComboBox2(), null);\r
746             jPanel20.add(jLabel12, null);\r
747             jPanel20.add(getJTextField8(), null);\r
748             jPanel20.add(jLabel11, null);\r
749             jPanel20.add(getJCheckBox9(), null);\r
750             jPanel20.add(getJCheckBox10(), null);\r
751             jPanel20.add(getJCheckBox11(), null);\r
752             jPanel20.add(getJCheckBox12(), null);\r
753             jPanel20.add(getJCheckBox13(), null);\r
754             jPanel20.add(getJCheckBox14(), null);\r
755             jPanel20.add(jLabel15, null);\r
756             jPanel20.add(getJTextField13(), null);\r
757             jPanel20.add(jLabel9, null);\r
758             jPanel20.add(getJTextField7(), null);\r
759             jPanel20.add(getJButton10(), null);\r
760             jPanel20.add(getJButton11(), null);\r
761             jPanel20.add(getJScrollPane6(), null);\r
762         }\r
763         return jPanel20;\r
764     }\r
765 \r
766     /**\r
767      * This method initializes jTextField7      \r
768      *  \r
769      * @return javax.swing.JTextField   \r
770      */\r
771     private JTextField getJTextField7() {\r
772         if (jTextField7 == null) {\r
773             jTextField7 = new JTextField();\r
774             jTextField7.setPreferredSize(new java.awt.Dimension(300,20));\r
775         }\r
776         return jTextField7;\r
777     }\r
778 \r
779     /**\r
780      * This method initializes jComboBox2       \r
781      *  \r
782      * @return javax.swing.JComboBox    \r
783      */\r
784     private JComboBox getJComboBox2() {\r
785         if (jComboBox2 == null) {\r
786             jComboBox2 = new JComboBox();\r
787             jComboBox2.setPreferredSize(new java.awt.Dimension(80,20));\r
788             jComboBox2.addItem("MSFT");\r
789             jComboBox2.addItem("GCC");\r
790             jComboBox2.addItem("CYGWIN");\r
791             jComboBox2.addItem("INTEL");\r
792             jComboBox2.setSelectedIndex(0);\r
793             jComboBox2.setVisible(false);\r
794         }\r
795         return jComboBox2;\r
796     }\r
797 \r
798     /**\r
799      * This method initializes jTextField8      \r
800      *  \r
801      * @return javax.swing.JTextField   \r
802      */\r
803     private JTextField getJTextField8() {\r
804         if (jTextField8 == null) {\r
805             jTextField8 = new JTextField();\r
806             jTextField8.setPreferredSize(new java.awt.Dimension(110,20));\r
807         }\r
808         return jTextField8;\r
809     }\r
810 \r
811     /**\r
812      * This method initializes jScrollPane6     \r
813      *  \r
814      * @return javax.swing.JScrollPane  \r
815      */\r
816     private JScrollPane getJScrollPane6() {\r
817         if (jScrollPane6 == null) {\r
818             jScrollPane6 = new JScrollPane();\r
819             jScrollPane6.setPreferredSize(new java.awt.Dimension(630,200));\r
820             jScrollPane6.setViewportView(getJTable5());\r
821         }\r
822         return jScrollPane6;\r
823     }\r
824 \r
825     /**\r
826      * This method initializes jTable5  \r
827      *  \r
828      * @return javax.swing.JTable       \r
829      */\r
830     private JTable getJTable5() {\r
831         if (jTable5 == null) {\r
832             optionsTableModel = new DefaultTableModel();\r
833             jTable5 = new JTable(optionsTableModel);\r
834             jTable5.setRowHeight(20);\r
835             optionsTableModel.addColumn("BuildTargets");\r
836             optionsTableModel.addColumn("ToolChainFamily");\r
837             optionsTableModel.addColumn("SupportedArch");\r
838             optionsTableModel.addColumn("ToolCommand");\r
839             optionsTableModel.addColumn("TagName");\r
840             optionsTableModel.addColumn("Contents");\r
841             \r
842 //            TableColumn toolFamilyCol = jTable5.getColumnModel().getColumn(1);\r
843 //            JComboBox cb = new JComboBox();\r
844 //            cb.addItem("MSFT");\r
845 //            cb.addItem("GCC");\r
846 //            cb.addItem("CYGWIN");\r
847 //            cb.addItem("INTEL");\r
848 //            toolFamilyCol.setCellEditor(new DefaultCellEditor(cb));\r
849             Vector<String> vArch = new Vector<String>();\r
850             vArch.add("IA32");\r
851             vArch.add("X64");\r
852             vArch.add("IPF");\r
853             vArch.add("EBC");\r
854             vArch.add("ARM");\r
855             vArch.add("PPC");\r
856             jTable5.getColumnModel().getColumn(2).setCellEditor(new ListEditor(vArch));\r
857             jTable5.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);\r
858             jTable5.getSelectionModel().addListSelectionListener(new ListSelectionListener(){\r
859                 public void valueChanged(ListSelectionEvent e) {\r
860                     selectedRow = -1;\r
861                     if (e.getValueIsAdjusting()){\r
862                         return;\r
863                     }\r
864                     ListSelectionModel lsm = (ListSelectionModel)e.getSource();\r
865                     if (lsm.isSelectionEmpty()) {\r
866                         return;\r
867                     }\r
868                     else{\r
869                         selectedRow = lsm.getMinSelectionIndex();\r
870                     }\r
871                 }\r
872             });\r
873             \r
874             jTable5.getModel().addTableModelListener(new TableModelListener() {\r
875                 public void tableChanged(TableModelEvent arg0) {\r
876                     // TODO Auto-generated method stub\r
877                     int row = arg0.getFirstRow();\r
878                     TableModel m = (TableModel)arg0.getSource();\r
879                     if (arg0.getType() == TableModelEvent.UPDATE){\r
880                         //ToDo Data Validition check.\r
881                         String targets = m.getValueAt(row, 0) + "";\r
882                         Vector<Object> targetName = new Vector<Object>();\r
883                         String[] sArray = targets.split("( )+");\r
884                         for (int i = 0; i < sArray.length; ++i) {\r
885                             targetName.add(sArray[i]);\r
886                         }\r
887                         String toolChain = m.getValueAt(row, 1) + "";\r
888                         String archs = m.getValueAt(row, 2) + "";\r
889                         Vector<Object> supArch = null;\r
890                         if (archs.length() > 0) {\r
891                             supArch = new Vector<Object>();\r
892                             String[] sArray1 = archs.split("( )+");\r
893                             for (int i = 0; i < sArray1.length; ++i) {\r
894                                 supArch.add(sArray1[i]);\r
895                             }\r
896                         }\r
897                         \r
898                         String toolCmd = m.getValueAt(row, 3) + "";\r
899                         String tagName = m.getValueAt(row, 4) + "";\r
900                         String contents = m.getValueAt(row, 5) + "";\r
901                         docConsole.setSaved(false);\r
902                         ffc.updateBuildOptionsOpt(row, targetName, toolChain, tagName, toolCmd, supArch, contents);\r
903                     }\r
904                 }\r
905             });\r
906         }\r
907         return jTable5;\r
908     }\r
909 \r
910     /**\r
911      * This method initializes jButton10        \r
912      *  \r
913      * @return javax.swing.JButton      \r
914      */\r
915     private JButton getJButton10() {\r
916         if (jButton10 == null) {\r
917             jButton10 = new JButton();\r
918             jButton10.setText("Add");\r
919             jButton10.setPreferredSize(new java.awt.Dimension(90,20));\r
920             jButton10.addActionListener(new AbstractAction() {\r
921                 /**\r
922                  * \r
923                  */\r
924                 private static final long serialVersionUID = 1L;\r
925 \r
926                 public void actionPerformed(java.awt.event.ActionEvent e) {\r
927                     boolean[] boolArray = {jCheckBox9.isSelected(),jCheckBox10.isSelected(),jCheckBox11.isSelected(),\r
928                                            jCheckBox12.isSelected(),jCheckBox13.isSelected(),jCheckBox14.isSelected()};\r
929                     String s = boolToList(boolArray);\r
930                     Object[] o = {jTextField12.getText(), jTextField1.getText(), s,\r
931                                   jTextField8.getText(), jTextField13.getText(), jTextField7.getText()};\r
932                     optionsTableModel.addRow(o);\r
933                     docConsole.setSaved(false);\r
934                     ffc.genBuildOptionsOpt(stringToVector(jTextField12.getText()), jTextField1.getText(), jTextField13.getText(), jTextField8.getText(),  stringToVector(s), jTextField7.getText());\r
935                 }\r
936             });\r
937         }\r
938         return jButton10;\r
939     }\r
940     \r
941     private Vector<Object> stringToVector(String s) {\r
942         String[] sArray = s.split(" ");\r
943         Vector<Object> v = null;\r
944         if (s.length() > 0) {\r
945             v = new Vector<Object>();\r
946             for (int i = 0; i < sArray.length; ++i) {\r
947                 v.add(sArray[i]);\r
948             } \r
949         }\r
950         return v;\r
951     }\r
952     \r
953     private String boolToList (boolean[] bool) {\r
954         String s = " ";\r
955         if (bool[0]) {\r
956             s += "IA32 ";\r
957         }\r
958         if (bool[1]) {\r
959             s += "IPF ";\r
960         }\r
961         if (bool[2]) {\r
962             s += "X64 ";\r
963         }\r
964         if (bool[3]) {\r
965             s += "EBC ";\r
966         }\r
967         if (bool[4]) {\r
968             s += "ARM ";\r
969         }\r
970         if (bool[5]) {\r
971             s += "PPC ";\r
972         }\r
973         if (s == " ") {\r
974             s += "IA32";\r
975         }\r
976         return s.trim();\r
977     }\r
978 \r
979     /**\r
980      * This method initializes jButton11        \r
981      *  \r
982      * @return javax.swing.JButton      \r
983      */\r
984     private JButton getJButton11() {\r
985         if (jButton11 == null) {\r
986             jButton11 = new JButton();\r
987             jButton11.setText("Delete");\r
988             jButton11.setPreferredSize(new java.awt.Dimension(90,20));\r
989             jButton11.addActionListener(new AbstractAction() {\r
990                 /**\r
991                  * \r
992                  */\r
993                 private static final long serialVersionUID = 1L;\r
994 \r
995                 public void actionPerformed(java.awt.event.ActionEvent e) {\r
996                     if (selectedRow >= 0) {\r
997                         optionsTableModel.removeRow(selectedRow);\r
998                         docConsole.setSaved(false);\r
999                         ffc.removeBuildOptionsOpt(selectedRow);\r
1000                     }\r
1001                 }\r
1002             });\r
1003         }\r
1004         return jButton11;\r
1005     }\r
1006 \r
1007     /**\r
1008      * This method initializes jButton17        \r
1009      *  \r
1010      * @return javax.swing.JButton      \r
1011      */\r
1012     private JButton getJButton17() {\r
1013         if (jButton17 == null) {\r
1014             jButton17 = new JButton();\r
1015             jButton17.setPreferredSize(new java.awt.Dimension(80,20));\r
1016             jButton17.setText("New");\r
1017             jButton17.addActionListener(new AbstractAction() {\r
1018                 /**\r
1019                  * \r
1020                  */\r
1021                 private static final long serialVersionUID = 1L;\r
1022 \r
1023                 public void actionPerformed(ActionEvent arg0){\r
1024                     if (jTable.getSelectedRow() < 0) {\r
1025                         return;\r
1026                     }\r
1027                     Object[] o = {"", ""};\r
1028                     ffsAttributesTableModel.addRow(o);\r
1029                     docConsole.setSaved(false);\r
1030                     ffc.genBuildOptionsFfsAttribute(jTable.getSelectedRow(), "", "");\r
1031                 }\r
1032             });\r
1033         }\r
1034         return jButton17;\r
1035     }\r
1036 \r
1037     /**\r
1038      * This method initializes jButton18        \r
1039      *  \r
1040      * @return javax.swing.JButton      \r
1041      */\r
1042     private JButton getJButton18() {\r
1043         if (jButton18 == null) {\r
1044             jButton18 = new JButton();\r
1045             jButton18.setPreferredSize(new java.awt.Dimension(80,20));\r
1046             jButton18.setText("Remove");\r
1047             jButton18.addActionListener(new AbstractAction(){\r
1048                 /**\r
1049                  * \r
1050                  */\r
1051                 private static final long serialVersionUID = 1L;\r
1052 \r
1053                 public void actionPerformed(ActionEvent arg0){\r
1054                     if (jTable.getSelectedRow() < 0) {\r
1055                         return;\r
1056                     }\r
1057                     if (jTable4.getSelectedRow() >= 0){\r
1058                         docConsole.setSaved(false);\r
1059                         ffsAttributesTableModel.removeRow(jTable4.getSelectedRow());\r
1060                         ffc.removeBuildOptionsFfsAttribute(jTable.getSelectedRow(), jTable4.getSelectedRow());\r
1061                     }\r
1062                 }\r
1063             });\r
1064         }\r
1065         return jButton18;\r
1066     }\r
1067 \r
1068     /**\r
1069      * This method initializes jCheckBox9       \r
1070      *  \r
1071      * @return javax.swing.JCheckBox    \r
1072      */\r
1073     private JCheckBox getJCheckBox9() {\r
1074         if (jCheckBox9 == null) {\r
1075             jCheckBox9 = new JCheckBox();\r
1076             jCheckBox9.setPreferredSize(new java.awt.Dimension(50,20));\r
1077             jCheckBox9.setText("IA32");\r
1078         }\r
1079         return jCheckBox9;\r
1080     }\r
1081 \r
1082     /**\r
1083      * This method initializes jCheckBox10      \r
1084      *  \r
1085      * @return javax.swing.JCheckBox    \r
1086      */\r
1087     private JCheckBox getJCheckBox10() {\r
1088         if (jCheckBox10 == null) {\r
1089             jCheckBox10 = new JCheckBox();\r
1090             jCheckBox10.setPreferredSize(new java.awt.Dimension(50,20));\r
1091             jCheckBox10.setText("IPF");\r
1092         }\r
1093         return jCheckBox10;\r
1094     }\r
1095 \r
1096     /**\r
1097      * This method initializes jCheckBox11      \r
1098      *  \r
1099      * @return javax.swing.JCheckBox    \r
1100      */\r
1101     private JCheckBox getJCheckBox11() {\r
1102         if (jCheckBox11 == null) {\r
1103             jCheckBox11 = new JCheckBox();\r
1104             jCheckBox11.setText("X64");\r
1105             jCheckBox11.setPreferredSize(new java.awt.Dimension(47,20));\r
1106         }\r
1107         return jCheckBox11;\r
1108     }\r
1109 \r
1110     /**\r
1111      * This method initializes jCheckBox12      \r
1112      *  \r
1113      * @return javax.swing.JCheckBox    \r
1114      */\r
1115     private JCheckBox getJCheckBox12() {\r
1116         if (jCheckBox12 == null) {\r
1117             jCheckBox12 = new JCheckBox();\r
1118             jCheckBox12.setPreferredSize(new java.awt.Dimension(50,20));\r
1119             jCheckBox12.setText("EBC");\r
1120         }\r
1121         return jCheckBox12;\r
1122     }\r
1123 \r
1124     /**\r
1125      * This method initializes jCheckBox13      \r
1126      *  \r
1127      * @return javax.swing.JCheckBox    \r
1128      */\r
1129     private JCheckBox getJCheckBox13() {\r
1130         if (jCheckBox13 == null) {\r
1131             jCheckBox13 = new JCheckBox();\r
1132             jCheckBox13.setPreferredSize(new java.awt.Dimension(55,20));\r
1133             jCheckBox13.setText("ARM");\r
1134         }\r
1135         return jCheckBox13;\r
1136     }\r
1137 \r
1138     /**\r
1139      * This method initializes jCheckBox14      \r
1140      *  \r
1141      * @return javax.swing.JCheckBox    \r
1142      */\r
1143     private JCheckBox getJCheckBox14() {\r
1144         if (jCheckBox14 == null) {\r
1145             jCheckBox14 = new JCheckBox();\r
1146             jCheckBox14.setPreferredSize(new java.awt.Dimension(50,20));\r
1147             jCheckBox14.setText("PPC");\r
1148         }\r
1149         return jCheckBox14;\r
1150     }\r
1151 \r
1152     /**\r
1153      * This method initializes jTextField12     \r
1154      *  \r
1155      * @return javax.swing.JTextField   \r
1156      */\r
1157     private JTextField getJTextField12() {\r
1158         if (jTextField12 == null) {\r
1159             jTextField12 = new JTextField();\r
1160             jTextField12.setPreferredSize(new java.awt.Dimension(150,20));\r
1161         }\r
1162         return jTextField12;\r
1163     }\r
1164 \r
1165     /**\r
1166      * This method initializes jTextField13     \r
1167      *  \r
1168      * @return javax.swing.JTextField   \r
1169      */\r
1170     private JTextField getJTextField13() {\r
1171         if (jTextField13 == null) {\r
1172             jTextField13 = new JTextField();\r
1173             jTextField13.setPreferredSize(new java.awt.Dimension(140,20));\r
1174         }\r
1175         return jTextField13;\r
1176     }\r
1177 \r
1178     /**\r
1179      * This method initializes jScrollPane      \r
1180      *  \r
1181      * @return javax.swing.JScrollPane  \r
1182      */\r
1183     private JScrollPane getJScrollPane() {\r
1184         if (jScrollPane == null) {\r
1185             jScrollPane = new JScrollPane();\r
1186             jScrollPane.setPreferredSize(new java.awt.Dimension(150,419));\r
1187             jScrollPane.setViewportView(getJTable());\r
1188         }\r
1189         return jScrollPane;\r
1190     }\r
1191 \r
1192     /**\r
1193      * This method initializes jTable   \r
1194      *  \r
1195      * @return javax.swing.JTable       \r
1196      */\r
1197     private JTable getJTable() {\r
1198         if (jTable == null) {\r
1199             ffsTableModel = new DefaultTableModel();\r
1200             ffsTableModel.addColumn("FFS Type");\r
1201             jTable = new JTable(ffsTableModel);\r
1202             jTable.setShowGrid(false);\r
1203             jTable.setRowHeight(20);\r
1204             \r
1205             jTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);\r
1206             jTable.getSelectionModel().addListSelectionListener(new ListSelectionListener(){\r
1207                 public void valueChanged(ListSelectionEvent e) {\r
1208                     \r
1209                     if (e.getValueIsAdjusting()){\r
1210                         return;\r
1211                     }\r
1212                     ListSelectionModel lsm = (ListSelectionModel)e.getSource();\r
1213                     if (lsm.isSelectionEmpty()) {\r
1214                         return;\r
1215                     }\r
1216                     else{\r
1217                         int row = lsm.getMinSelectionIndex();\r
1218                         sectionTableModel.setRowCount(0);\r
1219                         sectionsTableModel.setRowCount(0);\r
1220                         subsectionsTableModel.setRowCount(0);\r
1221                         ffsAttributesTableModel.setRowCount(0);\r
1222                         String[] sArray = {"", ""};\r
1223                         LinkedHashMap<String, String> lhm = new LinkedHashMap<String, String>();\r
1224                         ArrayList<String> alSections = new ArrayList<String>();\r
1225                         ArrayList<String> alSection = new ArrayList<String>();\r
1226                         ffc.getBuildOptionsFfs(row, sArray, lhm, alSections, alSection);\r
1227                         jTextField6.setText(sArray[0]);\r
1228                         jTextField.setText(sArray[1]);\r
1229                         for (int i = 0; i < alSection.size(); ++i) {\r
1230                             String[] sectionRow = {alSection.get(i)};\r
1231                             sectionTableModel.addRow(sectionRow);\r
1232                         }\r
1233                         for (int j = 0; j < alSections.size(); ++j) {\r
1234                             String[] sectionsRow = {alSections.get(j)};\r
1235                             sectionsTableModel.addRow(sectionsRow);\r
1236                         }\r
1237                         if (lhm.size() <= 0 ) {\r
1238                             return;\r
1239                         }\r
1240                         Set<String> keySet = lhm.keySet();\r
1241                         Iterator<String> is = keySet.iterator();\r
1242                         while(is.hasNext()) {\r
1243                             String key = is.next();\r
1244                             String[] attribRow = {key, lhm.get(key)};\r
1245                             ffsAttributesTableModel.addRow(attribRow);\r
1246                         }\r
1247                     }\r
1248                 }\r
1249             });\r
1250             \r
1251             jTable.getModel().addTableModelListener(new TableModelListener() {\r
1252                 public void tableChanged(TableModelEvent arg0) {\r
1253                     // TODO Auto-generated method stub\r
1254                     int row = arg0.getFirstRow();\r
1255                     TableModel m = (TableModel)arg0.getSource();\r
1256                     if (arg0.getType() == TableModelEvent.UPDATE){\r
1257                         //ToDo Data Validition check.\r
1258                         String id = m.getValueAt(row, 0) + "";\r
1259                         \r
1260                         if (id.length() == 0) {\r
1261                             return;\r
1262                         }\r
1263                         docConsole.setSaved(false);\r
1264                         ffc.updateBuildOptionsFfsKey(row, id);\r
1265                     }\r
1266                 }\r
1267             });\r
1268         }\r
1269         return jTable;\r
1270     }\r
1271 \r
1272     /**\r
1273      * This method initializes jScrollPane1     \r
1274      *  \r
1275      * @return javax.swing.JScrollPane  \r
1276      */\r
1277     private JScrollPane getJScrollPane1() {\r
1278         if (jScrollPane1 == null) {\r
1279             jScrollPane1 = new JScrollPane();\r
1280             jScrollPane1.setPreferredSize(new java.awt.Dimension(500,80));\r
1281             jScrollPane1.setViewportView(getJTable1());\r
1282         }\r
1283         return jScrollPane1;\r
1284     }\r
1285 \r
1286     /**\r
1287      * This method initializes jTable1  \r
1288      *  \r
1289      * @return javax.swing.JTable       \r
1290      */\r
1291     private JTable getJTable1() {\r
1292         if (jTable1 == null) {\r
1293             sectionTableModel = new DefaultTableModel();\r
1294             sectionTableModel.addColumn("SectionType");\r
1295             \r
1296             jTable1 = new JTable(sectionTableModel);\r
1297             jTable1.setRowHeight(20);\r
1298             JComboBox cb = new JComboBox();\r
1299             cb.addItem("EFI_SECTION_FREEFORM_SUBTYPE_GUID");\r
1300             cb.addItem("EFI_SECTION_VERSION");\r
1301             cb.addItem("EFI_SECTION_USER_INTERFACE");\r
1302             cb.addItem("EFI_SECTION_DXE_DEPEX");\r
1303             cb.addItem("EFI_SECTION_PEI_DEPEX");\r
1304             cb.addItem("EFI_SECTION_PE32");\r
1305             cb.addItem("EFI_SECTION_PIC");\r
1306             cb.addItem("EFI_SECTION_TE");\r
1307             cb.addItem("EFI_SECTION_RAW");\r
1308             cb.addItem("EFI_SECTION_COMPRESSION");\r
1309             cb.addItem("EFI_SECTION_GUID_DEFINED");\r
1310             cb.addItem("EFI_SECTION_COMPATIBILITY16");\r
1311             cb.addItem("EFI_SECTION_FIRMWARE_VOLUME_IMAGE");\r
1312             jTable1.getColumnModel().getColumn(0).setCellEditor(new DefaultCellEditor(cb));\r
1313             \r
1314             jTable1.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);\r
1315             \r
1316             jTable1.getModel().addTableModelListener(new TableModelListener() {\r
1317                 public void tableChanged(TableModelEvent arg0) {\r
1318                     // TODO Auto-generated method stub\r
1319                     if (jTable.getSelectedRow() < 0) {\r
1320                         return;\r
1321                     }\r
1322                     int row = arg0.getFirstRow();\r
1323                     TableModel m = (TableModel)arg0.getSource();\r
1324                     if (arg0.getType() == TableModelEvent.UPDATE){\r
1325                         //ToDo Data Validition check.\r
1326                         String type = m.getValueAt(row, 0) + "";\r
1327                         docConsole.setSaved(false);\r
1328                        ffc.updateBuildOptionsFfsSectionsSection(jTable.getSelectedRow(), row, type);\r
1329                     }\r
1330                 }\r
1331             });\r
1332         }\r
1333         return jTable1;\r
1334     }\r
1335 \r
1336     /**\r
1337      * This method initializes jScrollPane3     \r
1338      *  \r
1339      * @return javax.swing.JScrollPane  \r
1340      */\r
1341     private JScrollPane getJScrollPane3() {\r
1342         if (jScrollPane3 == null) {\r
1343             jScrollPane3 = new JScrollPane();\r
1344             jScrollPane3.setPreferredSize(new java.awt.Dimension(500,90));\r
1345             jScrollPane3.setViewportView(getJTable3());\r
1346         }\r
1347         return jScrollPane3;\r
1348     }\r
1349 \r
1350     /**\r
1351      * This method initializes jTable3  \r
1352      *  \r
1353      * @return javax.swing.JTable       \r
1354      */\r
1355     private JTable getJTable3() {\r
1356         if (jTable3 == null) {\r
1357             subsectionsTableModel = new DefaultTableModel();\r
1358             subsectionsTableModel.addColumn("SectionType");\r
1359             jTable3 = new JTable(subsectionsTableModel);\r
1360             jTable3.setRowHeight(20);\r
1361             JComboBox cb = new JComboBox();\r
1362             cb.addItem("EFI_SECTION_FREEFORM_SUBTYPE_GUID");\r
1363             cb.addItem("EFI_SECTION_VERSION");\r
1364             cb.addItem("EFI_SECTION_USER_INTERFACE");\r
1365             cb.addItem("EFI_SECTION_DXE_DEPEX");\r
1366             cb.addItem("EFI_SECTION_PEI_DEPEX");\r
1367             cb.addItem("EFI_SECTION_PE32");\r
1368             cb.addItem("EFI_SECTION_PIC");\r
1369             cb.addItem("EFI_SECTION_TE");\r
1370             cb.addItem("EFI_SECTION_RAW");\r
1371             cb.addItem("EFI_SECTION_COMPRESSION");\r
1372             cb.addItem("EFI_SECTION_GUID_DEFINED");\r
1373             cb.addItem("EFI_SECTION_COMPATIBILITY16");\r
1374             cb.addItem("EFI_SECTION_FIRMWARE_VOLUME_IMAGE");\r
1375             jTable3.getColumnModel().getColumn(0).setCellEditor(new DefaultCellEditor(cb));\r
1376             jTable3.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);\r
1377             \r
1378             jTable3.getModel().addTableModelListener(new TableModelListener() {\r
1379                 public void tableChanged(TableModelEvent arg0) {\r
1380                     // TODO Auto-generated method stub\r
1381                     if (jTable.getSelectedRow() < 0 || jTable6.getSelectedRow() < 0) {\r
1382                         return;\r
1383                     }\r
1384                     int row = arg0.getFirstRow();\r
1385                     TableModel m = (TableModel)arg0.getSource();\r
1386                     if (arg0.getType() == TableModelEvent.UPDATE){\r
1387                         //ToDo Data Validition check.\r
1388                         String type = m.getValueAt(row, 0) + "";\r
1389                         docConsole.setSaved(false);\r
1390                         ffc.updateBuildOptionsFfsSectionsSectionsSection(jTable.getSelectedRow(), jTable6.getSelectedRow(), row, type);\r
1391                     }\r
1392                 }\r
1393             });\r
1394         }\r
1395         return jTable3;\r
1396     }\r
1397 \r
1398     /**\r
1399      * This method initializes jTextField       \r
1400      *  \r
1401      * @return javax.swing.JTextField   \r
1402      */\r
1403     private JTextField getJTextField() {\r
1404         if (jTextField == null) {\r
1405             jTextField = new JTextField();\r
1406             jTextField.setPreferredSize(new java.awt.Dimension(100,20));\r
1407             jTextField.addFocusListener(new java.awt.event.FocusAdapter() {\r
1408                 public void focusLost(java.awt.event.FocusEvent e) {\r
1409                     if (jTable.getSelectedRow() < 0) {\r
1410                         return;\r
1411                     }\r
1412                     ffc.updateBuildOptionsFfsSectionsType(jTable.getSelectedRow(), jTextField.getText());\r
1413                 }\r
1414             });\r
1415         }\r
1416         return jTextField;\r
1417     }\r
1418 \r
1419     /**\r
1420      * This method initializes jPanel4  \r
1421      *  \r
1422      * @return javax.swing.JPanel       \r
1423      */\r
1424     private JPanel getJPanel4() {\r
1425         if (jPanel4 == null) {\r
1426             jPanel4 = new JPanel();\r
1427             jPanel4.setPreferredSize(new java.awt.Dimension(100,100));\r
1428             jPanel4.add(getJButton17(), null);\r
1429             jPanel4.add(getJButton18(), null);\r
1430         }\r
1431         return jPanel4;\r
1432     }\r
1433 \r
1434     /**\r
1435      * This method initializes jButton  \r
1436      *  \r
1437      * @return javax.swing.JButton      \r
1438      */\r
1439     private JButton getJButton() {\r
1440         if (jButton == null) {\r
1441             jButton = new JButton();\r
1442             jButton.setPreferredSize(new java.awt.Dimension(80,20));\r
1443             jButton.setText("New");\r
1444             jButton.addActionListener(new java.awt.event.ActionListener() {\r
1445                 public void actionPerformed(java.awt.event.ActionEvent e) {\r
1446                     if (jTable.getSelectedRow() < 0) {\r
1447                         return;\r
1448                     }\r
1449                     docConsole.setSaved(false);\r
1450                     String[] row = {"EFI_SECTION_RAW"};\r
1451                     sectionTableModel.addRow(row);\r
1452                     ffc.genBuildOptionsFfsSectionsSection(jTable.getSelectedRow(), row[0]);\r
1453                 }\r
1454             });\r
1455         }\r
1456         return jButton;\r
1457     }\r
1458 \r
1459     /**\r
1460      * This method initializes jButton1 \r
1461      *  \r
1462      * @return javax.swing.JButton      \r
1463      */\r
1464     private JButton getJButton1() {\r
1465         if (jButton1 == null) {\r
1466             jButton1 = new JButton();\r
1467             jButton1.setPreferredSize(new java.awt.Dimension(80,20));\r
1468             jButton1.setText("Remove");\r
1469           \r
1470             jButton1.addActionListener(new java.awt.event.ActionListener() {\r
1471                 public void actionPerformed(java.awt.event.ActionEvent e) {\r
1472                     if (jTable.getSelectedRow() < 0 || jTable1.getSelectedRow() < 0) {\r
1473                         return;\r
1474                     }\r
1475                     docConsole.setSaved(false);\r
1476                     sectionTableModel.removeRow(jTable1.getSelectedRow());\r
1477                     ffc.removeBuildOptionsFfsSectionsSection(jTable.getSelectedRow(), jTable1.getSelectedRow());\r
1478                 }\r
1479             });\r
1480         }\r
1481         return jButton1;\r
1482     }\r
1483 \r
1484     /**\r
1485      * This method initializes jButton2 \r
1486      *  \r
1487      * @return javax.swing.JButton      \r
1488      */\r
1489     private JButton getJButton2() {\r
1490         if (jButton2 == null) {\r
1491             jButton2 = new JButton();\r
1492             jButton2.setPreferredSize(new java.awt.Dimension(80,20));\r
1493             jButton2.setText("New");\r
1494             jButton2.addActionListener(new java.awt.event.ActionListener() {\r
1495                 public void actionPerformed(java.awt.event.ActionEvent e) {\r
1496                     if (jTable.getSelectedRow() < 0 || jTable6.getSelectedRow() < 0) {\r
1497                         return;\r
1498                     }\r
1499                     docConsole.setSaved(false);\r
1500                     String[] row = {"EFI_SECTION_RAW"};\r
1501                     subsectionsTableModel.addRow(row);\r
1502                     ffc.genBuildOptionsFfsSectionsSectionsSection(jTable.getSelectedRow(), jTable6.getSelectedRow(), row[0]);\r
1503                     \r
1504                 }\r
1505             });\r
1506         }\r
1507         return jButton2;\r
1508     }\r
1509 \r
1510     /**\r
1511      * This method initializes jButton3 \r
1512      *  \r
1513      * @return javax.swing.JButton      \r
1514      */\r
1515     private JButton getJButton3() {\r
1516         if (jButton3 == null) {\r
1517             jButton3 = new JButton();\r
1518             jButton3.setPreferredSize(new java.awt.Dimension(80,20));\r
1519             jButton3.setText("Remove");\r
1520             jButton3.addActionListener(new java.awt.event.ActionListener() {\r
1521                 public void actionPerformed(java.awt.event.ActionEvent e) {\r
1522                     if (jTable.getSelectedRow() < 0 || jTable6.getSelectedRow() < 0 || jTable3.getSelectedRow() < 0) {\r
1523                         return;\r
1524                     }\r
1525                     docConsole.setSaved(false);\r
1526                     subsectionsTableModel.removeRow(jTable3.getSelectedRow());\r
1527                     ffc.removeBuildOptionsFfsSectionsSectionsSection(jTable.getSelectedRow(), jTable6.getSelectedRow(), jTable3.getSelectedRow());\r
1528                 }\r
1529             });\r
1530         }\r
1531         return jButton3;\r
1532     }\r
1533 \r
1534     /**\r
1535      * This method initializes jButton6 \r
1536      *  \r
1537      * @return javax.swing.JButton      \r
1538      */\r
1539     private JButton getJButton6() {\r
1540         if (jButton6 == null) {\r
1541             jButton6 = new JButton();\r
1542             jButton6.setPreferredSize(new java.awt.Dimension(80,20));\r
1543             jButton6.setText("New");\r
1544             jButton6.addActionListener(new java.awt.event.ActionListener() {\r
1545                 public void actionPerformed(java.awt.event.ActionEvent e) {\r
1546                     if (jTable.getSelectedRow() < 0) {\r
1547                         return;\r
1548                     }\r
1549                     docConsole.setSaved(false);\r
1550                     String[] row = {""};\r
1551                     sectionsTableModel.addRow(row);\r
1552                     ffc.genBuildOptionsFfsSectionsSections(jTable.getSelectedRow(), "");\r
1553                 }\r
1554             });\r
1555         }\r
1556         return jButton6;\r
1557     }\r
1558 \r
1559     /**\r
1560      * This method initializes jButton7 \r
1561      *  \r
1562      * @return javax.swing.JButton      \r
1563      */\r
1564     private JButton getJButton7() {\r
1565         if (jButton7 == null) {\r
1566             jButton7 = new JButton();\r
1567             jButton7.setPreferredSize(new java.awt.Dimension(80,20));\r
1568             jButton7.setText("Remove");\r
1569             jButton7.addActionListener(new java.awt.event.ActionListener() {\r
1570                 public void actionPerformed(java.awt.event.ActionEvent e) {\r
1571                     if (jTable.getSelectedRow() < 0 || jTable6.getSelectedRow() < 0) {\r
1572                         return;\r
1573                     }\r
1574                     docConsole.setSaved(false);\r
1575                     sectionsTableModel.removeRow(jTable6.getSelectedRow());\r
1576                     ffc.removeBuildOptionsFfsSectionsSections(jTable.getSelectedRow(), jTable6.getSelectedRow());\r
1577                 }\r
1578             });\r
1579         }\r
1580         return jButton7;\r
1581     }\r
1582 \r
1583     /**\r
1584      * This method initializes jScrollPane4     \r
1585      *  \r
1586      * @return javax.swing.JScrollPane  \r
1587      */\r
1588     private JScrollPane getJScrollPane4() {\r
1589         if (jScrollPane4 == null) {\r
1590             jScrollPane4 = new JScrollPane();\r
1591             jScrollPane4.setPreferredSize(new java.awt.Dimension(500,80));\r
1592             jScrollPane4.setViewportView(getJTable6());\r
1593         }\r
1594         return jScrollPane4;\r
1595     }\r
1596 \r
1597     /**\r
1598      * This method initializes jTable6  \r
1599      *  \r
1600      * @return javax.swing.JTable       \r
1601      */\r
1602     private JTable getJTable6() {\r
1603         if (jTable6 == null) {\r
1604             sectionsTableModel = new DefaultTableModel();\r
1605             sectionsTableModel.addColumn("EncapsulationType");\r
1606             jTable6 = new JTable(sectionsTableModel);\r
1607             jTable6.setRowHeight(20);\r
1608             jTable6.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);\r
1609             jTable6.getSelectionModel().addListSelectionListener(new ListSelectionListener(){\r
1610                 public void valueChanged(ListSelectionEvent e) {\r
1611                     if (e.getValueIsAdjusting()){\r
1612                         return;\r
1613                     }\r
1614                     ListSelectionModel lsm = (ListSelectionModel)e.getSource();\r
1615                     if (lsm.isSelectionEmpty()) {\r
1616                         return;\r
1617                     }\r
1618                     else{\r
1619                         int sectionsRow = lsm.getMinSelectionIndex();\r
1620                         if (jTable.getSelectedRow() < 0) {\r
1621                             return;\r
1622                         }\r
1623                         subsectionsTableModel.setRowCount(0);\r
1624                         ArrayList<String> al = new ArrayList<String>();\r
1625                         ffc.getBuildOptionsFfsSectionsSectionsSection(jTable.getSelectedRow(), sectionsRow, al);\r
1626                         for (int i = 0; i < al.size(); ++i) {\r
1627                             String[] subsectionRow = {al.get(i)};\r
1628                             subsectionsTableModel.addRow(subsectionRow);\r
1629                         }\r
1630                     }\r
1631                 }\r
1632             });\r
1633             \r
1634             jTable6.getModel().addTableModelListener(new TableModelListener() {\r
1635                 public void tableChanged(TableModelEvent arg0) {\r
1636                     // TODO Auto-generated method stub\r
1637                     int row = arg0.getFirstRow();\r
1638                     TableModel m = (TableModel)arg0.getSource();\r
1639                     if (arg0.getType() == TableModelEvent.UPDATE){\r
1640                         //ToDo Data Validition check.\r
1641                         String encapType = m.getValueAt(row, 0) + "";\r
1642                         docConsole.setSaved(false);\r
1643                         ffc.updateBuildOptionsFfsSectionsSections(jTable.getSelectedRow(), row, encapType);\r
1644                     }\r
1645                 }\r
1646             });\r
1647         }\r
1648         return jTable6;\r
1649     }\r
1650 \r
1651     /**\r
1652      * This method initializes jButton12        \r
1653      *  \r
1654      * @return javax.swing.JButton      \r
1655      */\r
1656     private JButton getJButton12() {\r
1657         if (jButton12 == null) {\r
1658             jButton12 = new JButton();\r
1659             jButton12.setPreferredSize(new Dimension(90, 20));\r
1660             jButton12.setText("Browse");\r
1661             jButton12.addActionListener(new AbstractAction() {\r
1662                 private static final long serialVersionUID = 1L;\r
1663 \r
1664                 public void actionPerformed(ActionEvent arg0) {\r
1665                     //\r
1666                     // Select files from current workspace\r
1667                     //\r
1668                     String dirPrefix = System.getenv("WORKSPACE");\r
1669                     JFileChooser chooser = new JFileChooser(dirPrefix);\r
1670                     File theFile = null;\r
1671                     String headerDest = null;\r
1672                     \r
1673                     chooser.setMultiSelectionEnabled(false);\r
1674                     chooser.setFileSelectionMode(JFileChooser.FILES_ONLY);\r
1675                     int retval = chooser.showOpenDialog(frame);\r
1676                     if (retval == JFileChooser.APPROVE_OPTION) {\r
1677 \r
1678                         theFile = chooser.getSelectedFile();\r
1679                         String file = theFile.getPath();\r
1680                         if (!file.startsWith(dirPrefix)) {\r
1681                             JOptionPane.showMessageDialog(frame, "You can only select files in current package!");\r
1682                             return;\r
1683                         }\r
1684                     }\r
1685                     else {\r
1686                         return;\r
1687                     }\r
1688                     \r
1689                     headerDest = theFile.getPath();\r
1690                     jTextField2.setText(headerDest.substring(dirPrefix.length()).replace('\\', '/'));\r
1691                \r
1692                 }\r
1693 \r
1694             });\r
1695         }\r
1696         return jButton12;\r
1697     }\r
1698 \r
1699     /**\r
1700      * This method initializes jTextField1      \r
1701      *  \r
1702      * @return javax.swing.JTextField   \r
1703      */\r
1704     private JTextField getJTextField1() {\r
1705         if (jTextField1 == null) {\r
1706             jTextField1 = new JTextField();\r
1707             jTextField1.setPreferredSize(new java.awt.Dimension(85,20));\r
1708         }\r
1709         return jTextField1;\r
1710     }\r
1711 \r
1712     /**\r
1713      * @param args\r
1714      */\r
1715     public static void main(String[] args) {\r
1716         // TODO Auto-generated method stub\r
1717         new FpdBuildOptions().setVisible(true);\r
1718     }\r
1719 \r
1720     /**\r
1721      * This is the default constructor\r
1722      */\r
1723     public FpdBuildOptions() {\r
1724         super();\r
1725         initialize();\r
1726         this.setVisible(true);\r
1727     }\r
1728     \r
1729     public FpdBuildOptions(PlatformSurfaceAreaDocument.PlatformSurfaceArea fpd) {\r
1730         this();\r
1731         ffc = new FpdFileContents(fpd);\r
1732         init(ffc);\r
1733     }\r
1734     \r
1735     public FpdBuildOptions(OpeningPlatformType opt) {\r
1736         this(opt.getXmlFpd());\r
1737         docConsole = opt;\r
1738     }\r
1739 \r
1740     private void init(FpdFileContents ffc) {\r
1741         initOptionTable();\r
1742         initAntTaskTable();\r
1743         initFfsTable();\r
1744         this.addInternalFrameListener(new InternalFrameAdapter(){\r
1745             public void internalFrameDeactivated(InternalFrameEvent e){\r
1746                 if (jTable.isEditing()) {\r
1747                     jTable.getCellEditor().stopCellEditing();\r
1748                 }\r
1749                 if (jTable1.isEditing()) {\r
1750                     jTable1.getCellEditor().stopCellEditing();\r
1751                 }\r
1752                 if (jTable2.isEditing()) {\r
1753                     jTable2.getCellEditor().stopCellEditing();\r
1754                 }\r
1755                 if (jTable3.isEditing()) {\r
1756                     jTable3.getCellEditor().stopCellEditing();\r
1757                 }\r
1758                 if (jTable4.isEditing()) {\r
1759                     jTable4.getCellEditor().stopCellEditing();\r
1760                 }\r
1761                 if (jTable5.isEditing()) {\r
1762                     jTable5.getCellEditor().stopCellEditing();\r
1763                 }\r
1764             }\r
1765         });\r
1766     }\r
1767     \r
1768     private void initOptionTable() {\r
1769         if (ffc.getBuildOptionsOptCount() == 0) {\r
1770             //ToDo get default options from *.txt file\r
1771             return;\r
1772         }\r
1773         String[][] saa = new String[ffc.getBuildOptionsOptCount()][6];\r
1774         ffc.getBuildOptionsOpts(saa);\r
1775         for (int i = 0; i < saa.length; ++i) {\r
1776             optionsTableModel.addRow(saa[i]);\r
1777         }\r
1778     }\r
1779     \r
1780     private void initAntTaskTable() {\r
1781         if (ffc.getBuildOptionsUserDefAntTaskCount() == 0) {\r
1782             return;\r
1783         }\r
1784         String[][] saa = new String[ffc.getBuildOptionsUserDefAntTaskCount()][3];\r
1785         ffc.getBuildOptionsUserDefAntTasks(saa);\r
1786         for (int i = 0; i < saa.length; ++i) {\r
1787             antTaskTableModel.addRow(saa[i]);\r
1788         }\r
1789     }\r
1790     \r
1791     private void initFfsTable(){\r
1792         int ffsCount = ffc.getBuildOptionsFfsCount();\r
1793         if (ffsCount < 0) {\r
1794             return;\r
1795         }\r
1796         String[][] saa = new String[ffsCount][1];\r
1797         ffc.getBuildOptionsFfsKey(saa);\r
1798         for (int i = 0; i < saa.length; ++i) {\r
1799             ffsTableModel.addRow(saa[i]);\r
1800         }\r
1801     }\r
1802     /**\r
1803      * This method initializes this\r
1804      * \r
1805      * @return void\r
1806      */\r
1807     private void initialize() {\r
1808         this.setSize(722, 577);\r
1809         this.setTitle("FPD Build Options");\r
1810         this.setContentPane(getJContentPane());\r
1811     }\r
1812 \r
1813     /**\r
1814      * This method initializes jContentPane\r
1815      * \r
1816      * @return javax.swing.JPanel\r
1817      */\r
1818     private JPanel getJContentPane() {\r
1819         if (jContentPane == null) {\r
1820             jContentPane = new JPanel();\r
1821             jContentPane.setLayout(new BorderLayout());\r
1822             jContentPane.add(getJPanel(), java.awt.BorderLayout.SOUTH);\r
1823             jContentPane.add(getJPanel1(), java.awt.BorderLayout.NORTH);\r
1824             jContentPane.add(getJPanel2(), java.awt.BorderLayout.WEST);\r
1825             jContentPane.add(getJPanel3(), java.awt.BorderLayout.EAST);\r
1826             jContentPane.add(getJTabbedPane(), java.awt.BorderLayout.CENTER);\r
1827         }\r
1828         return jContentPane;\r
1829     }\r
1830 \r
1831 }  //  @jve:decl-index=0:visual-constraint="10,10"\r