git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@671 6f19259b...
[mirror_edk2.git] / Tools / Source / FrameworkWizard / src / org / tianocore / frameworkwizard / platform / ui / FpdBuildOptions.java
CommitLineData
a13899c5 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
15package org.tianocore.frameworkwizard.platform.ui;\r
16\r
17import java.awt.BorderLayout;\r
18import java.awt.Dimension;\r
19\r
20import javax.swing.JPanel;\r
21import javax.swing.JDialog;\r
22import javax.swing.JTabbedPane;\r
23import javax.swing.JCheckBox;\r
24import javax.swing.JLabel;\r
25import java.awt.FlowLayout;\r
26import javax.swing.AbstractAction;\r
27import java.awt.event.ActionEvent;\r
28import java.awt.event.ActionListener;\r
29import java.awt.event.ItemEvent;\r
30import java.awt.event.ItemListener;\r
31\r
32import javax.swing.ButtonGroup;\r
33import javax.swing.DefaultCellEditor;\r
34import javax.swing.DefaultListModel;\r
35import javax.swing.JTextField;\r
36import javax.swing.JButton;\r
37import javax.swing.JScrollPane;\r
38import javax.swing.JTable;\r
39import javax.swing.JComboBox;\r
40import javax.swing.JRadioButton;\r
41import javax.swing.ListSelectionModel;\r
42import javax.swing.event.ListSelectionEvent;\r
43import javax.swing.event.ListSelectionListener;\r
44import javax.swing.event.TableModelEvent;\r
45import javax.swing.event.TableModelListener;\r
46import javax.swing.table.DefaultTableModel;\r
47import javax.swing.table.TableColumn;\r
48import javax.swing.table.TableModel;\r
49import javax.swing.JList;\r
50\r
51import org.tianocore.PlatformSurfaceAreaDocument;\r
52import org.tianocore.frameworkwizard.common.ui.IInternalFrame;\r
53import java.awt.CardLayout;\r
54import javax.swing.JTree;\r
55\r
56public class FpdBuildOptions extends IInternalFrame {\r
57\r
58 private static final long serialVersionUID = 1L;\r
59 private JPanel jContentPane = null;\r
60 private JPanel jPanel = null;\r
61 private JPanel jPanel1 = null;\r
62 private JPanel jPanel2 = null;\r
63 private JPanel jPanel3 = null;\r
64 private JTabbedPane jTabbedPane = null;\r
65 private JPanel jPanel8 = null;\r
66 private JPanel jPanel9 = null;\r
67 private JPanel jPanel10 = null;\r
68 private JPanel jPanel11 = null;\r
69 private JRadioButton jRadioButton = null;\r
70 private JTextField jTextField2 = null;\r
71 private JLabel jLabel3 = null;\r
72 private JTextField jTextField3 = null;\r
73 private JButton jButton4 = null;\r
74 private JButton jButton5 = null;\r
75 private JRadioButton jRadioButton1 = null;\r
76 private JLabel jLabel4 = null;\r
77 private JTextField jTextField4 = null;\r
78 private JScrollPane jScrollPane2 = null;\r
79 private JTable jTable2 = null;\r
80 private DefaultTableModel fileNameTableModel = null;\r
81 private DefaultTableModel imageEntryPointTableModel = null;\r
82 private DefaultTableModel outputDirectoryTableModel = null;\r
83 private DefaultTableModel antTaskTableModel = null;\r
84 private DefaultTableModel ffsAttributesTableModel = null;\r
85 private DefaultTableModel optionsTableModel = null;\r
86 private JPanel jPanel13 = null;\r
87 private JPanel jPanel14 = null;\r
88 private JPanel jPanel18 = null;\r
89 private JScrollPane jScrollPane4 = null;\r
90 private JLabel jLabel6 = null;\r
91 private JList jList = null;\r
92 private JPanel jPanel15 = null;\r
93 private JPanel jPanel16 = null;\r
94 private JPanel jPanel17 = null;\r
95 private JLabel jLabel7 = null;\r
96 private JTextField jTextField6 = null;\r
97 private JButton jButton8 = null;\r
98 private JButton jButton9 = null;\r
99 private JCheckBox jCheckBox5 = null;\r
100 private JScrollPane jScrollPane5 = null;\r
101 private JTable jTable4 = null;\r
102 private JPanel jPanel19 = null;\r
103 private JPanel jPanel20 = null;\r
104 private JLabel jLabel9 = null;\r
105 private JTextField jTextField7 = null;\r
106 private JLabel jLabel10 = null;\r
107 private JComboBox jComboBox2 = null;\r
108 private JLabel jLabel11 = null;\r
109 private JLabel jLabel12 = null;\r
110 private JTextField jTextField8 = null;\r
111 private JScrollPane jScrollPane6 = null;\r
112 private JTable jTable5 = null;\r
113 private JButton jButton10 = null;\r
114 private JButton jButton11 = null;\r
115 private JPanel jPanel21 = null;\r
116 private JButton jButton12 = null;\r
117 private JButton jButton13 = null;\r
118 private JLabel jLabel8 = null;\r
119 private JTextField jTextField9 = null;\r
120 private JLabel jLabel13 = null;\r
121 private JTextField jTextField10 = null;\r
122 private JPanel jPanel22 = null;\r
123 private JCheckBox jCheckBox6 = null;\r
124 private JComboBox jComboBox4 = null;\r
125 private JCheckBox jCheckBox7 = null;\r
126 private JComboBox jComboBox5 = null;\r
127 private JCheckBox jCheckBox8 = null;\r
128 private JTextField jTextField11 = null;\r
129 private JButton jButton14 = null;\r
130 private JButton jButton15 = null;\r
131 private JButton jButton16 = null;\r
132 private DefaultListModel listModel = new DefaultListModel();\r
133 private JScrollPane jScrollPane7 = null;\r
134 private JTree jTree = null;\r
135 private JButton jButton17 = null;\r
136 private JButton jButton18 = null;\r
137 private FpdFileContents ffc = null;\r
138 private JButton jButton19 = null;\r
139 private JCheckBox jCheckBox9 = null;\r
140 private JCheckBox jCheckBox10 = null;\r
141 private JCheckBox jCheckBox11 = null;\r
142 private JCheckBox jCheckBox12 = null;\r
143 private JCheckBox jCheckBox13 = null;\r
144 private JCheckBox jCheckBox14 = null;\r
145 private JLabel jLabel14 = null;\r
146 private JTextField jTextField12 = null;\r
147 private JTextField jTextField13 = null;\r
148 private JLabel jLabel15 = null;\r
149 private int selectedRow = -1;\r
150 /**\r
151 * This method initializes jPanel \r
152 * \r
153 * @return javax.swing.JPanel \r
154 */\r
155 private JPanel getJPanel() {\r
156 if (jPanel == null) {\r
157 jPanel = new JPanel();\r
158 }\r
159 return jPanel;\r
160 }\r
161\r
162 /**\r
163 * This method initializes jPanel1 \r
164 * \r
165 * @return javax.swing.JPanel \r
166 */\r
167 private JPanel getJPanel1() {\r
168 if (jPanel1 == null) {\r
169 jPanel1 = new JPanel();\r
170 }\r
171 return jPanel1;\r
172 }\r
173\r
174 /**\r
175 * This method initializes jPanel2 \r
176 * \r
177 * @return javax.swing.JPanel \r
178 */\r
179 private JPanel getJPanel2() {\r
180 if (jPanel2 == null) {\r
181 jPanel2 = new JPanel();\r
182 }\r
183 return jPanel2;\r
184 }\r
185\r
186 /**\r
187 * This method initializes jPanel3 \r
188 * \r
189 * @return javax.swing.JPanel \r
190 */\r
191 private JPanel getJPanel3() {\r
192 if (jPanel3 == null) {\r
193 jPanel3 = new JPanel();\r
194 }\r
195 return jPanel3;\r
196 }\r
197\r
198 /**\r
199 * This method initializes jTabbedPane \r
200 * \r
201 * @return javax.swing.JTabbedPane \r
202 */\r
203 private JTabbedPane getJTabbedPane() {\r
204 if (jTabbedPane == null) {\r
205 jTabbedPane = new JTabbedPane();\r
206 jTabbedPane.addTab("FFS", null, getJPanel13(), null);\r
207 jTabbedPane.addTab("Options", null, getJPanel20(), null);\r
208 jTabbedPane.addTab("User Defined ANT Tasks", null, getJPanel8(), null);\r
209 }\r
210 return jTabbedPane;\r
211 }\r
212\r
213 \r
214 /**\r
215 * This method initializes jPanel8 \r
216 * \r
217 * @return javax.swing.JPanel \r
218 */\r
219 private JPanel getJPanel8() {\r
220 if (jPanel8 == null) {\r
221 jPanel8 = new JPanel();\r
222 jPanel8.setLayout(new BorderLayout());\r
223 jPanel8.add(getJPanel9(), java.awt.BorderLayout.NORTH);\r
224 jPanel8.add(getJPanel10(), java.awt.BorderLayout.SOUTH);\r
225 jPanel8.add(getJPanel11(), java.awt.BorderLayout.CENTER);\r
226 ButtonGroup bg = new ButtonGroup();\r
227 bg.add(jRadioButton);\r
228 bg.add(jRadioButton1);\r
229 }\r
230 return jPanel8;\r
231 }\r
232\r
233 /**\r
234 * This method initializes jPanel9 \r
235 * \r
236 * @return javax.swing.JPanel \r
237 */\r
238 private JPanel getJPanel9() {\r
239 if (jPanel9 == null) {\r
240 FlowLayout flowLayout8 = new FlowLayout();\r
241 flowLayout8.setAlignment(java.awt.FlowLayout.LEFT);\r
242 jLabel3 = new JLabel();\r
243 jLabel3.setText("ID");\r
244 jPanel9 = new JPanel();\r
245 jPanel9.setLayout(flowLayout8);\r
246 jPanel9.add(getJRadioButton(), null);\r
247 jPanel9.add(getJTextField2(), null);\r
248 jPanel9.add(jLabel3, null);\r
249 jPanel9.add(getJTextField3(), null);\r
250 jPanel9.add(getJButton4(), null);\r
251 jPanel9.add(getJButton5(), null);\r
252 }\r
253 return jPanel9;\r
254 }\r
255\r
256 /**\r
257 * This method initializes jPanel10 \r
258 * \r
259 * @return javax.swing.JPanel \r
260 */\r
261 private JPanel getJPanel10() {\r
262 if (jPanel10 == null) {\r
263 jPanel10 = new JPanel();\r
264 }\r
265 return jPanel10;\r
266 }\r
267\r
268 /**\r
269 * This method initializes jPanel11 \r
270 * \r
271 * @return javax.swing.JPanel \r
272 */\r
273 private JPanel getJPanel11() {\r
274 if (jPanel11 == null) {\r
275 FlowLayout flowLayout3 = new FlowLayout();\r
276 flowLayout3.setHgap(5);\r
277 flowLayout3.setAlignment(java.awt.FlowLayout.LEFT);\r
278 jLabel4 = new JLabel();\r
279 jLabel4.setText("Execution Order");\r
280 jLabel4.setEnabled(false);\r
281 jLabel4.setPreferredSize(new java.awt.Dimension(100,16));\r
282 jPanel11 = new JPanel();\r
283 jPanel11.setLayout(flowLayout3);\r
284 jPanel11.add(getJRadioButton1(), null);\r
285 jPanel11.add(jLabel4, null);\r
286 jPanel11.add(getJTextField4(), null);\r
287 jPanel11.add(getJScrollPane2(), null);\r
288 }\r
289 return jPanel11;\r
290 }\r
291\r
292 /**\r
293 * This method initializes jRadioButton \r
294 * \r
295 * @return javax.swing.JRadioButton \r
296 */\r
297 private JRadioButton getJRadioButton() {\r
298 if (jRadioButton == null) {\r
299 jRadioButton = new JRadioButton();\r
300 jRadioButton.setText("ANT tasks File");\r
301 jRadioButton.setSelected(true);\r
302 jRadioButton.addItemListener(new ItemListener() {\r
303 public void itemStateChanged(ItemEvent arg0) {\r
304 boolean selected = jRadioButton.isSelected();\r
305 jTextField2.setEnabled(selected);\r
306 }\r
307 });\r
308 }\r
309 return jRadioButton;\r
310 }\r
311\r
312 /**\r
313 * This method initializes jTextField2 \r
314 * \r
315 * @return javax.swing.JTextField \r
316 */\r
317 private JTextField getJTextField2() {\r
318 if (jTextField2 == null) {\r
319 jTextField2 = new JTextField();\r
320 jTextField2.setPreferredSize(new java.awt.Dimension(200,20));\r
321 }\r
322 return jTextField2;\r
323 }\r
324\r
325 /**\r
326 * This method initializes jTextField3 \r
327 * \r
328 * @return javax.swing.JTextField \r
329 */\r
330 private JTextField getJTextField3() {\r
331 if (jTextField3 == null) {\r
332 jTextField3 = new JTextField();\r
333 jTextField3.setPreferredSize(new java.awt.Dimension(100,20));\r
334 }\r
335 return jTextField3;\r
336 }\r
337\r
338 /**\r
339 * This method initializes jButton4 \r
340 * \r
341 * @return javax.swing.JButton \r
342 */\r
343 private JButton getJButton4() {\r
344 if (jButton4 == null) {\r
345 jButton4 = new JButton();\r
346 jButton4.setPreferredSize(new java.awt.Dimension(70,20));\r
347 jButton4.setText("Add");\r
348 jButton4.addActionListener(new ActionListener() {\r
349 public void actionPerformed(ActionEvent e) {\r
350 Object[] o = {jTextField3.getText(), null, null};\r
351 if (jRadioButton.isSelected()) {\r
352 o[1] = jTextField2.getText();\r
353 ffc.genBuildOptionsUserDefAntTask(o[0]+"", o[1]+"", null);\r
354 }\r
355 if (jRadioButton1.isSelected()) {\r
356 o[2] = jTextField4.getText();\r
357 ffc.genBuildOptionsUserDefAntTask(o[0]+"", null, o[2]+"");\r
358 }\r
359 antTaskTableModel.addRow(o);\r
360 \r
361 }\r
362 });\r
363 }\r
364 return jButton4;\r
365 }\r
366\r
367 /**\r
368 * This method initializes jButton5 \r
369 * \r
370 * @return javax.swing.JButton \r
371 */\r
372 private JButton getJButton5() {\r
373 if (jButton5 == null) {\r
374 jButton5 = new JButton();\r
375 jButton5.setPreferredSize(new java.awt.Dimension(70,20));\r
376 jButton5.setText("Delete");\r
377 jButton5.addActionListener(new ActionListener() {\r
378 public void actionPerformed(ActionEvent e) {\r
379 if (selectedRow >= 0) {\r
380 antTaskTableModel.removeRow(selectedRow);\r
381 ffc.removeBuildOptionsUserDefAntTask(selectedRow);\r
382 }\r
383 }\r
384 });\r
385 }\r
386 return jButton5;\r
387 }\r
388\r
389 /**\r
390 * This method initializes jRadioButton1 \r
391 * \r
392 * @return javax.swing.JRadioButton \r
393 */\r
394 private JRadioButton getJRadioButton1() {\r
395 if (jRadioButton1 == null) {\r
396 jRadioButton1 = new JRadioButton();\r
397 jRadioButton1.setText("ANT Command");\r
398 jRadioButton1.setPreferredSize(new java.awt.Dimension(180,24));\r
399 jRadioButton1.addItemListener(new ItemListener() {\r
400 public void itemStateChanged(ItemEvent arg0) {\r
401 boolean selected = jRadioButton1.isSelected();\r
402 jLabel4.setEnabled(selected);\r
403 jTextField4.setEnabled(selected);\r
404 }\r
405 });\r
406 }\r
407 return jRadioButton1;\r
408 }\r
409\r
410 /**\r
411 * This method initializes jTextField4 \r
412 * \r
413 * @return javax.swing.JTextField \r
414 */\r
415 private JTextField getJTextField4() {\r
416 if (jTextField4 == null) {\r
417 jTextField4 = new JTextField();\r
418 jTextField4.setPreferredSize(new java.awt.Dimension(100,20));\r
419 jTextField4.setEnabled(false);\r
420 }\r
421 return jTextField4;\r
422 }\r
423\r
424 /**\r
425 * This method initializes jScrollPane2 \r
426 * \r
427 * @return javax.swing.JScrollPane \r
428 */\r
429 private JScrollPane getJScrollPane2() {\r
430 if (jScrollPane2 == null) {\r
431 jScrollPane2 = new JScrollPane();\r
432 jScrollPane2.setPreferredSize(new java.awt.Dimension(600,100));\r
433 jScrollPane2.setViewportView(getJTable2());\r
434 }\r
435 return jScrollPane2;\r
436 }\r
437\r
438 /**\r
439 * This method initializes jTable2 \r
440 * \r
441 * @return javax.swing.JTable \r
442 */\r
443 private JTable getJTable2() {\r
444 if (jTable2 == null) {\r
445 antTaskTableModel = new DefaultTableModel();\r
446 jTable2 = new JTable(antTaskTableModel);\r
447 antTaskTableModel.addColumn("ID");\r
448 antTaskTableModel.addColumn("Filename");\r
449 antTaskTableModel.addColumn("ExecutionOrder");\r
450 \r
451 jTable2.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);\r
452 jTable2.getSelectionModel().addListSelectionListener(new ListSelectionListener(){\r
453 public void valueChanged(ListSelectionEvent e) {\r
454 selectedRow = -1;\r
455 if (e.getValueIsAdjusting()){\r
456 return;\r
457 }\r
458 ListSelectionModel lsm = (ListSelectionModel)e.getSource();\r
459 if (lsm.isSelectionEmpty()) {\r
460 return;\r
461 }\r
462 else{\r
463 selectedRow = lsm.getMinSelectionIndex();\r
464 }\r
465 }\r
466 });\r
467 \r
468 jTable2.getModel().addTableModelListener(new TableModelListener() {\r
469 public void tableChanged(TableModelEvent arg0) {\r
470 // TODO Auto-generated method stub\r
471 int row = arg0.getFirstRow();\r
472 TableModel m = (TableModel)arg0.getSource();\r
473 if (arg0.getType() == TableModelEvent.UPDATE){\r
474 //ToDo Data Validition check.\r
475 String id = m.getValueAt(row, 0) + "";\r
476 String file = m.getValueAt(row, 1) + "";\r
477 String execOrder = m.getValueAt(row, 2) + "";\r
478 if (id.length() == 0) {\r
479 return;\r
480 }\r
481 if (file.length() == 0 && execOrder.length() == 0){\r
482 return;\r
483 }\r
484 if (file.length() == 0) {\r
485 file = null;\r
486 }\r
487 if (execOrder.length() == 0) {\r
488 execOrder = null;\r
489 }\r
490 ffc.updateBuildOptionsUserDefAntTask(row, id, file, execOrder);\r
491 \r
492 }\r
493 }\r
494 });\r
495 }\r
496 return jTable2;\r
497 }\r
498\r
499 /**\r
500 * This method initializes jPanel13 \r
501 * \r
502 * @return javax.swing.JPanel \r
503 */\r
504 private JPanel getJPanel13() {\r
505 if (jPanel13 == null) {\r
506 jPanel13 = new JPanel();\r
507 jPanel13.setLayout(new BorderLayout());\r
508 jPanel13.add(getJPanel14(), java.awt.BorderLayout.WEST);\r
509 jPanel13.add(getJPanel18(), java.awt.BorderLayout.CENTER);\r
510 }\r
511 return jPanel13;\r
512 }\r
513\r
514 /**\r
515 * This method initializes jPanel14 \r
516 * \r
517 * @return javax.swing.JPanel \r
518 */\r
519 private JPanel getJPanel14() {\r
520 if (jPanel14 == null) {\r
521 jLabel6 = new JLabel();\r
522 jLabel6.setText("FFS Types");\r
523 jPanel14 = new JPanel();\r
524 jPanel14.setPreferredSize(new java.awt.Dimension(120,300));\r
525 jPanel14.add(jLabel6, null);\r
526 jPanel14.add(getJScrollPane4(), null);\r
527 }\r
528 return jPanel14;\r
529 }\r
530\r
531 /**\r
532 * This method initializes jPanel18 \r
533 * \r
534 * @return javax.swing.JPanel \r
535 */\r
536 private JPanel getJPanel18() {\r
537 if (jPanel18 == null) {\r
538 jPanel18 = new JPanel();\r
539 jPanel18.setLayout(new BorderLayout());\r
540 jPanel18.add(getJPanel15(), java.awt.BorderLayout.NORTH);\r
541 jPanel18.add(getJPanel16(), java.awt.BorderLayout.SOUTH);\r
542 jPanel18.add(getJPanel17(), java.awt.BorderLayout.EAST);\r
543 jPanel18.add(getJPanel19(), java.awt.BorderLayout.CENTER);\r
544 }\r
545 return jPanel18;\r
546 }\r
547\r
548 /**\r
549 * This method initializes jScrollPane4 \r
550 * \r
551 * @return javax.swing.JScrollPane \r
552 */\r
553 private JScrollPane getJScrollPane4() {\r
554 if (jScrollPane4 == null) {\r
555 jScrollPane4 = new JScrollPane();\r
556 jScrollPane4.setPreferredSize(new java.awt.Dimension(120,330));\r
557 jScrollPane4.setViewportView(getJList());\r
558 }\r
559 return jScrollPane4;\r
560 }\r
561\r
562 /**\r
563 * This method initializes jList \r
564 * \r
565 * @return javax.swing.JList \r
566 */\r
567 private JList getJList() {\r
568 if (jList == null) {\r
569 jList = new JList(listModel);\r
570 }\r
571 return jList;\r
572 }\r
573\r
574 /**\r
575 * This method initializes jPanel15 \r
576 * \r
577 * @return javax.swing.JPanel \r
578 */\r
579 private JPanel getJPanel15() {\r
580 if (jPanel15 == null) {\r
581 FlowLayout flowLayout5 = new FlowLayout();\r
582 flowLayout5.setAlignment(java.awt.FlowLayout.RIGHT);\r
583 jLabel7 = new JLabel();\r
584 jLabel7.setText("Type");\r
585 jPanel15 = new JPanel();\r
586 jPanel15.setLayout(flowLayout5);\r
587 jPanel15.add(jLabel7, null);\r
588 jPanel15.add(getJTextField6(), null);\r
589 jPanel15.add(getJButton8(), null);\r
590 jPanel15.add(getJButton9(), null);\r
591 }\r
592 return jPanel15;\r
593 }\r
594\r
595 /**\r
596 * This method initializes jPanel16 \r
597 * \r
598 * @return javax.swing.JPanel \r
599 */\r
600 private JPanel getJPanel16() {\r
601 if (jPanel16 == null) {\r
602 FlowLayout flowLayout6 = new FlowLayout();\r
603 flowLayout6.setHgap(5);\r
604 flowLayout6.setAlignment(java.awt.FlowLayout.LEFT);\r
605 jPanel16 = new JPanel();\r
606 jPanel16.setPreferredSize(new java.awt.Dimension(491,130));\r
607 jPanel16.setLayout(flowLayout6);\r
608 jPanel16.add(getJCheckBox5(), null);\r
609 jPanel16.add(getJButton17(), null);\r
610 jPanel16.add(getJButton18(), null);\r
611 jPanel16.add(getJScrollPane5(), null);\r
612 }\r
613 return jPanel16;\r
614 }\r
615\r
616 /**\r
617 * This method initializes jPanel17 \r
618 * \r
619 * @return javax.swing.JPanel \r
620 */\r
621 private JPanel getJPanel17() {\r
622 if (jPanel17 == null) {\r
623 jPanel17 = new JPanel();\r
624 jPanel17.add(getJScrollPane7(), null);\r
625 }\r
626 return jPanel17;\r
627 }\r
628\r
629 /**\r
630 * This method initializes jTextField6 \r
631 * \r
632 * @return javax.swing.JTextField \r
633 */\r
634 private JTextField getJTextField6() {\r
635 if (jTextField6 == null) {\r
636 jTextField6 = new JTextField();\r
637 jTextField6.setPreferredSize(new java.awt.Dimension(150,20));\r
638 }\r
639 return jTextField6;\r
640 }\r
641\r
642 /**\r
643 * This method initializes jButton8 \r
644 * \r
645 * @return javax.swing.JButton \r
646 */\r
647 private JButton getJButton8() {\r
648 if (jButton8 == null) {\r
649 jButton8 = new JButton();\r
650 jButton8.setPreferredSize(new java.awt.Dimension(70,20));\r
651 jButton8.setText("Add");\r
652 jButton8.addActionListener(new AbstractAction() {\r
653 public void actionPerformed(java.awt.event.ActionEvent e) {\r
654 if (jTextField6.getText().length() > 0) {\r
655 listModel.addElement(jTextField6.getText());\r
656 }\r
657 }\r
658 });\r
659 }\r
660 return jButton8;\r
661 }\r
662\r
663 /**\r
664 * This method initializes jButton9 \r
665 * \r
666 * @return javax.swing.JButton \r
667 */\r
668 private JButton getJButton9() {\r
669 if (jButton9 == null) {\r
670 jButton9 = new JButton();\r
671 jButton9.setPreferredSize(new java.awt.Dimension(70,20));\r
672 jButton9.setText("Delete");\r
673 jButton9.addActionListener(new AbstractAction() {\r
674 public void actionPerformed(ActionEvent arg0){\r
675 listModel.remove(jList.getSelectedIndex());\r
676 }\r
677 });\r
678 }\r
679 return jButton9;\r
680 }\r
681\r
682 /**\r
683 * This method initializes jCheckBox5 \r
684 * \r
685 * @return javax.swing.JCheckBox \r
686 */\r
687 private JCheckBox getJCheckBox5() {\r
688 if (jCheckBox5 == null) {\r
689 jCheckBox5 = new JCheckBox();\r
690 jCheckBox5.setText("Attributes");\r
691 jCheckBox5.setPreferredSize(new java.awt.Dimension(81,20));\r
692 }\r
693 return jCheckBox5;\r
694 }\r
695\r
696 /**\r
697 * This method initializes jScrollPane5 \r
698 * \r
699 * @return javax.swing.JScrollPane \r
700 */\r
701 private JScrollPane getJScrollPane5() {\r
702 if (jScrollPane5 == null) {\r
703 jScrollPane5 = new JScrollPane();\r
704 jScrollPane5.setPreferredSize(new java.awt.Dimension(350,100));\r
705 jScrollPane5.setViewportView(getJTable4());\r
706 }\r
707 return jScrollPane5;\r
708 }\r
709\r
710 /**\r
711 * This method initializes jTable4 \r
712 * \r
713 * @return javax.swing.JTable \r
714 */\r
715 private JTable getJTable4() {\r
716 if (jTable4 == null) {\r
717 ffsAttributesTableModel = new DefaultTableModel();\r
718 jTable4 = new JTable(ffsAttributesTableModel);\r
719 jTable4.setPreferredSize(new java.awt.Dimension(400,80));\r
720 ffsAttributesTableModel.addColumn("Name");\r
721 ffsAttributesTableModel.addColumn("Value");\r
722 }\r
723 return jTable4;\r
724 }\r
725\r
726 /**\r
727 * This method initializes jPanel19 \r
728 * \r
729 * @return javax.swing.JPanel \r
730 */\r
731 private JPanel getJPanel19() {\r
732 if (jPanel19 == null) {\r
733 jPanel19 = new JPanel();\r
734 jPanel19.setLayout(new CardLayout());\r
735 jPanel19.add(getJPanel21(), getJPanel21().getName());\r
736 jPanel19.add(getJPanel22(), getJPanel22().getName());\r
737 }\r
738 return jPanel19;\r
739 }\r
740\r
741 /**\r
742 * This method initializes jPanel20 \r
743 * \r
744 * @return javax.swing.JPanel \r
745 */\r
746 private JPanel getJPanel20() {\r
747 if (jPanel20 == null) {\r
748 jLabel15 = new JLabel();\r
749 jLabel15.setText("Tag Name");\r
750 FlowLayout flowLayout9 = new FlowLayout();\r
751 flowLayout9.setAlignment(java.awt.FlowLayout.LEFT);\r
752 jLabel14 = new JLabel();\r
753 jLabel14.setText("Build Targets");\r
754 jLabel12 = new JLabel();\r
755 jLabel12.setText("Tool Command");\r
756 jLabel11 = new JLabel();\r
757 jLabel11.setText("Supported Arch");\r
758 jLabel10 = new JLabel();\r
759 jLabel10.setText("Tool Chain Family");\r
760 jLabel9 = new JLabel();\r
761 jLabel9.setText("Option Contents");\r
762 jPanel20 = new JPanel();\r
763 jPanel20.setLayout(flowLayout9);\r
764 jPanel20.add(jLabel14, null);\r
765 jPanel20.add(getJTextField12(), null);\r
766 jPanel20.add(jLabel10, null);\r
767 jPanel20.add(getJComboBox2(), null);\r
768 jPanel20.add(jLabel12, null);\r
769 jPanel20.add(getJTextField8(), null);\r
770 jPanel20.add(jLabel11, null);\r
771 jPanel20.add(getJCheckBox9(), null);\r
772 jPanel20.add(getJCheckBox10(), null);\r
773 jPanel20.add(getJCheckBox11(), null);\r
774 jPanel20.add(getJCheckBox12(), null);\r
775 jPanel20.add(getJCheckBox13(), null);\r
776 jPanel20.add(getJCheckBox14(), null);\r
777 jPanel20.add(jLabel15, null);\r
778 jPanel20.add(getJTextField13(), null);\r
779 jPanel20.add(jLabel9, null);\r
780 jPanel20.add(getJTextField7(), null);\r
781 jPanel20.add(getJButton10(), null);\r
782 jPanel20.add(getJButton11(), null);\r
783 jPanel20.add(getJButton19(), null);\r
784 jPanel20.add(getJScrollPane6(), null);\r
785 }\r
786 return jPanel20;\r
787 }\r
788\r
789 /**\r
790 * This method initializes jTextField7 \r
791 * \r
792 * @return javax.swing.JTextField \r
793 */\r
794 private JTextField getJTextField7() {\r
795 if (jTextField7 == null) {\r
796 jTextField7 = new JTextField();\r
797 jTextField7.setPreferredSize(new java.awt.Dimension(300,20));\r
798 }\r
799 return jTextField7;\r
800 }\r
801\r
802 /**\r
803 * This method initializes jComboBox2 \r
804 * \r
805 * @return javax.swing.JComboBox \r
806 */\r
807 private JComboBox getJComboBox2() {\r
808 if (jComboBox2 == null) {\r
809 jComboBox2 = new JComboBox();\r
810 jComboBox2.setPreferredSize(new java.awt.Dimension(80,20));\r
811 jComboBox2.addItem("MSFT");\r
812 jComboBox2.addItem("GCC");\r
813 jComboBox2.addItem("CYGWIN");\r
814 jComboBox2.addItem("INTEL");\r
815 jComboBox2.setSelectedIndex(0);\r
816 }\r
817 return jComboBox2;\r
818 }\r
819\r
820 /**\r
821 * This method initializes jTextField8 \r
822 * \r
823 * @return javax.swing.JTextField \r
824 */\r
825 private JTextField getJTextField8() {\r
826 if (jTextField8 == null) {\r
827 jTextField8 = new JTextField();\r
828 jTextField8.setPreferredSize(new java.awt.Dimension(110,20));\r
829 }\r
830 return jTextField8;\r
831 }\r
832\r
833 /**\r
834 * This method initializes jScrollPane6 \r
835 * \r
836 * @return javax.swing.JScrollPane \r
837 */\r
838 private JScrollPane getJScrollPane6() {\r
839 if (jScrollPane6 == null) {\r
840 jScrollPane6 = new JScrollPane();\r
841 jScrollPane6.setPreferredSize(new java.awt.Dimension(630,200));\r
842 jScrollPane6.setViewportView(getJTable5());\r
843 }\r
844 return jScrollPane6;\r
845 }\r
846\r
847 /**\r
848 * This method initializes jTable5 \r
849 * \r
850 * @return javax.swing.JTable \r
851 */\r
852 private JTable getJTable5() {\r
853 if (jTable5 == null) {\r
854 optionsTableModel = new DefaultTableModel();\r
855 jTable5 = new JTable(optionsTableModel);\r
856 optionsTableModel.addColumn("BuildTargets");\r
857 optionsTableModel.addColumn("ToolChainFamily");\r
858 optionsTableModel.addColumn("SupportedArch");\r
859 optionsTableModel.addColumn("ToolCommand");\r
860 optionsTableModel.addColumn("TagName");\r
861 optionsTableModel.addColumn("Contents");\r
862 \r
863 TableColumn toolFamilyCol = jTable5.getColumnModel().getColumn(1);\r
864 JComboBox cb = new JComboBox();\r
865 cb.addItem("MSFT");\r
866 cb.addItem("GCC");\r
867 cb.addItem("CYGWIN");\r
868 cb.addItem("INTEL");\r
869 toolFamilyCol.setCellEditor(new DefaultCellEditor(cb));\r
870 \r
871 jTable5.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);\r
872 jTable5.getSelectionModel().addListSelectionListener(new ListSelectionListener(){\r
873 public void valueChanged(ListSelectionEvent e) {\r
874 selectedRow = -1;\r
875 if (e.getValueIsAdjusting()){\r
876 return;\r
877 }\r
878 ListSelectionModel lsm = (ListSelectionModel)e.getSource();\r
879 if (lsm.isSelectionEmpty()) {\r
880 return;\r
881 }\r
882 else{\r
883 selectedRow = lsm.getMinSelectionIndex();\r
884 }\r
885 }\r
886 });\r
887 \r
888 jTable5.getModel().addTableModelListener(new TableModelListener() {\r
889 public void tableChanged(TableModelEvent arg0) {\r
890 // TODO Auto-generated method stub\r
891 int row = arg0.getFirstRow();\r
892 TableModel m = (TableModel)arg0.getSource();\r
893 if (arg0.getType() == TableModelEvent.UPDATE){\r
894 //ToDo Data Validition check.\r
895 String targetName = m.getValueAt(row, 0) + "";\r
896 String toolChain = m.getValueAt(row, 1) + "";\r
897 String supArch = m.getValueAt(row, 2) + "";\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 ffc.updateBuildOptionsOpt(row, targetName, toolChain, tagName, toolCmd, supArch, contents);\r
902 }\r
903 }\r
904 });\r
905 }\r
906 return jTable5;\r
907 }\r
908\r
909 /**\r
910 * This method initializes jButton10 \r
911 * \r
912 * @return javax.swing.JButton \r
913 */\r
914 private JButton getJButton10() {\r
915 if (jButton10 == null) {\r
916 jButton10 = new JButton();\r
917 jButton10.setText("Add");\r
918 jButton10.setPreferredSize(new java.awt.Dimension(70,20));\r
919 jButton10.addActionListener(new AbstractAction() {\r
920 public void actionPerformed(java.awt.event.ActionEvent e) {\r
921 boolean[] boolArray = {jCheckBox9.isSelected(),jCheckBox10.isSelected(),jCheckBox11.isSelected(),\r
922 jCheckBox12.isSelected(),jCheckBox13.isSelected(),jCheckBox14.isSelected()};\r
923 String s = boolToList(boolArray);\r
924 Object[] o = {jTextField12.getText(), jComboBox2.getSelectedItem(), s,\r
925 jTextField8.getText(), jTextField13.getText(), jTextField7.getText()};\r
926 optionsTableModel.addRow(o);\r
927 ffc.genBuildOptionsOpt(jTextField12.getText(), jComboBox2.getSelectedItem()+"", jTextField13.getText(), jTextField8.getText(), s, jTextField7.getText());\r
928 }\r
929 });\r
930 }\r
931 return jButton10;\r
932 }\r
933 \r
934 private String boolToList (boolean[] bool) {\r
935 String s = " ";\r
936 if (bool[0]) {\r
937 s += "IA32 ";\r
938 }\r
939 if (bool[1]) {\r
940 s += "IPF ";\r
941 }\r
942 if (bool[2]) {\r
943 s += "X64 ";\r
944 }\r
945 if (bool[3]) {\r
946 s += "EBC ";\r
947 }\r
948 if (bool[4]) {\r
949 s += "ARM ";\r
950 }\r
951 if (bool[5]) {\r
952 s += "PPC ";\r
953 }\r
954 \r
955 return s.trim();\r
956 }\r
957\r
958 /**\r
959 * This method initializes jButton11 \r
960 * \r
961 * @return javax.swing.JButton \r
962 */\r
963 private JButton getJButton11() {\r
964 if (jButton11 == null) {\r
965 jButton11 = new JButton();\r
966 jButton11.setText("Delete");\r
967 jButton11.setPreferredSize(new java.awt.Dimension(70,20));\r
968 jButton11.addActionListener(new AbstractAction() {\r
969 public void actionPerformed(java.awt.event.ActionEvent e) {\r
970 if (selectedRow >= 0) {\r
971 optionsTableModel.removeRow(selectedRow);\r
972 ffc.removeBuildOptionsOpt(selectedRow);\r
973 }\r
974 }\r
975 });\r
976 }\r
977 return jButton11;\r
978 }\r
979\r
980 /**\r
981 * This method initializes jPanel21 \r
982 * \r
983 * @return javax.swing.JPanel \r
984 */\r
985 private JPanel getJPanel21() {\r
986 if (jPanel21 == null) {\r
987 jLabel13 = new JLabel();\r
988 jLabel13.setText("EncapsulationTag");\r
989 jLabel8 = new JLabel();\r
990 jLabel8.setText("EncapsulationType");\r
991 jPanel21 = new JPanel();\r
992 jPanel21.setName("jPanel21");\r
993 jPanel21.add(jLabel8, null);\r
994 jPanel21.add(getJTextField9(), null);\r
995 jPanel21.add(jLabel13, null);\r
996 jPanel21.add(getJTextField10(), null);\r
997 jPanel21.add(getJButton12(), null);\r
998 jPanel21.add(getJButton13(), null);\r
999 jPanel21.add(getJButton16(), null);\r
1000 }\r
1001 return jPanel21;\r
1002 }\r
1003\r
1004 /**\r
1005 * This method initializes jButton12 \r
1006 * \r
1007 * @return javax.swing.JButton \r
1008 */\r
1009 private JButton getJButton12() {\r
1010 if (jButton12 == null) {\r
1011 jButton12 = new JButton();\r
1012 jButton12.setText("Add Sections");\r
1013 jButton12.setPreferredSize(new java.awt.Dimension(109,20));\r
1014 jButton12.addActionListener(new AbstractAction(){\r
1015 public void actionPerformed(ActionEvent arg0){\r
1016 }\r
1017 });\r
1018 }\r
1019 return jButton12;\r
1020 }\r
1021\r
1022 /**\r
1023 * This method initializes jButton13 \r
1024 * \r
1025 * @return javax.swing.JButton \r
1026 */\r
1027 private JButton getJButton13() {\r
1028 if (jButton13 == null) {\r
1029 jButton13 = new JButton();\r
1030 jButton13.setText("Add Section");\r
1031 jButton13.setPreferredSize(new java.awt.Dimension(102,20));\r
1032 jButton13.addActionListener(new AbstractAction(){\r
1033 public void actionPerformed(ActionEvent arg0){\r
1034 CardLayout cl = (CardLayout)jPanel19.getLayout();\r
1035 cl.last(jPanel19);\r
1036 }\r
1037 });\r
1038 }\r
1039 return jButton13;\r
1040 }\r
1041\r
1042 /**\r
1043 * This method initializes jTextField9 \r
1044 * \r
1045 * @return javax.swing.JTextField \r
1046 */\r
1047 private JTextField getJTextField9() {\r
1048 if (jTextField9 == null) {\r
1049 jTextField9 = new JTextField();\r
1050 jTextField9.setPreferredSize(new java.awt.Dimension(250,20));\r
1051 }\r
1052 return jTextField9;\r
1053 }\r
1054\r
1055 /**\r
1056 * This method initializes jTextField10 \r
1057 * \r
1058 * @return javax.swing.JTextField \r
1059 */\r
1060 private JTextField getJTextField10() {\r
1061 if (jTextField10 == null) {\r
1062 jTextField10 = new JTextField();\r
1063 jTextField10.setPreferredSize(new java.awt.Dimension(250,20));\r
1064 }\r
1065 return jTextField10;\r
1066 }\r
1067\r
1068 /**\r
1069 * This method initializes jPanel22 \r
1070 * \r
1071 * @return javax.swing.JPanel \r
1072 */\r
1073 private JPanel getJPanel22() {\r
1074 if (jPanel22 == null) {\r
1075 FlowLayout flowLayout7 = new FlowLayout();\r
1076 flowLayout7.setAlignment(java.awt.FlowLayout.LEFT);\r
1077 jPanel22 = new JPanel();\r
1078 jPanel22.setLayout(flowLayout7);\r
1079 jPanel22.setName("jPanel22");\r
1080 jPanel22.add(getJCheckBox6(), null);\r
1081 jPanel22.add(getJComboBox4(), null);\r
1082 jPanel22.add(getJCheckBox7(), null);\r
1083 jPanel22.add(getJComboBox5(), null);\r
1084 jPanel22.add(getJCheckBox8(), null);\r
1085 jPanel22.add(getJTextField11(), null);\r
1086 jPanel22.add(getJButton14(), null);\r
1087 jPanel22.add(getJButton15(), null);\r
1088 }\r
1089 return jPanel22;\r
1090 }\r
1091\r
1092 /**\r
1093 * This method initializes jCheckBox6 \r
1094 * \r
1095 * @return javax.swing.JCheckBox \r
1096 */\r
1097 private JCheckBox getJCheckBox6() {\r
1098 if (jCheckBox6 == null) {\r
1099 jCheckBox6 = new JCheckBox();\r
1100 jCheckBox6.setText("Section Type");\r
1101 jCheckBox6.setPreferredSize(new java.awt.Dimension(98,20));\r
1102 }\r
1103 return jCheckBox6;\r
1104 }\r
1105\r
1106 /**\r
1107 * This method initializes jComboBox4 \r
1108 * \r
1109 * @return javax.swing.JComboBox \r
1110 */\r
1111 private JComboBox getJComboBox4() {\r
1112 if (jComboBox4 == null) {\r
1113 jComboBox4 = new JComboBox();\r
1114 jComboBox4.setPreferredSize(new java.awt.Dimension(260,20));\r
1115 \r
1116 jComboBox4.addItem("EFI_SECTION_FREEFORM_SUBTYPE_GUID");\r
1117 jComboBox4.addItem("EFI_SECTION_VERSION");\r
1118 jComboBox4.addItem("EFI_SECTION_USER_INTERFACE");\r
1119 jComboBox4.addItem("EFI_SECTION_DXE_DEPEX");\r
1120 jComboBox4.addItem("EFI_SECTION_PEI_DEPEX");\r
1121 jComboBox4.addItem("EFI_SECTION_PE32");\r
1122 jComboBox4.addItem("EFI_SECTION_PIC");\r
1123 jComboBox4.addItem("EFI_SECTION_TE");\r
1124 jComboBox4.addItem("EFI_SECTION_RAW");\r
1125 jComboBox4.addItem("EFI_SECTION_COMPRESSION");\r
1126 jComboBox4.addItem("EFI_SECTION_GUID_DEFINED");\r
1127 jComboBox4.addItem("EFI_SECTION_COMPATIBILITY16");\r
1128 jComboBox4.addItem("EFI_SECTION_FIRMWARE_VOLUME_IMAGE");\r
1129 jComboBox4.setSelectedIndex(0);\r
1130 }\r
1131 return jComboBox4;\r
1132 }\r
1133\r
1134 /**\r
1135 * This method initializes jCheckBox7 \r
1136 * \r
1137 * @return javax.swing.JCheckBox \r
1138 */\r
1139 private JCheckBox getJCheckBox7() {\r
1140 if (jCheckBox7 == null) {\r
1141 jCheckBox7 = new JCheckBox();\r
1142 jCheckBox7.setPreferredSize(new java.awt.Dimension(120,20));\r
1143 jCheckBox7.setText("Compressible");\r
1144 }\r
1145 return jCheckBox7;\r
1146 }\r
1147\r
1148 /**\r
1149 * This method initializes jComboBox5 \r
1150 * \r
1151 * @return javax.swing.JComboBox \r
1152 */\r
1153 private JComboBox getJComboBox5() {\r
1154 if (jComboBox5 == null) {\r
1155 jComboBox5 = new JComboBox();\r
1156 jComboBox5.setPreferredSize(new java.awt.Dimension(80,20));\r
1157 \r
1158 jComboBox5.addItem("false");\r
1159 jComboBox5.addItem("true");\r
1160 jComboBox5.setSelectedIndex(0);\r
1161 }\r
1162 return jComboBox5;\r
1163 }\r
1164\r
1165 /**\r
1166 * This method initializes jCheckBox8 \r
1167 * \r
1168 * @return javax.swing.JCheckBox \r
1169 */\r
1170 private JCheckBox getJCheckBox8() {\r
1171 if (jCheckBox8 == null) {\r
1172 jCheckBox8 = new JCheckBox();\r
1173 jCheckBox8.setText("Binding Order");\r
1174 jCheckBox8.setPreferredSize(new java.awt.Dimension(103,20));\r
1175 }\r
1176 return jCheckBox8;\r
1177 }\r
1178\r
1179 /**\r
1180 * This method initializes jTextField11 \r
1181 * \r
1182 * @return javax.swing.JTextField \r
1183 */\r
1184 private JTextField getJTextField11() {\r
1185 if (jTextField11 == null) {\r
1186 jTextField11 = new JTextField();\r
1187 jTextField11.setPreferredSize(new java.awt.Dimension(150,20));\r
1188 }\r
1189 return jTextField11;\r
1190 }\r
1191\r
1192 /**\r
1193 * This method initializes jButton14 \r
1194 * \r
1195 * @return javax.swing.JButton \r
1196 */\r
1197 private JButton getJButton14() {\r
1198 if (jButton14 == null) {\r
1199 jButton14 = new JButton();\r
1200 jButton14.setText("Add");\r
1201 jButton14.setPreferredSize(new java.awt.Dimension(70,20));\r
1202 jButton14.addActionListener(new AbstractAction(){\r
1203 public void actionPerformed(ActionEvent arg0){\r
1204 }\r
1205 });\r
1206 }\r
1207 return jButton14;\r
1208 }\r
1209\r
1210 /**\r
1211 * This method initializes jButton15 \r
1212 * \r
1213 * @return javax.swing.JButton \r
1214 */\r
1215 private JButton getJButton15() {\r
1216 if (jButton15 == null) {\r
1217 jButton15 = new JButton();\r
1218 jButton15.setPreferredSize(new java.awt.Dimension(70,20));\r
1219 jButton15.setText("Delete");\r
1220 }\r
1221 return jButton15;\r
1222 }\r
1223\r
1224 /**\r
1225 * This method initializes jButton16 \r
1226 * \r
1227 * @return javax.swing.JButton \r
1228 */\r
1229 private JButton getJButton16() {\r
1230 if (jButton16 == null) {\r
1231 jButton16 = new JButton();\r
1232 jButton16.setText("Delete");\r
1233 jButton16.setPreferredSize(new java.awt.Dimension(70,20));\r
1234 }\r
1235 return jButton16;\r
1236 }\r
1237\r
1238 /**\r
1239 * This method initializes jScrollPane7 \r
1240 * \r
1241 * @return javax.swing.JScrollPane \r
1242 */\r
1243 private JScrollPane getJScrollPane7() {\r
1244 if (jScrollPane7 == null) {\r
1245 jScrollPane7 = new JScrollPane();\r
1246 jScrollPane7.setPreferredSize(new java.awt.Dimension(110,200));\r
1247 jScrollPane7.setViewportView(getJTree());\r
1248 }\r
1249 return jScrollPane7;\r
1250 }\r
1251\r
1252 /**\r
1253 * This method initializes jTree \r
1254 * \r
1255 * @return javax.swing.JTree \r
1256 */\r
1257 private JTree getJTree() {\r
1258 if (jTree == null) {\r
1259 jTree = new JTree();\r
1260 }\r
1261 return jTree;\r
1262 }\r
1263\r
1264 /**\r
1265 * This method initializes jButton17 \r
1266 * \r
1267 * @return javax.swing.JButton \r
1268 */\r
1269 private JButton getJButton17() {\r
1270 if (jButton17 == null) {\r
1271 jButton17 = new JButton();\r
1272 jButton17.setPreferredSize(new java.awt.Dimension(70,20));\r
1273 jButton17.setText("Add");\r
1274 jButton17.addActionListener(new AbstractAction() {\r
1275 public void actionPerformed(ActionEvent arg0){\r
1276 Object[] o = {"", ""};\r
1277 ffsAttributesTableModel.addRow(o);\r
1278 }\r
1279 });\r
1280 }\r
1281 return jButton17;\r
1282 }\r
1283\r
1284 /**\r
1285 * This method initializes jButton18 \r
1286 * \r
1287 * @return javax.swing.JButton \r
1288 */\r
1289 private JButton getJButton18() {\r
1290 if (jButton18 == null) {\r
1291 jButton18 = new JButton();\r
1292 jButton18.setPreferredSize(new java.awt.Dimension(70,20));\r
1293 jButton18.setText("Delete");\r
1294 jButton18.addActionListener(new AbstractAction(){\r
1295 public void actionPerformed(ActionEvent arg0){\r
1296 if (jTable4.getSelectedRow() >= 0){\r
1297 ffsAttributesTableModel.removeRow(jTable4.getSelectedRow());\r
1298 }\r
1299 }\r
1300 });\r
1301 }\r
1302 return jButton18;\r
1303 }\r
1304\r
1305 /**\r
1306 * This method initializes jButton19 \r
1307 * \r
1308 * @return javax.swing.JButton \r
1309 */\r
1310 private JButton getJButton19() {\r
1311 if (jButton19 == null) {\r
1312 jButton19 = new JButton();\r
1313 jButton19.setPreferredSize(new java.awt.Dimension(75,20));\r
1314 jButton19.setEnabled(false);\r
1315 jButton19.setText("Update");\r
1316 }\r
1317 return jButton19;\r
1318 }\r
1319\r
1320 /**\r
1321 * This method initializes jCheckBox9 \r
1322 * \r
1323 * @return javax.swing.JCheckBox \r
1324 */\r
1325 private JCheckBox getJCheckBox9() {\r
1326 if (jCheckBox9 == null) {\r
1327 jCheckBox9 = new JCheckBox();\r
1328 jCheckBox9.setPreferredSize(new java.awt.Dimension(50,20));\r
1329 jCheckBox9.setText("IA32");\r
1330 }\r
1331 return jCheckBox9;\r
1332 }\r
1333\r
1334 /**\r
1335 * This method initializes jCheckBox10 \r
1336 * \r
1337 * @return javax.swing.JCheckBox \r
1338 */\r
1339 private JCheckBox getJCheckBox10() {\r
1340 if (jCheckBox10 == null) {\r
1341 jCheckBox10 = new JCheckBox();\r
1342 jCheckBox10.setPreferredSize(new java.awt.Dimension(50,20));\r
1343 jCheckBox10.setText("IPF");\r
1344 }\r
1345 return jCheckBox10;\r
1346 }\r
1347\r
1348 /**\r
1349 * This method initializes jCheckBox11 \r
1350 * \r
1351 * @return javax.swing.JCheckBox \r
1352 */\r
1353 private JCheckBox getJCheckBox11() {\r
1354 if (jCheckBox11 == null) {\r
1355 jCheckBox11 = new JCheckBox();\r
1356 jCheckBox11.setText("X64");\r
1357 jCheckBox11.setPreferredSize(new java.awt.Dimension(47,20));\r
1358 }\r
1359 return jCheckBox11;\r
1360 }\r
1361\r
1362 /**\r
1363 * This method initializes jCheckBox12 \r
1364 * \r
1365 * @return javax.swing.JCheckBox \r
1366 */\r
1367 private JCheckBox getJCheckBox12() {\r
1368 if (jCheckBox12 == null) {\r
1369 jCheckBox12 = new JCheckBox();\r
1370 jCheckBox12.setPreferredSize(new java.awt.Dimension(50,20));\r
1371 jCheckBox12.setText("EBC");\r
1372 }\r
1373 return jCheckBox12;\r
1374 }\r
1375\r
1376 /**\r
1377 * This method initializes jCheckBox13 \r
1378 * \r
1379 * @return javax.swing.JCheckBox \r
1380 */\r
1381 private JCheckBox getJCheckBox13() {\r
1382 if (jCheckBox13 == null) {\r
1383 jCheckBox13 = new JCheckBox();\r
1384 jCheckBox13.setPreferredSize(new java.awt.Dimension(55,20));\r
1385 jCheckBox13.setText("ARM");\r
1386 }\r
1387 return jCheckBox13;\r
1388 }\r
1389\r
1390 /**\r
1391 * This method initializes jCheckBox14 \r
1392 * \r
1393 * @return javax.swing.JCheckBox \r
1394 */\r
1395 private JCheckBox getJCheckBox14() {\r
1396 if (jCheckBox14 == null) {\r
1397 jCheckBox14 = new JCheckBox();\r
1398 jCheckBox14.setPreferredSize(new java.awt.Dimension(50,20));\r
1399 jCheckBox14.setText("PPC");\r
1400 }\r
1401 return jCheckBox14;\r
1402 }\r
1403\r
1404 /**\r
1405 * This method initializes jTextField12 \r
1406 * \r
1407 * @return javax.swing.JTextField \r
1408 */\r
1409 private JTextField getJTextField12() {\r
1410 if (jTextField12 == null) {\r
1411 jTextField12 = new JTextField();\r
1412 jTextField12.setPreferredSize(new java.awt.Dimension(150,20));\r
1413 }\r
1414 return jTextField12;\r
1415 }\r
1416\r
1417 /**\r
1418 * This method initializes jTextField13 \r
1419 * \r
1420 * @return javax.swing.JTextField \r
1421 */\r
1422 private JTextField getJTextField13() {\r
1423 if (jTextField13 == null) {\r
1424 jTextField13 = new JTextField();\r
1425 jTextField13.setPreferredSize(new java.awt.Dimension(140,20));\r
1426 }\r
1427 return jTextField13;\r
1428 }\r
1429\r
1430 /**\r
1431 * @param args\r
1432 */\r
1433 public static void main(String[] args) {\r
1434 // TODO Auto-generated method stub\r
1435 new FpdBuildOptions().setVisible(true);\r
1436 }\r
1437\r
1438 /**\r
1439 * This is the default constructor\r
1440 */\r
1441 public FpdBuildOptions() {\r
1442 super();\r
1443 initialize();\r
1444 this.setVisible(true);\r
1445 }\r
1446 \r
1447 public FpdBuildOptions(PlatformSurfaceAreaDocument.PlatformSurfaceArea fpd) {\r
1448 this();\r
1449 ffc = new FpdFileContents(fpd);\r
1450 init(ffc);\r
1451 }\r
1452\r
1453 private void init(FpdFileContents ffc) {\r
1454 initOptionTable();\r
1455 initAntTaskTable();\r
1456 }\r
1457 \r
1458 private void initOptionTable() {\r
1459 if (ffc.getBuildOptionsOptCount() == 0) {\r
1460 //ToDo get default options from *.txt file\r
1461 return;\r
1462 }\r
1463 String[][] saa = new String[ffc.getBuildOptionsOptCount()][6];\r
1464 ffc.getBuildOptionsOpts(saa);\r
1465 for (int i = 0; i < saa.length; ++i) {\r
1466 optionsTableModel.addRow(saa[i]);\r
1467 }\r
1468 }\r
1469 \r
1470 private void initAntTaskTable() {\r
1471 if (ffc.getBuildOptionsUserDefAntTaskCount() == 0) {\r
1472 return;\r
1473 }\r
1474 String[][] saa = new String[ffc.getBuildOptionsUserDefAntTaskCount()][3];\r
1475 ffc.getBuildOptionsUserDefAntTasks(saa);\r
1476 for (int i = 0; i < saa.length; ++i) {\r
1477 antTaskTableModel.addRow(saa[i]);\r
1478 }\r
1479 }\r
1480 /**\r
1481 * This method initializes this\r
1482 * \r
1483 * @return void\r
1484 */\r
1485 private void initialize() {\r
1486 this.setSize(722, 439);\r
1487 this.setTitle("FPD Build Options");\r
1488 this.setContentPane(getJContentPane());\r
1489 }\r
1490\r
1491 /**\r
1492 * This method initializes jContentPane\r
1493 * \r
1494 * @return javax.swing.JPanel\r
1495 */\r
1496 private JPanel getJContentPane() {\r
1497 if (jContentPane == null) {\r
1498 jContentPane = new JPanel();\r
1499 jContentPane.setLayout(new BorderLayout());\r
1500 jContentPane.add(getJPanel(), java.awt.BorderLayout.SOUTH);\r
1501 jContentPane.add(getJPanel1(), java.awt.BorderLayout.NORTH);\r
1502 jContentPane.add(getJPanel2(), java.awt.BorderLayout.WEST);\r
1503 jContentPane.add(getJPanel3(), java.awt.BorderLayout.EAST);\r
1504 jContentPane.add(getJTabbedPane(), java.awt.BorderLayout.CENTER);\r
1505 }\r
1506 return jContentPane;\r
1507 }\r
1508\r
1509} // @jve:decl-index=0:visual-constraint="10,10"\r