3 The file is used to create, update MsaHeader of MSA file
5 Copyright (c) 2006, Intel Corporation
6 All rights reserved. This program and the accompanying materials
7 are licensed and made available under the terms and conditions of the BSD License
8 which accompanies this distribution. The full text of the license may be found at
9 http://opensource.org/licenses/bsd-license.php
11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
16 package org
.tianocore
.frameworkwizard
.module
.ui
;
18 import java
.awt
.event
.ActionEvent
;
19 import java
.awt
.event
.ComponentEvent
;
20 import java
.awt
.event
.FocusEvent
;
21 import java
.util
.Vector
;
23 import javax
.swing
.JButton
;
24 import javax
.swing
.JCheckBox
;
25 import javax
.swing
.JComboBox
;
26 import javax
.swing
.JLabel
;
27 import javax
.swing
.JPanel
;
28 import javax
.swing
.JScrollPane
;
29 import javax
.swing
.JTextArea
;
30 import javax
.swing
.JTextField
;
32 import org
.tianocore
.ModuleDefinitionsDocument
;
33 import org
.tianocore
.ModuleSurfaceAreaDocument
;
34 import org
.tianocore
.ModuleTypeDef
;
35 import org
.tianocore
.MsaHeaderDocument
;
36 import org
.tianocore
.LicenseDocument
.License
;
37 import org
.tianocore
.frameworkwizard
.common
.DataType
;
38 import org
.tianocore
.frameworkwizard
.common
.DataValidation
;
39 import org
.tianocore
.frameworkwizard
.common
.EnumerationData
;
40 import org
.tianocore
.frameworkwizard
.common
.Log
;
41 import org
.tianocore
.frameworkwizard
.common
.Tools
;
42 import org
.tianocore
.frameworkwizard
.common
.Identifications
.OpeningModuleType
;
43 import org
.tianocore
.frameworkwizard
.common
.ui
.IInternalFrame
;
44 import org
.tianocore
.frameworkwizard
.common
.ui
.StarLabel
;
47 The class is used to create, update MsaHeader of MSA file
48 It extends IInternalFrame
53 public class MsaHeader
extends IInternalFrame
{
56 /// Define class Serial Version UID
58 private static final long serialVersionUID
= -8152099582923006900L;
60 private int dialogWidth
= 500;
62 private int dialogHeight
= 630;
65 //Define class members
67 private JPanel jContentPane
= null;
69 private JLabel jLabelBaseName
= null;
71 private JTextField jTextFieldBaseName
= null;
73 private JLabel jLabelGuid
= null;
75 private JTextField jTextFieldGuid
= null;
77 private JLabel jLabelVersion
= null;
79 private JTextField jTextFieldVersion
= null;
81 private JButton jButtonGenerateGuid
= null;
83 private JLabel jLabelLicense
= null;
85 private JTextArea jTextAreaLicense
= null;
87 private JLabel jLabelCopyright
= null;
89 private JLabel jLabelDescription
= null;
91 private JTextArea jTextAreaDescription
= null;
93 private JLabel jLabelSpecification
= null;
95 private JTextField jTextFieldSpecification
= null;
97 private JButton jButtonOk
= null;
99 private JButton jButtonCancel
= null;
101 private JScrollPane jScrollPaneLicense
= null;
103 private JScrollPane jScrollPaneDescription
= null;
105 private JLabel jLabelAbstract
= null;
107 private JTextField jTextFieldAbstract
= null;
109 private JLabel jLabelModuleType
= null;
111 private JComboBox jComboBoxModuleType
= null;
113 private JLabel jLabelArch
= null;
115 private JLabel jLabelBinaryModule
= null;
117 private JComboBox jComboBoxBinaryModule
= null;
119 private JLabel jLabelOutputFileBasename
= null;
121 private JTextField jTextFieldOutputFileBasename
= null;
123 private JScrollPane jScrollPaneCopyright
= null;
125 private JTextArea jTextAreaCopyright
= null;
127 private JLabel jLabelURL
= null;
129 private JTextField jTextFieldURL
= null;
131 private JScrollPane jScrollPane
= null;
133 private StarLabel jStarLabel1
= null;
135 private StarLabel jStarLabel2
= null;
137 private StarLabel jStarLabel4
= null;
139 private StarLabel jStarLabel5
= null;
141 private StarLabel jStarLabel6
= null;
143 private StarLabel jStarLabel7
= null;
145 private StarLabel jStarLabel8
= null;
147 private StarLabel jStarLabel10
= null;
149 private StarLabel jStarLabel12
= null;
151 private StarLabel jStarLabel13
= null;
153 private StarLabel jStarLabel14
= null;
155 // private StarLabel jStarLabel15 = null;
157 private JCheckBox jCheckBoxIa32
= null;
159 private JCheckBox jCheckBoxX64
= null;
161 private JCheckBox jCheckBoxIpf
= null;
163 private JCheckBox jCheckBoxEbc
= null;
165 private JCheckBox jCheckBoxArm
= null;
167 private JCheckBox jCheckBoxPpc
= null;
172 private MsaHeaderDocument
.MsaHeader msaHeader
= null;
174 private ModuleDefinitionsDocument
.ModuleDefinitions md
= null;
176 private ModuleSurfaceAreaDocument
.ModuleSurfaceArea msa
= null;
178 private OpeningModuleType omt
= null;
180 private EnumerationData ed
= new EnumerationData();
183 * This method initializes jCheckBoxIa32
185 * @return javax.swing.JCheckBox
187 private JCheckBox
getJCheckBoxIa32() {
188 if (jCheckBoxIa32
== null) {
189 jCheckBoxIa32
= new JCheckBox();
190 jCheckBoxIa32
.setBounds(new java
.awt
.Rectangle(160, 505, 55, 20));
191 jCheckBoxIa32
.setText("IA32");
192 jCheckBoxIa32
.setToolTipText(DataType
.SUP_ARCH_LIST_HELP_TEXT
);
193 jCheckBoxIa32
.addFocusListener(this);
195 return jCheckBoxIa32
;
199 * This method initializes jCheckBoxX64
201 * @return javax.swing.JCheckBox
203 private JCheckBox
getJCheckBoxX64() {
204 if (jCheckBoxX64
== null) {
205 jCheckBoxX64
= new JCheckBox();
206 jCheckBoxX64
.setBounds(new java
.awt
.Rectangle(215, 505, 53, 20));
207 jCheckBoxX64
.setText("X64");
208 jCheckBoxX64
.setToolTipText(DataType
.SUP_ARCH_LIST_HELP_TEXT
);
209 jCheckBoxX64
.addFocusListener(this);
215 * This method initializes jCheckBoxIpf
217 * @return javax.swing.JCheckBox
219 private JCheckBox
getJCheckBoxIpf() {
220 if (jCheckBoxIpf
== null) {
221 jCheckBoxIpf
= new JCheckBox();
222 jCheckBoxIpf
.setBounds(new java
.awt
.Rectangle(270, 505, 52, 20));
223 jCheckBoxIpf
.setText("IPF");
224 jCheckBoxIpf
.setToolTipText(DataType
.SUP_ARCH_LIST_HELP_TEXT
);
225 jCheckBoxIpf
.addFocusListener(this);
231 * This method initializes jCheckBoxEbc
233 * @return javax.swing.JCheckBox
235 private JCheckBox
getJCheckBoxEbc() {
236 if (jCheckBoxEbc
== null) {
237 jCheckBoxEbc
= new JCheckBox();
238 jCheckBoxEbc
.setBounds(new java
.awt
.Rectangle(325, 505, 53, 20));
239 jCheckBoxEbc
.setText("EBC");
240 jCheckBoxEbc
.setToolTipText(DataType
.SUP_ARCH_LIST_HELP_TEXT
);
241 jCheckBoxEbc
.addFocusListener(this);
247 * This method initializes jCheckBoxArm
249 * @return javax.swing.JCheckBox
251 private JCheckBox
getJCheckBoxArm() {
252 if (jCheckBoxArm
== null) {
253 jCheckBoxArm
= new JCheckBox();
254 jCheckBoxArm
.setBounds(new java
.awt
.Rectangle(380, 505, 54, 20));
255 jCheckBoxArm
.setText("ARM");
256 jCheckBoxArm
.setToolTipText(DataType
.SUP_ARCH_LIST_HELP_TEXT
);
257 jCheckBoxArm
.addFocusListener(this);
263 * This method initializes jCheckBoxPpc
265 * @return javax.swing.JCheckBox
267 private JCheckBox
getJCheckBoxPpc() {
268 if (jCheckBoxPpc
== null) {
269 jCheckBoxPpc
= new JCheckBox();
270 jCheckBoxPpc
.setBounds(new java
.awt
.Rectangle(435, 505, 53, 20));
271 jCheckBoxPpc
.setText("PPC");
272 jCheckBoxPpc
.setToolTipText(DataType
.SUP_ARCH_LIST_HELP_TEXT
);
273 jCheckBoxPpc
.addFocusListener(this);
279 This method initializes jTextFieldBaseName
281 @return javax.swing.JTextField jTextFieldBaseName
284 private JTextField
getJTextFieldBaseName() {
285 if (jTextFieldBaseName
== null) {
286 jTextFieldBaseName
= new JTextField();
287 jTextFieldBaseName
.setBounds(new java
.awt
.Rectangle(160, 10, 320, 20));
288 jTextFieldBaseName
.setPreferredSize(new java
.awt
.Dimension(320, 20));
289 jTextFieldBaseName
.addFocusListener(this);
290 jTextFieldBaseName
.setToolTipText("A brief Identifier, such as USB I/O Library, of the module");
292 return jTextFieldBaseName
;
296 This method initializes jTextFieldGuid
298 @return javax.swing.JTextField jTextFieldGuid
301 private JTextField
getJTextFieldGuid() {
302 if (jTextFieldGuid
== null) {
303 jTextFieldGuid
= new JTextField();
304 jTextFieldGuid
.setPreferredSize(new java
.awt
.Dimension(250, 20));
305 jTextFieldGuid
.setLocation(new java
.awt
.Point(160, 60));
306 jTextFieldGuid
.setSize(new java
.awt
.Dimension(250, 20));
307 jTextFieldGuid
.addFocusListener(this);
308 jTextFieldGuid
.setToolTipText("Guaranteed Unique Identification Number, Registry Format (8-4-4-4-12)");
310 return jTextFieldGuid
;
314 This method initializes jTextFieldVersion
316 @return javax.swing.JTextField jTextFieldVersion
319 private JTextField
getJTextFieldVersion() {
320 if (jTextFieldVersion
== null) {
321 jTextFieldVersion
= new JTextField();
322 jTextFieldVersion
.setPreferredSize(new java
.awt
.Dimension(320, 20));
323 jTextFieldVersion
.setLocation(new java
.awt
.Point(160, 85));
324 jTextFieldVersion
.setSize(new java
.awt
.Dimension(320, 20));
325 jTextFieldVersion
.addFocusListener(this);
326 jTextFieldVersion
.setToolTipText("A Version Number, 1.0, 1, 1.01, 1.0.1");
328 return jTextFieldVersion
;
332 This method initializes jButtonGenerateGuid
334 @return javax.swing.JButton jButtonGenerateGuid
337 private JButton
getJButtonGenerateGuid() {
338 if (jButtonGenerateGuid
== null) {
339 jButtonGenerateGuid
= new JButton();
340 jButtonGenerateGuid
.setPreferredSize(new java
.awt
.Dimension(65, 20));
341 jButtonGenerateGuid
.setSize(new java
.awt
.Dimension(65, 20));
342 jButtonGenerateGuid
.setLocation(new java
.awt
.Point(415, 60));
343 jButtonGenerateGuid
.setText("GEN");
344 jButtonGenerateGuid
.addActionListener(this);
346 return jButtonGenerateGuid
;
350 This method initializes jTextAreaLicense
352 @return javax.swing.JTextArea jTextAreaLicense
355 private JTextArea
getJTextAreaLicense() {
356 if (jTextAreaLicense
== null) {
357 jTextAreaLicense
= new JTextArea();
358 jTextAreaLicense
.setText("");
359 jTextAreaLicense
.setLineWrap(true);
360 jTextAreaLicense
.addFocusListener(this);
361 jTextAreaLicense
.setWrapStyleWord(true);
362 jTextAreaLicense
.setSelectionStart(0);
363 jTextAreaLicense
.setSelectionEnd(0);
364 jTextAreaLicense
.setToolTipText("The License for this Module.");
366 return jTextAreaLicense
;
370 This method initializes jTextAreaDescription
372 @return javax.swing.JTextArea jTextAreaDescription
375 private JTextArea
getJTextAreaDescription() {
376 if (jTextAreaDescription
== null) {
377 jTextAreaDescription
= new JTextArea();
378 jTextAreaDescription
.setLineWrap(true);
379 jTextAreaDescription
.addFocusListener(this);
380 jTextAreaDescription
.setToolTipText("A verbose description of the module.");
381 jTextAreaDescription
.setWrapStyleWord(true);
382 jTextAreaDescription
.setSelectionStart(0);
383 jTextAreaDescription
.setSelectionEnd(0);
385 return jTextAreaDescription
;
389 This method initializes jTextFieldSpecification
391 @return javax.swing.JTextField jTextFieldSpecification
394 private JTextField
getJTextFieldSpecification() {
395 if (jTextFieldSpecification
== null) {
396 jTextFieldSpecification
= new JTextField();
398 jTextFieldSpecification
.setPreferredSize(new java
.awt
.Dimension(320, 20));
399 jTextFieldSpecification
.setText("FRAMEWORK_BUILD_PACKAGING_SPECIFICATION 0x00000052");
400 jTextFieldSpecification
.setBorder(null);
403 jTextFieldSpecification
.setSize(new java
.awt
.Dimension(320, 20));
404 jTextFieldSpecification
.setLocation(new java
.awt
.Point(2, dialogHeight
- 30));
405 jTextFieldSpecification
.setEditable(false);
406 jTextFieldSpecification
.addFocusListener(this);
408 return jTextFieldSpecification
;
412 This method initializes jButtonOk
414 @return javax.swing.JButton jButtonOk
417 private JButton
getJButtonOk() {
418 if (jButtonOk
== null) {
419 jButtonOk
= new JButton();
420 jButtonOk
.setText("OK");
421 jButtonOk
.setPreferredSize(new java
.awt
.Dimension(90, 20));
422 jButtonOk
.setBounds(new java
.awt
.Rectangle(390, 455, 90, 20));
423 jButtonOk
.addActionListener(this);
424 jButtonOk
.setVisible(false);
430 This method initializes jButtonCancel
432 @return javax.swing.JButton jButtonCancel
435 private JButton
getJButtonCancel() {
436 if (jButtonCancel
== null) {
437 jButtonCancel
= new JButton();
438 jButtonCancel
.setText("Cancel");
439 jButtonCancel
.setBounds(new java
.awt
.Rectangle(390, 445, 90, 20));
440 jButtonCancel
.addActionListener(this);
441 jButtonCancel
.setPreferredSize(new java
.awt
.Dimension(90, 20));
442 jButtonCancel
.setVisible(false);
444 return jButtonCancel
;
448 This method initializes jScrollPaneLicense
450 @return javax.swing.JScrollPane jScrollPaneLicense
453 private JScrollPane
getJScrollPaneLicense() {
454 if (jScrollPaneLicense
== null) {
455 jScrollPaneLicense
= new JScrollPane();
456 jScrollPaneLicense
.setHorizontalScrollBarPolicy(javax
.swing
.JScrollPane
.HORIZONTAL_SCROLLBAR_NEVER
);
457 jScrollPaneLicense
.setSize(new java
.awt
.Dimension(320, 120));
458 jScrollPaneLicense
.setLocation(new java
.awt
.Point(160, 305));
459 jScrollPaneLicense
.setViewportView(getJTextAreaLicense());
460 jScrollPaneLicense
.setPreferredSize(new java
.awt
.Dimension(320, 120));
462 return jScrollPaneLicense
;
466 This method initializes jScrollPaneDescription
468 @return javax.swing.JScrollPane jScrollPaneDescription
471 private JScrollPane
getJScrollPaneDescription() {
472 if (jScrollPaneDescription
== null) {
473 jScrollPaneDescription
= new JScrollPane();
474 jScrollPaneDescription
.setHorizontalScrollBarPolicy(javax
.swing
.JScrollPane
.HORIZONTAL_SCROLLBAR_NEVER
);
475 jScrollPaneDescription
.setSize(new java
.awt
.Dimension(320, 120));
476 jScrollPaneDescription
.setLocation(new java
.awt
.Point(160, 135));
477 jScrollPaneDescription
.setViewportView(getJTextAreaDescription());
478 jScrollPaneDescription
.setPreferredSize(new java
.awt
.Dimension(320, 120));
480 return jScrollPaneDescription
;
484 This method initializes jTextFieldAbstract
486 @return javax.swing.JTextField jTextFieldAbstract
489 private JTextField
getJTextFieldAbstract() {
490 if (jTextFieldAbstract
== null) {
491 jTextFieldAbstract
= new JTextField();
492 jTextFieldAbstract
.setPreferredSize(new java
.awt
.Dimension(320, 20));
493 jTextFieldAbstract
.setLocation(new java
.awt
.Point(160, 110));
494 jTextFieldAbstract
.setSize(new java
.awt
.Dimension(320, 20));
495 jTextFieldAbstract
.addFocusListener(this);
496 jTextFieldAbstract
.setToolTipText("A one sentence description of this module.");
498 return jTextFieldAbstract
;
502 This method initializes jComboBoxModuleType
504 @return javax.swing.JComboBox jComboBoxModuleType
507 private JComboBox
getJComboBoxModuleType() {
508 if (jComboBoxModuleType
== null) {
509 jComboBoxModuleType
= new JComboBox();
510 jComboBoxModuleType
.setBounds(new java
.awt
.Rectangle(160, 35, 320, 20));
511 jComboBoxModuleType
.setPreferredSize(new java
.awt
.Dimension(320, 20));
512 jComboBoxModuleType
.addFocusListener(this);
514 return jComboBoxModuleType
;
518 This method initializes jTextFieldURL
520 @return javax.swing.JTextField
523 private JTextField
getJTextFieldURL() {
524 if (jTextFieldURL
== null) {
525 jTextFieldURL
= new JTextField();
526 jTextFieldURL
.setPreferredSize(new java
.awt
.Dimension(320, 20));
527 jTextFieldURL
.setLocation(new java
.awt
.Point(160, 430));
528 jTextFieldURL
.setSize(new java
.awt
.Dimension(320, 20));
529 jTextFieldURL
.addFocusListener(this);
530 jTextFieldURL
.setToolTipText("A URL for the latest version of the license.");
532 return jTextFieldURL
;
536 This method initializes jScrollPane
538 @return javax.swing.JScrollPane
541 private JScrollPane
getJScrollPane() {
542 if (jScrollPane
== null) {
543 jScrollPane
= new JScrollPane();
544 jScrollPane
.setViewportView(getJContentPane());
550 This method initializes jScrollPaneCopyright
552 @return javax.swing.JScrollPane
555 private JScrollPane
getJScrollPaneCopyright() {
556 if (jScrollPaneCopyright
== null) {
557 jScrollPaneCopyright
= new JScrollPane();
558 jScrollPaneCopyright
.setBounds(new java
.awt
.Rectangle(160, 260, 320, 40));
559 jScrollPaneCopyright
.setPreferredSize(new java
.awt
.Dimension(320, 40));
560 jScrollPaneCopyright
.setViewportView(getJTextAreaCopyright());
561 jScrollPaneCopyright
.setSize(new java
.awt
.Dimension(320, 40));
563 return jScrollPaneCopyright
;
567 This method initializes jTextAreaCopyright
569 @return javax.swing.JTextArea
572 private JTextArea
getJTextAreaCopyright() {
573 if (jTextAreaCopyright
== null) {
574 jTextAreaCopyright
= new JTextArea();
575 jTextAreaCopyright
.setLineWrap(true);
576 jTextAreaCopyright
.addFocusListener(this);
577 jTextAreaCopyright
.setWrapStyleWord(true);
578 jTextAreaCopyright
.setSelectionStart(0);
579 jTextAreaCopyright
.setSelectionEnd(0);
580 jTextAreaCopyright
.setBounds(new java
.awt
.Rectangle(0, 0, 320, 40));
581 jTextAreaCopyright
.setToolTipText("One or more copyright lines.");
583 return jTextAreaCopyright
;
587 * This method initializes jComboBoxBinaryModule
589 * @return javax.swing.JComboBox
591 private JComboBox
getJComboBoxBinaryModule() {
592 if (jComboBoxBinaryModule
== null) {
593 jComboBoxBinaryModule
= new JComboBox();
594 jComboBoxBinaryModule
.setBounds(new java
.awt
.Rectangle(160, 480, 320, 20));
595 jComboBoxBinaryModule
.setPreferredSize(new java
.awt
.Dimension(320, 20));
596 jComboBoxBinaryModule
.addFocusListener(this);
597 jComboBoxBinaryModule
.setToolTipText("<html>Modules are either source modules <br>"
598 + "which can be compiled or binary <br>"
599 + "modules which are linked. <br>"
600 + "A module cannot contain both. <br>"
601 + "The GUID numbers should be identical <br>"
602 + "for a binary and source MSA, <br>"
603 + "however the BINARY MSA should have <br>"
604 + "a higher version number.</html>");
606 return jComboBoxBinaryModule
;
610 * This method initializes jTextFieldOutputFileBasename
612 * @return javax.swing.JTextField
614 private JTextField
getJTextFieldOutputFileBasename() {
615 if (jTextFieldOutputFileBasename
== null) {
616 jTextFieldOutputFileBasename
= new JTextField();
617 jTextFieldOutputFileBasename
.setBounds(new java
.awt
.Rectangle(160, 455, 320, 20));
618 jTextFieldOutputFileBasename
.setPreferredSize(new java
.awt
.Dimension(320, 20));
619 jTextFieldOutputFileBasename
.addFocusListener(this);
620 jTextFieldOutputFileBasename
.setToolTipText("Enter a single word for generated output file names.");
622 return jTextFieldOutputFileBasename
;
626 This is the default constructor
632 this.setVisible(true);
636 This is the override edit constructor
638 @param inMsaHeader The input data of MsaHeaderDocument.MsaHeader
641 public MsaHeader(OpeningModuleType inMsa
) {
644 this.msa
= omt
.getXmlMsa();
647 // Set module definitions default value
649 if (msa
.getModuleDefinitions() == null) {
650 ModuleDefinitionsDocument
.ModuleDefinitions md
= ModuleDefinitionsDocument
.ModuleDefinitions
.Factory
652 md
.setOutputFileBasename(msa
.getMsaHeader().getModuleName());
653 md
.setBinaryModule(false);
654 md
.setSupportedArchitectures(ed
.getVSupportedArchitectures());
655 msa
.setModuleDefinitions(md
);
657 init(msa
.getMsaHeader());
658 init(msa
.getModuleDefinitions());
659 this.setVisible(true);
660 this.setViewMode(false);
664 Disable all components when the mode is view
666 @param isView true - The view mode; false - The non-view mode
669 public void setViewMode(boolean isView
) {
671 this.jTextFieldBaseName
.setEnabled(!isView
);
672 this.jTextFieldGuid
.setEnabled(!isView
);
673 this.jTextFieldVersion
.setEnabled(!isView
);
674 this.jTextAreaLicense
.setEnabled(!isView
);
675 this.jTextAreaCopyright
.setEnabled(!isView
);
676 this.jTextAreaDescription
.setEnabled(!isView
);
677 this.jTextFieldSpecification
.setEnabled(!isView
);
678 this.jTextFieldAbstract
.setEnabled(!isView
);
679 this.jComboBoxModuleType
.setEnabled(!isView
);
680 this.jButtonCancel
.setEnabled(!isView
);
681 this.jButtonGenerateGuid
.setEnabled(!isView
);
682 this.jButtonOk
.setEnabled(!isView
);
687 This method initializes this
690 private void init() {
691 this.setSize(dialogWidth
, dialogHeight
);
692 this.setPreferredSize(new java
.awt
.Dimension(dialogWidth
, dialogHeight
));
693 this.setContentPane(getJScrollPane());
694 this.setTitle("Module Surface Area Header");
699 This method initializes this
700 Fill values to all fields if these values are not empty
702 @param inMsaHeader The input data of MsaHeaderDocument.MsaHeader
705 private void init(MsaHeaderDocument
.MsaHeader inMsaHeader
) {
707 if (inMsaHeader
!= null) {
708 setMsaHeader(inMsaHeader
);
709 if (this.msaHeader
.getModuleName() != null) {
710 this.jTextFieldBaseName
.setText(this.msaHeader
.getModuleName());
712 if (this.msaHeader
.getModuleType() != null) {
713 this.jComboBoxModuleType
.setSelectedItem(this.msaHeader
.getModuleType().toString());
715 if (this.msaHeader
.getGuidValue() != null) {
716 this.jTextFieldGuid
.setText(this.msaHeader
.getGuidValue());
718 if (this.msaHeader
.getVersion() != null) {
719 this.jTextFieldVersion
.setText(this.msaHeader
.getVersion());
721 if (this.msaHeader
.getAbstract() != null) {
722 this.jTextFieldAbstract
.setText(this.msaHeader
.getAbstract());
724 if (this.msaHeader
.getDescription() != null) {
725 this.jTextAreaDescription
.setText(this.msaHeader
.getDescription());
726 jTextAreaDescription
.setSelectionStart(0);
727 jTextAreaDescription
.setSelectionEnd(0);
729 if (this.msaHeader
.getCopyright() != null) {
730 this.jTextAreaCopyright
.setText(this.msaHeader
.getCopyright());
732 if (this.msaHeader
.getLicense() != null) {
733 this.jTextAreaLicense
.setText(this.msaHeader
.getLicense().getStringValue());
734 jTextAreaLicense
.setSelectionStart(0);
735 jTextAreaLicense
.setSelectionEnd(0);
737 if (this.msaHeader
.getLicense() != null && this.msaHeader
.getLicense().getURL() != null) {
738 this.jTextFieldURL
.setText(this.msaHeader
.getLicense().getURL());
740 if (this.msaHeader
.getSpecification() != null) {
741 this.jTextFieldSpecification
.setText(this.msaHeader
.getSpecification());
747 This method initializes this
748 Fill values to all fields if these values are not empty
750 @param inMsaHeader The input data of MsaHeaderDocument.MsaHeader
753 private void init(ModuleDefinitionsDocument
.ModuleDefinitions inMd
) {
756 if (md
.getSupportedArchitectures() != null) {
757 this.setSelectedItems(Tools
.convertListToVector(md
.getSupportedArchitectures()));
759 if (md
.getBinaryModule()) {
760 this.jComboBoxBinaryModule
.setSelectedIndex(1);
762 this.jComboBoxBinaryModule
.setSelectedIndex(0);
764 if (md
.getOutputFileBasename() != null) {
765 this.jTextFieldOutputFileBasename
.setText(md
.getOutputFileBasename());
771 This method initializes jContentPane
773 @return javax.swing.JPanel jContentPane
776 private JPanel
getJContentPane() {
777 if (jContentPane
== null) {
779 jLabelURL
= new JLabel();
780 jLabelURL
.setText("License URL");
781 jLabelURL
.setLocation(new java
.awt
.Point(15, 430));
782 jLabelURL
.setSize(new java
.awt
.Dimension(140, 20));
783 jLabelBaseName
= new JLabel();
784 jLabelBaseName
.setText("Module Name");
785 jLabelBaseName
.setBounds(new java
.awt
.Rectangle(15, 10, 140, 20));
786 jLabelModuleType
= new JLabel();
787 jLabelModuleType
.setBounds(new java
.awt
.Rectangle(15, 35, 140, 20));
788 jLabelModuleType
.setText("Module Type");
789 jLabelGuid
= new JLabel();
790 jLabelGuid
.setText("Guid Value");
791 jLabelGuid
.setLocation(new java
.awt
.Point(15, 60));
792 jLabelGuid
.setSize(new java
.awt
.Dimension(140, 20));
793 jLabelVersion
= new JLabel();
794 jLabelVersion
.setText("Version");
795 jLabelVersion
.setLocation(new java
.awt
.Point(15, 85));
796 jLabelVersion
.setSize(new java
.awt
.Dimension(140, 20));
797 jLabelAbstract
= new JLabel();
798 jLabelAbstract
.setText("Abstract");
799 jLabelAbstract
.setLocation(new java
.awt
.Point(15, 110));
800 jLabelAbstract
.setSize(new java
.awt
.Dimension(140, 20));
801 jLabelDescription
= new JLabel();
802 jLabelDescription
.setText("Description");
803 jLabelDescription
.setLocation(new java
.awt
.Point(15, 135));
804 jLabelDescription
.setSize(new java
.awt
.Dimension(140, 20));
805 jLabelCopyright
= new JLabel();
806 jLabelCopyright
.setText("Copyright");
807 jLabelCopyright
.setLocation(new java
.awt
.Point(15, 260));
808 jLabelCopyright
.setSize(new java
.awt
.Dimension(140, 20));
809 jLabelLicense
= new JLabel();
810 jLabelLicense
.setText("License");
811 jLabelLicense
.setLocation(new java
.awt
.Point(15, 305));
812 jLabelLicense
.setSize(new java
.awt
.Dimension(140, 20));
813 jLabelOutputFileBasename
= new JLabel();
814 jLabelOutputFileBasename
.setBounds(new java
.awt
.Rectangle(15, 455, 140, 20));
815 jLabelOutputFileBasename
.setText("Output File Basename");
816 jLabelBinaryModule
= new JLabel();
817 jLabelBinaryModule
.setBounds(new java
.awt
.Rectangle(15, 480, 140, 20));
818 jLabelBinaryModule
.setText("Binary Module");
819 jLabelArch
= new JLabel();
820 jLabelArch
.setBounds(new java
.awt
.Rectangle(15, 505, 140, 20));
821 jLabelArch
.setText("Supported Architectures");
822 jLabelSpecification
= new JLabel();
823 jLabelSpecification
.setText("Specification");
824 jLabelSpecification
.setLocation(new java
.awt
.Point(14, 530));
825 jLabelSpecification
.setSize(new java
.awt
.Dimension(140, 20));
827 jContentPane
= new JPanel();
828 jContentPane
.setLayout(null);
829 jContentPane
.setPreferredSize(new java
.awt
.Dimension(dialogWidth
- 10, dialogHeight
- 10));
831 jContentPane
.addFocusListener(this);
833 jContentPane
.add(jLabelBaseName
, null);
834 jContentPane
.add(getJTextFieldBaseName(), null);
835 jContentPane
.add(jLabelGuid
, null);
836 jContentPane
.add(getJTextFieldGuid(), null);
837 jContentPane
.add(jLabelVersion
, null);
838 jContentPane
.add(getJTextFieldVersion(), null);
839 jContentPane
.add(getJButtonGenerateGuid(), null);
840 jContentPane
.add(jLabelLicense
, null);
841 jContentPane
.add(jLabelCopyright
, null);
842 jContentPane
.add(jLabelDescription
, null);
843 // jContentPane.add(jLabelSpecification, null);
844 jContentPane
.add(getJTextFieldSpecification(), null);
845 jContentPane
.add(getJButtonOk(), null);
846 jContentPane
.add(getJButtonCancel(), null);
847 jContentPane
.add(getJScrollPaneLicense(), null);
848 jContentPane
.add(getJScrollPaneDescription(), null);
849 jContentPane
.add(jLabelAbstract
, null);
850 jContentPane
.add(getJTextFieldAbstract(), null);
851 jContentPane
.add(jLabelModuleType
, null);
852 jContentPane
.add(getJComboBoxModuleType(), null);
853 jContentPane
.add(jLabelURL
, null);
854 jContentPane
.add(getJTextFieldURL(), null);
855 jContentPane
.add(jLabelOutputFileBasename
, null);
856 jContentPane
.add(getJTextFieldOutputFileBasename(), null);
857 jContentPane
.add(jLabelBinaryModule
, null);
858 jContentPane
.add(getJComboBoxBinaryModule(), null);
859 jContentPane
.add(jLabelArch
, null);
861 jStarLabel1
= new StarLabel();
862 jStarLabel1
.setLocation(new java
.awt
.Point(0, 10));
863 jStarLabel2
= new StarLabel();
864 jStarLabel2
.setLocation(new java
.awt
.Point(0, 35));
865 jStarLabel4
= new StarLabel();
866 jStarLabel4
.setLocation(new java
.awt
.Point(0, 60));
867 jStarLabel5
= new StarLabel();
868 jStarLabel5
.setLocation(new java
.awt
.Point(0, 85));
869 jStarLabel6
= new StarLabel();
870 jStarLabel6
.setLocation(new java
.awt
.Point(0, 135));
871 jStarLabel7
= new StarLabel();
872 jStarLabel7
.setLocation(new java
.awt
.Point(0, 260));
873 jStarLabel8
= new StarLabel();
874 jStarLabel8
.setLocation(new java
.awt
.Point(0, 305));
875 jStarLabel10
= new StarLabel();
876 jStarLabel10
.setLocation(new java
.awt
.Point(0, 110));
877 jStarLabel12
= new StarLabel();
878 jStarLabel12
.setLocation(new java
.awt
.Point(0, 455));
879 jStarLabel13
= new StarLabel();
880 jStarLabel13
.setLocation(new java
.awt
.Point(0, 480));
881 jStarLabel14
= new StarLabel();
882 jStarLabel14
.setLocation(new java
.awt
.Point(0, 505));
883 // jStarLabel15 = new StarLabel();
884 // jStarLabel15.setLocation(new java.awt.Point(0, 530));
886 jContentPane
.add(jStarLabel1
, null);
887 jContentPane
.add(jStarLabel2
, null);
888 jContentPane
.add(jStarLabel4
, null);
889 jContentPane
.add(jStarLabel5
, null);
890 jContentPane
.add(jStarLabel6
, null);
891 jContentPane
.add(jStarLabel7
, null);
892 jContentPane
.add(jStarLabel8
, null);
893 jContentPane
.add(jStarLabel10
, null);
894 jContentPane
.add(jStarLabel12
, null);
895 jContentPane
.add(jStarLabel13
, null);
896 jContentPane
.add(jStarLabel14
, null);
897 // jContentPane.add(jStarLabel15, null);
898 jContentPane
.add(getJScrollPaneCopyright(), null);
900 jContentPane
.add(getJCheckBoxIa32(), null);
901 jContentPane
.add(getJCheckBoxX64(), null);
902 jContentPane
.add(getJCheckBoxIpf(), null);
903 jContentPane
.add(getJCheckBoxEbc(), null);
904 jContentPane
.add(getJCheckBoxArm(), null);
905 jContentPane
.add(getJCheckBoxPpc(), null);
911 * @see java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent)
913 * Override actionPerformed to listen all actions
916 public void actionPerformed(ActionEvent arg0
) {
917 if (arg0
.getSource() == jButtonOk
) {
923 this.setEdited(true);
926 if (arg0
.getSource() == jButtonCancel
) {
927 this.setEdited(false);
929 if (arg0
.getSource() == jButtonGenerateGuid
) {
930 jTextFieldGuid
.setText(Tools
.generateUuidString());
935 Data validation for all fields
937 @retval true - All datas are valid
938 @retval false - At least one data is invalid
941 public boolean check() {
943 // Check if all required fields are not empty
944 // and check if all data fields values are valid
950 if (isEmpty(this.jTextFieldBaseName
.getText())) {
951 Log
.wrn("Update Msa Header", "Name must be entered!");
952 //this.jTextFieldBaseName.requestFocus();
955 if (!DataValidation
.isBaseName(this.jTextFieldBaseName
.getText())) {
956 Log
.wrn("Update Msa Header", "Incorrect data type for Name, it must start with an alpha character!");
957 //this.jTextFieldBaseName.requestFocus();
964 if (isEmpty(this.jTextFieldGuid
.getText())) {
965 Log
.wrn("Update Msa Header", "The Guid Value must be entered!");
966 //this.jTextFieldGuid.requestFocus();
969 if (!DataValidation
.isGuid((this.jTextFieldGuid
).getText())) {
970 Log
.wrn("Update Msa Header", "Incorrect data type for Guid, it must be registry format, 8-4-4-4-12");
971 //this.jTextFieldGuid.requestFocus();
978 if (isEmpty(this.jTextFieldVersion
.getText())) {
979 Log
.wrn("Update Msa Header", "Version must be entered!");
980 //this.jTextFieldVersion.requestFocus();
983 if (!DataValidation
.isVersion(this.jTextFieldVersion
.getText())) {
984 Log
.wrn("Update Msa Header", "Incorrect data type for Version, it must start with a digit.");
985 //this.jTextFieldVersion.requestFocus();
992 if (isEmpty(this.jTextFieldAbstract
.getText())) {
993 Log
.wrn("Update Msa Header", "Abstract must be entered!");
994 //this.jTextFieldAbstract.requestFocus();
997 if (!DataValidation
.isAbstract(this.jTextFieldAbstract
.getText())) {
998 Log
.wrn("Update Msa Header", "Incorrect data type for Abstract, is should be a sentence describing the module.");
999 //this.jTextFieldAbstract.requestFocus();
1004 // Check Description
1006 if (isEmpty(this.jTextAreaDescription
.getText())) {
1007 Log
.wrn("Update Msa Header", "Description must be entered!");
1008 //this.jTextAreaDescription.requestFocus();
1015 if (isEmpty(this.jTextAreaCopyright
.getText())) {
1016 Log
.wrn("Update Msa Header", "Copyright must be entered!");
1017 //this.jTextFieldCopyright.requestFocus();
1024 if (isEmpty(this.jTextAreaLicense
.getText())) {
1025 Log
.wrn("Update Msa Header", "License must be entered!");
1026 //this.jTextAreaLicense.requestFocus();
1031 // Check Specification
1033 if (isEmpty(this.jTextFieldSpecification
.getText())) {
1034 Log
.wrn("Update Msa Header", "Specification must exist.");
1035 //this.jTextFieldSpecification.requestFocus();
1038 if (!DataValidation
.isSpecification(this.jTextFieldSpecification
.getText())) {
1039 // TODO Add code to check the specification number.
1040 // Future releases of Schema may require that we process these files
1042 Log
.wrn("Update Msa Header", "Incorrect data type for Specification");
1043 //this.jTextFieldSpecification.requestFocus();
1051 Save all components of Msa Header
1052 if exists msaHeader, set the value directly
1053 if not exists msaHeader, new an instance first
1056 public void save() {
1058 msaHeader
.setSpecification(this.jTextFieldSpecification
.getText());
1059 msa
.setMsaHeader(msaHeader
);
1060 msa
.setModuleDefinitions(md
);
1061 this.omt
.setSaved(false);
1062 } catch (Exception e
) {
1063 Log
.wrn("Save Module", e
.getMessage());
1064 Log
.err("Save Module", e
.getMessage());
1069 This method initializes Module type and Compontent type
1072 private void initFrame() {
1073 EnumerationData ed
= new EnumerationData();
1074 Tools
.generateComboBoxByVector(jComboBoxModuleType
, ed
.getVModuleType());
1075 Tools
.generateComboBoxByVector(jComboBoxBinaryModule
, ed
.getVBoolean());
1076 this.setSelectedItems(ed
.getVSupportedArchitectures());
1080 Get MsaHeaderDocument.MsaHeader
1082 @return MsaHeaderDocument.MsaHeader
1085 public MsaHeaderDocument
.MsaHeader
getMsaHeader() {
1090 Set MsaHeaderDocument.MsaHeader
1092 @param msaHeader The input data of MsaHeaderDocument.MsaHeader
1095 public void setMsaHeader(MsaHeaderDocument
.MsaHeader msaHeader
) {
1096 this.msaHeader
= msaHeader
;
1100 * @see java.awt.event.ComponentListener#componentResized(java.awt.event.ComponentEvent)
1102 * Override componentResized to resize all components when frame's size is changed
1104 public void componentResized(ComponentEvent arg0
) {
1105 int intCurrentWidth
= this.getJContentPane().getWidth();
1106 int intPreferredWidth
= this.getJContentPane().getPreferredSize().width
;
1108 Tools
.resizeComponentWidth(this.jTextFieldBaseName
, intCurrentWidth
, intPreferredWidth
);
1109 Tools
.resizeComponentWidth(this.jTextFieldGuid
, intCurrentWidth
, intPreferredWidth
);
1110 Tools
.resizeComponentWidth(this.jTextFieldVersion
, intCurrentWidth
, intPreferredWidth
);
1111 Tools
.resizeComponentWidth(this.jScrollPaneLicense
, intCurrentWidth
, intPreferredWidth
);
1112 Tools
.resizeComponentWidth(this.jTextFieldURL
, intCurrentWidth
, intPreferredWidth
);
1113 Tools
.resizeComponentWidth(this.jScrollPaneCopyright
, intCurrentWidth
, intPreferredWidth
);
1114 Tools
.resizeComponentWidth(this.jScrollPaneDescription
, intCurrentWidth
, intPreferredWidth
);
1115 Tools
.resizeComponentWidth(this.jTextFieldSpecification
, intCurrentWidth
, intPreferredWidth
);
1116 Tools
.resizeComponentWidth(this.jTextFieldAbstract
, intCurrentWidth
, intPreferredWidth
);
1117 Tools
.resizeComponentWidth(this.jComboBoxModuleType
, intCurrentWidth
, intPreferredWidth
);
1118 Tools
.resizeComponentWidth(this.jComboBoxBinaryModule
, intCurrentWidth
, intPreferredWidth
);
1119 Tools
.resizeComponentWidth(this.jTextFieldOutputFileBasename
, intCurrentWidth
, intPreferredWidth
);
1121 Tools
.relocateComponentX(this.jButtonGenerateGuid
, intCurrentWidth
, intPreferredWidth
,
1122 DataType
.SPACE_TO_RIGHT_FOR_GENERATE_BUTTON
);
1125 public void focusLost(FocusEvent arg0
) {
1126 if (this.msaHeader
== null) {
1127 msaHeader
= MsaHeaderDocument
.MsaHeader
.Factory
.newInstance();
1133 if (arg0
.getSource() == this.jTextFieldBaseName
) {
1134 if (isEmpty(this.jTextFieldBaseName
.getText())) {
1135 Log
.wrn("Update Msa Header", "The Name must be entered!");
1136 //this.jTextFieldBaseName.requestFocus();
1139 if (!DataValidation
.isBaseName(this.jTextFieldBaseName
.getText())) {
1140 Log
.wrn("Update Msa Header", "Incorrect data type for Name, it must begin with an alpha character.");
1141 //this.jTextFieldBaseName.requestFocus();
1144 if (!this.jTextFieldBaseName
.getText().equals(msaHeader
.getModuleName())) {
1145 this.msaHeader
.setModuleName(this.jTextFieldBaseName
.getText());
1152 // Check Module Type
1154 if (arg0
.getSource() == this.jComboBoxModuleType
) {
1155 if (!jComboBoxModuleType
.getSelectedItem().toString().equals(msaHeader
.getModuleType().toString())) {
1156 msaHeader
.setModuleType(ModuleTypeDef
.Enum
.forString(jComboBoxModuleType
.getSelectedItem().toString()));
1165 if (arg0
.getSource() == this.jTextFieldGuid
) {
1166 if (isEmpty(this.jTextFieldGuid
.getText())) {
1167 Log
.wrn("Update Msa Header", "Guid must be entered!");
1168 //this.jTextFieldGuid.requestFocus();
1171 if (!DataValidation
.isGuid((this.jTextFieldGuid
).getText())) {
1172 Log
.wrn("Update Msa Header", "Incorrect data type for Guid, it must be registry format. (8-4-4-4-12)");
1173 //this.jTextFieldGuid.requestFocus();
1176 if (!this.jTextFieldGuid
.getText().equals(msaHeader
.getGuidValue())) {
1177 this.msaHeader
.setGuidValue(this.jTextFieldGuid
.getText());
1186 if (arg0
.getSource() == this.jTextFieldVersion
) {
1187 if (isEmpty(this.jTextFieldVersion
.getText())) {
1188 Log
.wrn("Update Msa Header", "Version must be entered!");
1189 //this.jTextFieldVersion.requestFocus();
1192 if (!DataValidation
.isVersion(this.jTextFieldVersion
.getText())) {
1193 Log
.wrn("Update Msa Header", "Incorrect data type for Version, it must start with a digit.");
1194 //this.jTextFieldVersion.requestFocus();
1197 if (!this.jTextFieldVersion
.getText().equals(msaHeader
.getVersion())) {
1198 this.msaHeader
.setVersion(this.jTextFieldVersion
.getText());
1207 if (arg0
.getSource() == this.jTextFieldAbstract
) {
1208 if (isEmpty(this.jTextFieldAbstract
.getText())) {
1209 Log
.wrn("Update Msa Header", "Abstract must be entered!");
1210 //this.jTextFieldAbstract.requestFocus();
1213 if (!DataValidation
.isAbstract(this.jTextFieldAbstract
.getText())) {
1214 Log
.wrn("Update Msa Header", "Incorrect data type for Abstract, it must be sentence.");
1215 //this.jTextFieldAbstract.requestFocus();
1218 if (!this.jTextFieldAbstract
.getText().equals(msaHeader
.getAbstract())) {
1219 this.msaHeader
.setAbstract(this.jTextFieldAbstract
.getText());
1226 // Check Description
1228 if (arg0
.getSource() == this.jTextAreaDescription
) {
1229 if (isEmpty(this.jTextAreaDescription
.getText())) {
1230 Log
.wrn("Update Msa Header", "Description must be entered!");
1231 //this.jTextAreaDescription.requestFocus();
1234 if (!this.jTextAreaDescription
.getText().equals(msaHeader
.getDescription())) {
1235 this.msaHeader
.setDescription(this.jTextAreaDescription
.getText());
1244 if (arg0
.getSource() == this.jTextAreaCopyright
) {
1245 if (isEmpty(this.jTextAreaCopyright
.getText())) {
1246 Log
.wrn("Update Msa Header", "Copyright must be entered!");
1247 //this.jTextFieldCopyright.requestFocus();
1250 if (!this.jTextAreaCopyright
.getText().equals(msaHeader
.getCopyright())) {
1251 this.msaHeader
.setCopyright(this.jTextAreaCopyright
.getText());
1260 if (arg0
.getSource() == this.jTextAreaLicense
) {
1261 if (isEmpty(this.jTextAreaLicense
.getText())) {
1262 Log
.wrn("Update Msa Header", "License must be entered!");
1263 //this.jTextAreaLicense.requestFocus();
1266 if (this.msaHeader
.getLicense() != null) {
1267 if (!this.jTextAreaLicense
.getText().equals(msaHeader
.getLicense().getStringValue())) {
1268 this.msaHeader
.getLicense().setStringValue(this.jTextAreaLicense
.getText());
1273 License mLicense
= License
.Factory
.newInstance();
1274 mLicense
.setStringValue(this.jTextAreaLicense
.getText());
1275 this.msaHeader
.setLicense(mLicense
);
1280 // Check License URL
1282 if (arg0
.getSource() == this.jTextFieldURL
) {
1283 if (!isEmpty(this.jTextFieldURL
.getText())) {
1284 if (this.msaHeader
.getLicense() == null) {
1285 License mLicense
= License
.Factory
.newInstance();
1286 mLicense
.setURL(this.jTextFieldURL
.getText());
1287 this.msaHeader
.setLicense(mLicense
);
1289 if (!this.jTextFieldURL
.getText().equals(msaHeader
.getLicense().getURL())) {
1290 this.msaHeader
.getLicense().setURL(this.jTextFieldURL
.getText());
1299 // Check Output File Basename
1301 if (arg0
.getSource() == this.jTextFieldOutputFileBasename
) {
1302 if (isEmpty(this.jTextFieldOutputFileBasename
.getText())) {
1303 Log
.wrn("Update Msa Header", "Output File Basename must be entered!");
1304 // jTextFieldOutputFileBasename.removeFocusListener(this);
1305 // jTextFieldOutputFileBasename.requestFocus();
1306 // jTextFieldOutputFileBasename.addFocusListener(this);
1309 if (!this.jTextFieldOutputFileBasename
.getText().equals(md
.getOutputFileBasename())) {
1310 this.md
.setOutputFileBasename(this.jTextFieldOutputFileBasename
.getText());
1317 // Check Binary Module Type
1319 if (arg0
.getSource() == this.jComboBoxBinaryModule
) {
1320 if (jComboBoxBinaryModule
.getSelectedItem().toString().equals(DataType
.TRUE
)) {
1321 if (md
.getBinaryModule()) {
1324 md
.setBinaryModule(true);
1326 } else if (jComboBoxBinaryModule
.getSelectedItem().toString().equals(DataType
.FALSE
)) {
1327 if (md
.getBinaryModule()) {
1328 md
.setBinaryModule(false);
1336 // Check Supported Arch
1338 if (arg0
.getSource() == this.jCheckBoxArm
|| arg0
.getSource() == this.jCheckBoxEbc
1339 || arg0
.getSource() == this.jCheckBoxIa32
|| arg0
.getSource() == this.jCheckBoxIpf
1340 || arg0
.getSource() == this.jCheckBoxPpc
|| arg0
.getSource() == this.jCheckBoxX64
) {
1341 if (!this.getSelectedItemsString().equals(md
.getSupportedArchitectures().toString())) {
1342 md
.setSupportedArchitectures(this.getSelectedItemsVector());
1351 private Vector
<String
> getSelectedItemsVector() {
1352 Vector
<String
> v
= new Vector
<String
>();
1353 if (this.jCheckBoxIa32
.isSelected()) {
1354 v
.addElement(jCheckBoxIa32
.getText());
1356 if (this.jCheckBoxX64
.isSelected()) {
1357 v
.addElement(jCheckBoxX64
.getText());
1359 if (this.jCheckBoxIpf
.isSelected()) {
1360 v
.addElement(jCheckBoxIpf
.getText());
1362 if (this.jCheckBoxEbc
.isSelected()) {
1363 v
.addElement(jCheckBoxEbc
.getText());
1365 if (this.jCheckBoxArm
.isSelected()) {
1366 v
.addElement(jCheckBoxArm
.getText());
1368 if (this.jCheckBoxPpc
.isSelected()) {
1369 v
.addElement(jCheckBoxPpc
.getText());
1374 private String
getSelectedItemsString() {
1376 if (this.jCheckBoxIa32
.isSelected()) {
1377 s
= s
+ jCheckBoxIa32
.getText() + " ";
1379 if (this.jCheckBoxX64
.isSelected()) {
1380 s
= s
+ jCheckBoxX64
.getText() + " ";
1382 if (this.jCheckBoxIpf
.isSelected()) {
1383 s
= s
+ jCheckBoxIpf
.getText() + " ";
1385 if (this.jCheckBoxEbc
.isSelected()) {
1386 s
= s
+ jCheckBoxEbc
.getText() + " ";
1388 if (this.jCheckBoxArm
.isSelected()) {
1389 s
= s
+ jCheckBoxArm
.getText() + " ";
1391 if (this.jCheckBoxPpc
.isSelected()) {
1392 s
= s
+ jCheckBoxPpc
.getText() + " ";
1397 private void setAllItemsSelected(boolean isSelected
) {
1398 this.jCheckBoxIa32
.setSelected(isSelected
);
1399 this.jCheckBoxX64
.setSelected(isSelected
);
1400 this.jCheckBoxIpf
.setSelected(isSelected
);
1401 this.jCheckBoxEbc
.setSelected(isSelected
);
1402 this.jCheckBoxArm
.setSelected(isSelected
);
1403 this.jCheckBoxPpc
.setSelected(isSelected
);
1406 private void setSelectedItems(Vector
<String
> v
) {
1407 setAllItemsSelected(false);
1409 for (int index
= 0; index
< v
.size(); index
++) {
1410 if (v
.get(index
).equals(this.jCheckBoxIa32
.getText())) {
1411 this.jCheckBoxIa32
.setSelected(true);
1414 if (v
.get(index
).equals(this.jCheckBoxIpf
.getText())) {
1415 this.jCheckBoxIpf
.setSelected(true);
1418 if (v
.get(index
).equals(this.jCheckBoxX64
.getText())) {
1419 this.jCheckBoxX64
.setSelected(true);
1422 if (v
.get(index
).equals(this.jCheckBoxEbc
.getText())) {
1423 this.jCheckBoxEbc
.setSelected(true);
1426 if (v
.get(index
).equals(this.jCheckBoxArm
.getText())) {
1427 this.jCheckBoxArm
.setSelected(true);
1430 if (v
.get(index
).equals(this.jCheckBoxPpc
.getText())) {
1431 this.jCheckBoxPpc
.setSelected(true);