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;
61 //Define class members
63 private JPanel jContentPane
= null;
65 private JLabel jLabelBaseName
= null;
67 private JTextField jTextFieldBaseName
= null;
69 private JLabel jLabelGuid
= null;
71 private JTextField jTextFieldGuid
= null;
73 private JLabel jLabelVersion
= null;
75 private JTextField jTextFieldVersion
= null;
77 private JButton jButtonGenerateGuid
= null;
79 private JLabel jLabelLicense
= null;
81 private JTextArea jTextAreaLicense
= null;
83 private JLabel jLabelCopyright
= null;
85 private JLabel jLabelDescription
= null;
87 private JTextArea jTextAreaDescription
= null;
89 private JLabel jLabelSpecification
= null;
91 private JTextField jTextFieldSpecification
= null;
93 private JButton jButtonOk
= null;
95 private JButton jButtonCancel
= null;
97 private JScrollPane jScrollPaneLicense
= null;
99 private JScrollPane jScrollPaneDescription
= null;
101 private JLabel jLabelAbstract
= null;
103 private JTextField jTextFieldAbstract
= null;
105 private JLabel jLabelModuleType
= null;
107 private JComboBox jComboBoxModuleType
= null;
109 private JLabel jLabelArch
= null;
111 private JLabel jLabelBinaryModule
= null;
113 private JComboBox jComboBoxBinaryModule
= null;
115 private JLabel jLabelOutputFileBasename
= null;
117 private JTextField jTextFieldOutputFileBasename
= null;
119 private JScrollPane jScrollPaneCopyright
= null;
121 private JTextArea jTextAreaCopyright
= null;
123 private JLabel jLabelURL
= null;
125 private JTextField jTextFieldURL
= null;
127 private JScrollPane jScrollPane
= null;
129 private StarLabel jStarLabel1
= null;
131 private StarLabel jStarLabel2
= null;
133 private StarLabel jStarLabel4
= null;
135 private StarLabel jStarLabel5
= null;
137 private StarLabel jStarLabel6
= null;
139 private StarLabel jStarLabel7
= null;
141 private StarLabel jStarLabel8
= null;
143 private StarLabel jStarLabel10
= null;
145 private StarLabel jStarLabel12
= null;
147 private StarLabel jStarLabel13
= null;
149 private StarLabel jStarLabel14
= null;
151 private StarLabel jStarLabel15
= null;
153 private JCheckBox jCheckBoxIa32
= null;
155 private JCheckBox jCheckBoxX64
= null;
157 private JCheckBox jCheckBoxIpf
= null;
159 private JCheckBox jCheckBoxEbc
= null;
161 private JCheckBox jCheckBoxArm
= null;
163 private JCheckBox jCheckBoxPpc
= null;
168 private MsaHeaderDocument
.MsaHeader msaHeader
= null;
170 private ModuleDefinitionsDocument
.ModuleDefinitions md
= null;
172 private ModuleSurfaceAreaDocument
.ModuleSurfaceArea msa
= null;
174 private OpeningModuleType omt
= null;
176 private EnumerationData ed
= new EnumerationData();
179 * This method initializes jCheckBoxIa32
181 * @return javax.swing.JCheckBox
183 private JCheckBox
getJCheckBoxIa32() {
184 if (jCheckBoxIa32
== null) {
185 jCheckBoxIa32
= new JCheckBox();
186 jCheckBoxIa32
.setBounds(new java
.awt
.Rectangle(160, 505, 55, 20));
187 jCheckBoxIa32
.setText("IA32");
188 jCheckBoxIa32
.setToolTipText(DataType
.SUP_ARCH_LIST_HELP_TEXT
);
189 jCheckBoxIa32
.addFocusListener(this);
191 return jCheckBoxIa32
;
195 * This method initializes jCheckBoxX64
197 * @return javax.swing.JCheckBox
199 private JCheckBox
getJCheckBoxX64() {
200 if (jCheckBoxX64
== null) {
201 jCheckBoxX64
= new JCheckBox();
202 jCheckBoxX64
.setBounds(new java
.awt
.Rectangle(215, 505, 53, 20));
203 jCheckBoxX64
.setText("X64");
204 jCheckBoxX64
.setToolTipText(DataType
.SUP_ARCH_LIST_HELP_TEXT
);
205 jCheckBoxX64
.addFocusListener(this);
211 * This method initializes jCheckBoxIpf
213 * @return javax.swing.JCheckBox
215 private JCheckBox
getJCheckBoxIpf() {
216 if (jCheckBoxIpf
== null) {
217 jCheckBoxIpf
= new JCheckBox();
218 jCheckBoxIpf
.setBounds(new java
.awt
.Rectangle(270, 505, 52, 20));
219 jCheckBoxIpf
.setText("IPF");
220 jCheckBoxIpf
.setToolTipText(DataType
.SUP_ARCH_LIST_HELP_TEXT
);
221 jCheckBoxIpf
.addFocusListener(this);
227 * This method initializes jCheckBoxEbc
229 * @return javax.swing.JCheckBox
231 private JCheckBox
getJCheckBoxEbc() {
232 if (jCheckBoxEbc
== null) {
233 jCheckBoxEbc
= new JCheckBox();
234 jCheckBoxEbc
.setBounds(new java
.awt
.Rectangle(325, 505, 53, 20));
235 jCheckBoxEbc
.setText("EBC");
236 jCheckBoxEbc
.setToolTipText(DataType
.SUP_ARCH_LIST_HELP_TEXT
);
237 jCheckBoxEbc
.addFocusListener(this);
243 * This method initializes jCheckBoxArm
245 * @return javax.swing.JCheckBox
247 private JCheckBox
getJCheckBoxArm() {
248 if (jCheckBoxArm
== null) {
249 jCheckBoxArm
= new JCheckBox();
250 jCheckBoxArm
.setBounds(new java
.awt
.Rectangle(380, 505, 54, 20));
251 jCheckBoxArm
.setText("ARM");
252 jCheckBoxArm
.setToolTipText(DataType
.SUP_ARCH_LIST_HELP_TEXT
);
253 jCheckBoxArm
.addFocusListener(this);
259 * This method initializes jCheckBoxPpc
261 * @return javax.swing.JCheckBox
263 private JCheckBox
getJCheckBoxPpc() {
264 if (jCheckBoxPpc
== null) {
265 jCheckBoxPpc
= new JCheckBox();
266 jCheckBoxPpc
.setBounds(new java
.awt
.Rectangle(435, 505, 53, 20));
267 jCheckBoxPpc
.setText("PPC");
268 jCheckBoxPpc
.setToolTipText(DataType
.SUP_ARCH_LIST_HELP_TEXT
);
269 jCheckBoxPpc
.addFocusListener(this);
275 This method initializes jTextFieldBaseName
277 @return javax.swing.JTextField jTextFieldBaseName
280 private JTextField
getJTextFieldBaseName() {
281 if (jTextFieldBaseName
== null) {
282 jTextFieldBaseName
= new JTextField();
283 jTextFieldBaseName
.setBounds(new java
.awt
.Rectangle(160, 10, 320, 20));
284 jTextFieldBaseName
.setPreferredSize(new java
.awt
.Dimension(320, 20));
285 jTextFieldBaseName
.addFocusListener(this);
286 jTextFieldBaseName
.setToolTipText("A brief Identifier, such as USB I/O Library, of the module");
288 return jTextFieldBaseName
;
292 This method initializes jTextFieldGuid
294 @return javax.swing.JTextField jTextFieldGuid
297 private JTextField
getJTextFieldGuid() {
298 if (jTextFieldGuid
== null) {
299 jTextFieldGuid
= new JTextField();
300 jTextFieldGuid
.setPreferredSize(new java
.awt
.Dimension(250, 20));
301 jTextFieldGuid
.setLocation(new java
.awt
.Point(160, 60));
302 jTextFieldGuid
.setSize(new java
.awt
.Dimension(250, 20));
303 jTextFieldGuid
.addFocusListener(this);
304 jTextFieldGuid
.setToolTipText("Guaranteed Unique Identification Number, Registry Format (8-4-4-4-12)");
306 return jTextFieldGuid
;
310 This method initializes jTextFieldVersion
312 @return javax.swing.JTextField jTextFieldVersion
315 private JTextField
getJTextFieldVersion() {
316 if (jTextFieldVersion
== null) {
317 jTextFieldVersion
= new JTextField();
318 jTextFieldVersion
.setPreferredSize(new java
.awt
.Dimension(320, 20));
319 jTextFieldVersion
.setLocation(new java
.awt
.Point(160, 85));
320 jTextFieldVersion
.setSize(new java
.awt
.Dimension(320, 20));
321 jTextFieldVersion
.addFocusListener(this);
322 jTextFieldVersion
.setToolTipText("A Version Number, 1.0, 1, 1.01, 1.0.1");
324 return jTextFieldVersion
;
328 This method initializes jButtonGenerateGuid
330 @return javax.swing.JButton jButtonGenerateGuid
333 private JButton
getJButtonGenerateGuid() {
334 if (jButtonGenerateGuid
== null) {
335 jButtonGenerateGuid
= new JButton();
336 jButtonGenerateGuid
.setPreferredSize(new java
.awt
.Dimension(65, 20));
337 jButtonGenerateGuid
.setSize(new java
.awt
.Dimension(65, 20));
338 jButtonGenerateGuid
.setLocation(new java
.awt
.Point(415, 60));
339 jButtonGenerateGuid
.setText("GEN");
340 jButtonGenerateGuid
.addActionListener(this);
342 return jButtonGenerateGuid
;
346 This method initializes jTextAreaLicense
348 @return javax.swing.JTextArea jTextAreaLicense
351 private JTextArea
getJTextAreaLicense() {
352 if (jTextAreaLicense
== null) {
353 jTextAreaLicense
= new JTextArea();
354 jTextAreaLicense
.setText("");
355 jTextAreaLicense
.setLineWrap(true);
356 jTextAreaLicense
.addFocusListener(this);
357 jTextAreaLicense
.setWrapStyleWord(true);
358 jTextAreaLicense
.setSelectionStart(0);
359 jTextAreaLicense
.setSelectionEnd(0);
360 jTextAreaLicense
.setToolTipText("The License for this Module.");
362 return jTextAreaLicense
;
366 This method initializes jTextAreaDescription
368 @return javax.swing.JTextArea jTextAreaDescription
371 private JTextArea
getJTextAreaDescription() {
372 if (jTextAreaDescription
== null) {
373 jTextAreaDescription
= new JTextArea();
374 jTextAreaDescription
.setLineWrap(true);
375 jTextAreaDescription
.addFocusListener(this);
376 jTextAreaDescription
.setToolTipText("A verbose description of the module");
377 jTextAreaDescription
.setWrapStyleWord(true);
378 jTextAreaDescription
.setSelectionStart(0);
379 jTextAreaDescription
.setSelectionEnd(0);
381 return jTextAreaDescription
;
385 This method initializes jTextFieldSpecification
387 @return javax.swing.JTextField jTextFieldSpecification
390 private JTextField
getJTextFieldSpecification() {
391 if (jTextFieldSpecification
== null) {
392 jTextFieldSpecification
= new JTextField();
393 jTextFieldSpecification
.setPreferredSize(new java
.awt
.Dimension(320, 20));
394 jTextFieldSpecification
.setText("FRAMEWORK_BUILD_PACKAGING_SPECIFICATION 0x00000052");
395 jTextFieldSpecification
.setSize(new java
.awt
.Dimension(320, 20));
396 jTextFieldSpecification
.setLocation(new java
.awt
.Point(160, 530));
397 jTextFieldSpecification
.setEditable(false);
398 jTextFieldSpecification
.addFocusListener(this);
400 return jTextFieldSpecification
;
404 This method initializes jButtonOk
406 @return javax.swing.JButton jButtonOk
409 private JButton
getJButtonOk() {
410 if (jButtonOk
== null) {
411 jButtonOk
= new JButton();
412 jButtonOk
.setText("OK");
413 jButtonOk
.setPreferredSize(new java
.awt
.Dimension(90, 20));
414 jButtonOk
.setBounds(new java
.awt
.Rectangle(390, 455, 90, 20));
415 jButtonOk
.addActionListener(this);
416 jButtonOk
.setVisible(false);
422 This method initializes jButtonCancel
424 @return javax.swing.JButton jButtonCancel
427 private JButton
getJButtonCancel() {
428 if (jButtonCancel
== null) {
429 jButtonCancel
= new JButton();
430 jButtonCancel
.setText("Cancel");
431 jButtonCancel
.setBounds(new java
.awt
.Rectangle(390, 445, 90, 20));
432 jButtonCancel
.addActionListener(this);
433 jButtonCancel
.setPreferredSize(new java
.awt
.Dimension(90, 20));
434 jButtonCancel
.setVisible(false);
436 return jButtonCancel
;
440 This method initializes jScrollPaneLicense
442 @return javax.swing.JScrollPane jScrollPaneLicense
445 private JScrollPane
getJScrollPaneLicense() {
446 if (jScrollPaneLicense
== null) {
447 jScrollPaneLicense
= new JScrollPane();
448 jScrollPaneLicense
.setHorizontalScrollBarPolicy(javax
.swing
.JScrollPane
.HORIZONTAL_SCROLLBAR_NEVER
);
449 jScrollPaneLicense
.setSize(new java
.awt
.Dimension(320, 120));
450 jScrollPaneLicense
.setLocation(new java
.awt
.Point(160, 305));
451 jScrollPaneLicense
.setViewportView(getJTextAreaLicense());
452 jScrollPaneLicense
.setPreferredSize(new java
.awt
.Dimension(320, 120));
454 return jScrollPaneLicense
;
458 This method initializes jScrollPaneDescription
460 @return javax.swing.JScrollPane jScrollPaneDescription
463 private JScrollPane
getJScrollPaneDescription() {
464 if (jScrollPaneDescription
== null) {
465 jScrollPaneDescription
= new JScrollPane();
466 jScrollPaneDescription
.setHorizontalScrollBarPolicy(javax
.swing
.JScrollPane
.HORIZONTAL_SCROLLBAR_NEVER
);
467 jScrollPaneDescription
.setSize(new java
.awt
.Dimension(320, 120));
468 jScrollPaneDescription
.setLocation(new java
.awt
.Point(160, 135));
469 jScrollPaneDescription
.setViewportView(getJTextAreaDescription());
470 jScrollPaneDescription
.setPreferredSize(new java
.awt
.Dimension(320, 120));
472 return jScrollPaneDescription
;
476 This method initializes jTextFieldAbstract
478 @return javax.swing.JTextField jTextFieldAbstract
481 private JTextField
getJTextFieldAbstract() {
482 if (jTextFieldAbstract
== null) {
483 jTextFieldAbstract
= new JTextField();
484 jTextFieldAbstract
.setPreferredSize(new java
.awt
.Dimension(320, 20));
485 jTextFieldAbstract
.setLocation(new java
.awt
.Point(160, 110));
486 jTextFieldAbstract
.setSize(new java
.awt
.Dimension(320, 20));
487 jTextFieldAbstract
.addFocusListener(this);
488 jTextFieldAbstract
.setToolTipText("A one sentence description of this module");
490 return jTextFieldAbstract
;
494 This method initializes jComboBoxModuleType
496 @return javax.swing.JComboBox jComboBoxModuleType
499 private JComboBox
getJComboBoxModuleType() {
500 if (jComboBoxModuleType
== null) {
501 jComboBoxModuleType
= new JComboBox();
502 jComboBoxModuleType
.setBounds(new java
.awt
.Rectangle(160, 35, 320, 20));
503 jComboBoxModuleType
.setPreferredSize(new java
.awt
.Dimension(320, 20));
504 jComboBoxModuleType
.addFocusListener(this);
506 return jComboBoxModuleType
;
510 This method initializes jTextFieldURL
512 @return javax.swing.JTextField
515 private JTextField
getJTextFieldURL() {
516 if (jTextFieldURL
== null) {
517 jTextFieldURL
= new JTextField();
518 jTextFieldURL
.setPreferredSize(new java
.awt
.Dimension(320, 20));
519 jTextFieldURL
.setLocation(new java
.awt
.Point(160, 430));
520 jTextFieldURL
.setSize(new java
.awt
.Dimension(320, 20));
521 jTextFieldURL
.addFocusListener(this);
522 jTextFieldURL
.setToolTipText("A URL for the latest version of the license");
524 return jTextFieldURL
;
528 This method initializes jScrollPane
530 @return javax.swing.JScrollPane
533 private JScrollPane
getJScrollPane() {
534 if (jScrollPane
== null) {
535 jScrollPane
= new JScrollPane();
536 jScrollPane
.setViewportView(getJContentPane());
542 This method initializes jScrollPaneCopyright
544 @return javax.swing.JScrollPane
547 private JScrollPane
getJScrollPaneCopyright() {
548 if (jScrollPaneCopyright
== null) {
549 jScrollPaneCopyright
= new JScrollPane();
550 jScrollPaneCopyright
.setBounds(new java
.awt
.Rectangle(160, 260, 320, 40));
551 jScrollPaneCopyright
.setPreferredSize(new java
.awt
.Dimension(320, 40));
552 jScrollPaneCopyright
.setViewportView(getJTextAreaCopyright());
553 jScrollPaneCopyright
.setSize(new java
.awt
.Dimension(320, 40));
555 return jScrollPaneCopyright
;
559 This method initializes jTextAreaCopyright
561 @return javax.swing.JTextArea
564 private JTextArea
getJTextAreaCopyright() {
565 if (jTextAreaCopyright
== null) {
566 jTextAreaCopyright
= new JTextArea();
567 jTextAreaCopyright
.setLineWrap(true);
568 jTextAreaCopyright
.addFocusListener(this);
569 jTextAreaCopyright
.setWrapStyleWord(true);
570 jTextAreaCopyright
.setSelectionStart(0);
571 jTextAreaCopyright
.setSelectionEnd(0);
572 jTextAreaCopyright
.setBounds(new java
.awt
.Rectangle(0, 0, 320, 40));
573 jTextAreaCopyright
.setToolTipText("One or more copyright lines");
575 return jTextAreaCopyright
;
579 * This method initializes jComboBoxBinaryModule
581 * @return javax.swing.JComboBox
583 private JComboBox
getJComboBoxBinaryModule() {
584 if (jComboBoxBinaryModule
== null) {
585 jComboBoxBinaryModule
= new JComboBox();
586 jComboBoxBinaryModule
.setBounds(new java
.awt
.Rectangle(160, 480, 320, 20));
587 jComboBoxBinaryModule
.setPreferredSize(new java
.awt
.Dimension(320, 20));
588 jComboBoxBinaryModule
.addFocusListener(this);
589 jComboBoxBinaryModule
.setToolTipText("<html>Modules are either source modules <br>"
590 + "which can be compiled or binary <br>"
591 + "modules which are linked. <br>"
592 + "A module cannot contain both. <br>"
593 + "The GUID numbers should be identical <br>"
594 + "for a binary and source MSA, <br>"
595 + "but the BINARY MSA should have <br>"
596 + "a higher version number.</html>");
598 return jComboBoxBinaryModule
;
602 * This method initializes jTextFieldOutputFileBasename
604 * @return javax.swing.JTextField
606 private JTextField
getJTextFieldOutputFileBasename() {
607 if (jTextFieldOutputFileBasename
== null) {
608 jTextFieldOutputFileBasename
= new JTextField();
609 jTextFieldOutputFileBasename
.setBounds(new java
.awt
.Rectangle(160, 455, 320, 20));
610 jTextFieldOutputFileBasename
.setPreferredSize(new java
.awt
.Dimension(320, 20));
611 jTextFieldOutputFileBasename
.addFocusListener(this);
612 jTextFieldOutputFileBasename
.setToolTipText("Enter a single word for generated output file names");
614 return jTextFieldOutputFileBasename
;
618 This is the default constructor
624 this.setVisible(true);
628 This is the override edit constructor
630 @param inMsaHeader The input data of MsaHeaderDocument.MsaHeader
633 public MsaHeader(OpeningModuleType inMsa
) {
636 this.msa
= omt
.getXmlMsa();
639 // Set module definitions default value
641 if (msa
.getModuleDefinitions() == null) {
642 ModuleDefinitionsDocument
.ModuleDefinitions md
= ModuleDefinitionsDocument
.ModuleDefinitions
.Factory
644 md
.setOutputFileBasename(msa
.getMsaHeader().getModuleName());
645 md
.setBinaryModule(false);
646 md
.setSupportedArchitectures(ed
.getVSupportedArchitectures());
647 msa
.setModuleDefinitions(md
);
649 init(msa
.getMsaHeader());
650 init(msa
.getModuleDefinitions());
651 this.setVisible(true);
652 this.setViewMode(false);
656 Disable all components when the mode is view
658 @param isView true - The view mode; false - The non-view mode
661 public void setViewMode(boolean isView
) {
663 this.jTextFieldBaseName
.setEnabled(!isView
);
664 this.jTextFieldGuid
.setEnabled(!isView
);
665 this.jTextFieldVersion
.setEnabled(!isView
);
666 this.jTextAreaLicense
.setEnabled(!isView
);
667 this.jTextAreaCopyright
.setEnabled(!isView
);
668 this.jTextAreaDescription
.setEnabled(!isView
);
669 this.jTextFieldSpecification
.setEnabled(!isView
);
670 this.jTextFieldAbstract
.setEnabled(!isView
);
671 this.jComboBoxModuleType
.setEnabled(!isView
);
672 this.jButtonCancel
.setEnabled(!isView
);
673 this.jButtonGenerateGuid
.setEnabled(!isView
);
674 this.jButtonOk
.setEnabled(!isView
);
679 This method initializes this
682 private void init() {
683 this.setSize(500, 515);
684 this.setPreferredSize(new java
.awt
.Dimension(490, 615));
685 this.setContentPane(getJScrollPane());
686 this.setTitle("Module Surface Area Header");
691 This method initializes this
692 Fill values to all fields if these values are not empty
694 @param inMsaHeader The input data of MsaHeaderDocument.MsaHeader
697 private void init(MsaHeaderDocument
.MsaHeader inMsaHeader
) {
699 if (inMsaHeader
!= null) {
700 setMsaHeader(inMsaHeader
);
701 if (this.msaHeader
.getModuleName() != null) {
702 this.jTextFieldBaseName
.setText(this.msaHeader
.getModuleName());
704 if (this.msaHeader
.getModuleType() != null) {
705 this.jComboBoxModuleType
.setSelectedItem(this.msaHeader
.getModuleType().toString());
707 if (this.msaHeader
.getGuidValue() != null) {
708 this.jTextFieldGuid
.setText(this.msaHeader
.getGuidValue());
710 if (this.msaHeader
.getVersion() != null) {
711 this.jTextFieldVersion
.setText(this.msaHeader
.getVersion());
713 if (this.msaHeader
.getAbstract() != null) {
714 this.jTextFieldAbstract
.setText(this.msaHeader
.getAbstract());
716 if (this.msaHeader
.getDescription() != null) {
717 this.jTextAreaDescription
.setText(this.msaHeader
.getDescription());
718 jTextAreaDescription
.setSelectionStart(0);
719 jTextAreaDescription
.setSelectionEnd(0);
721 if (this.msaHeader
.getCopyright() != null) {
722 this.jTextAreaCopyright
.setText(this.msaHeader
.getCopyright());
724 if (this.msaHeader
.getLicense() != null) {
725 this.jTextAreaLicense
.setText(this.msaHeader
.getLicense().getStringValue());
726 jTextAreaLicense
.setSelectionStart(0);
727 jTextAreaLicense
.setSelectionEnd(0);
729 if (this.msaHeader
.getLicense() != null && this.msaHeader
.getLicense().getURL() != null) {
730 this.jTextFieldURL
.setText(this.msaHeader
.getLicense().getURL());
732 if (this.msaHeader
.getSpecification() != null) {
733 this.jTextFieldSpecification
.setText(this.msaHeader
.getSpecification());
739 This method initializes this
740 Fill values to all fields if these values are not empty
742 @param inMsaHeader The input data of MsaHeaderDocument.MsaHeader
745 private void init(ModuleDefinitionsDocument
.ModuleDefinitions inMd
) {
748 if (md
.getSupportedArchitectures() != null) {
749 this.setSelectedItems(Tools
.convertListToVector(md
.getSupportedArchitectures()));
751 if (md
.getBinaryModule()) {
752 this.jComboBoxBinaryModule
.setSelectedIndex(1);
754 this.jComboBoxBinaryModule
.setSelectedIndex(0);
756 if (md
.getOutputFileBasename() != null) {
757 this.jTextFieldOutputFileBasename
.setText(md
.getOutputFileBasename());
763 This method initializes jContentPane
765 @return javax.swing.JPanel jContentPane
768 private JPanel
getJContentPane() {
769 if (jContentPane
== null) {
771 jLabelURL
= new JLabel();
772 jLabelURL
.setText("License URL");
773 jLabelURL
.setLocation(new java
.awt
.Point(15, 430));
774 jLabelURL
.setSize(new java
.awt
.Dimension(140, 20));
775 jLabelBaseName
= new JLabel();
776 jLabelBaseName
.setText("Module Name");
777 jLabelBaseName
.setBounds(new java
.awt
.Rectangle(15, 10, 140, 20));
778 jLabelModuleType
= new JLabel();
779 jLabelModuleType
.setBounds(new java
.awt
.Rectangle(15, 35, 140, 20));
780 jLabelModuleType
.setText("Module Type");
781 jLabelGuid
= new JLabel();
782 jLabelGuid
.setText("Guid Value");
783 jLabelGuid
.setLocation(new java
.awt
.Point(15, 60));
784 jLabelGuid
.setSize(new java
.awt
.Dimension(140, 20));
785 jLabelVersion
= new JLabel();
786 jLabelVersion
.setText("Version");
787 jLabelVersion
.setLocation(new java
.awt
.Point(15, 85));
788 jLabelVersion
.setSize(new java
.awt
.Dimension(140, 20));
789 jLabelAbstract
= new JLabel();
790 jLabelAbstract
.setText("Abstract");
791 jLabelAbstract
.setLocation(new java
.awt
.Point(15, 110));
792 jLabelAbstract
.setSize(new java
.awt
.Dimension(140, 20));
793 jLabelDescription
= new JLabel();
794 jLabelDescription
.setText("Description");
795 jLabelDescription
.setLocation(new java
.awt
.Point(15, 135));
796 jLabelDescription
.setSize(new java
.awt
.Dimension(140, 20));
797 jLabelCopyright
= new JLabel();
798 jLabelCopyright
.setText("Copyright");
799 jLabelCopyright
.setLocation(new java
.awt
.Point(15, 260));
800 jLabelCopyright
.setSize(new java
.awt
.Dimension(140, 20));
801 jLabelLicense
= new JLabel();
802 jLabelLicense
.setText("License");
803 jLabelLicense
.setLocation(new java
.awt
.Point(15, 305));
804 jLabelLicense
.setSize(new java
.awt
.Dimension(140, 20));
805 jLabelOutputFileBasename
= new JLabel();
806 jLabelOutputFileBasename
.setBounds(new java
.awt
.Rectangle(15, 455, 140, 20));
807 jLabelOutputFileBasename
.setText("Output File Basename");
808 jLabelBinaryModule
= new JLabel();
809 jLabelBinaryModule
.setBounds(new java
.awt
.Rectangle(15, 480, 140, 20));
810 jLabelBinaryModule
.setText("Binary Module");
811 jLabelArch
= new JLabel();
812 jLabelArch
.setBounds(new java
.awt
.Rectangle(15, 505, 140, 20));
813 jLabelArch
.setText("Supported Architectures");
814 jLabelSpecification
= new JLabel();
815 jLabelSpecification
.setText("Specification");
816 jLabelSpecification
.setLocation(new java
.awt
.Point(14, 530));
817 jLabelSpecification
.setSize(new java
.awt
.Dimension(140, 20));
819 jContentPane
= new JPanel();
820 jContentPane
.setLayout(null);
821 jContentPane
.setPreferredSize(new java
.awt
.Dimension(490, 565));
822 jContentPane
.addFocusListener(this);
824 jContentPane
.add(jLabelBaseName
, null);
825 jContentPane
.add(getJTextFieldBaseName(), null);
826 jContentPane
.add(jLabelGuid
, null);
827 jContentPane
.add(getJTextFieldGuid(), null);
828 jContentPane
.add(jLabelVersion
, null);
829 jContentPane
.add(getJTextFieldVersion(), null);
830 jContentPane
.add(getJButtonGenerateGuid(), null);
831 jContentPane
.add(jLabelLicense
, null);
832 jContentPane
.add(jLabelCopyright
, null);
833 jContentPane
.add(jLabelDescription
, null);
834 jContentPane
.add(jLabelSpecification
, null);
835 jContentPane
.add(getJTextFieldSpecification(), null);
836 jContentPane
.add(getJButtonOk(), null);
837 jContentPane
.add(getJButtonCancel(), null);
838 jContentPane
.add(getJScrollPaneLicense(), null);
839 jContentPane
.add(getJScrollPaneDescription(), null);
840 jContentPane
.add(jLabelAbstract
, null);
841 jContentPane
.add(getJTextFieldAbstract(), null);
842 jContentPane
.add(jLabelModuleType
, null);
843 jContentPane
.add(getJComboBoxModuleType(), null);
844 jContentPane
.add(jLabelURL
, null);
845 jContentPane
.add(getJTextFieldURL(), null);
846 jContentPane
.add(jLabelOutputFileBasename
, null);
847 jContentPane
.add(getJTextFieldOutputFileBasename(), null);
848 jContentPane
.add(jLabelBinaryModule
, null);
849 jContentPane
.add(getJComboBoxBinaryModule(), null);
850 jContentPane
.add(jLabelArch
, null);
852 jStarLabel1
= new StarLabel();
853 jStarLabel1
.setLocation(new java
.awt
.Point(0, 10));
854 jStarLabel2
= new StarLabel();
855 jStarLabel2
.setLocation(new java
.awt
.Point(0, 35));
856 jStarLabel4
= new StarLabel();
857 jStarLabel4
.setLocation(new java
.awt
.Point(0, 60));
858 jStarLabel5
= new StarLabel();
859 jStarLabel5
.setLocation(new java
.awt
.Point(0, 85));
860 jStarLabel6
= new StarLabel();
861 jStarLabel6
.setLocation(new java
.awt
.Point(0, 135));
862 jStarLabel7
= new StarLabel();
863 jStarLabel7
.setLocation(new java
.awt
.Point(0, 260));
864 jStarLabel8
= new StarLabel();
865 jStarLabel8
.setLocation(new java
.awt
.Point(0, 305));
866 jStarLabel10
= new StarLabel();
867 jStarLabel10
.setLocation(new java
.awt
.Point(0, 110));
868 jStarLabel12
= new StarLabel();
869 jStarLabel12
.setLocation(new java
.awt
.Point(0, 455));
870 jStarLabel13
= new StarLabel();
871 jStarLabel13
.setLocation(new java
.awt
.Point(0, 480));
872 jStarLabel14
= new StarLabel();
873 jStarLabel14
.setLocation(new java
.awt
.Point(0, 505));
874 jStarLabel15
= new StarLabel();
875 jStarLabel15
.setLocation(new java
.awt
.Point(0, 530));
877 jContentPane
.add(jStarLabel1
, null);
878 jContentPane
.add(jStarLabel2
, null);
879 jContentPane
.add(jStarLabel4
, null);
880 jContentPane
.add(jStarLabel5
, null);
881 jContentPane
.add(jStarLabel6
, null);
882 jContentPane
.add(jStarLabel7
, null);
883 jContentPane
.add(jStarLabel8
, null);
884 jContentPane
.add(jStarLabel10
, null);
885 jContentPane
.add(jStarLabel12
, null);
886 jContentPane
.add(jStarLabel13
, null);
887 jContentPane
.add(jStarLabel14
, null);
888 jContentPane
.add(jStarLabel15
, null);
889 jContentPane
.add(getJScrollPaneCopyright(), null);
891 jContentPane
.add(getJCheckBoxIa32(), null);
892 jContentPane
.add(getJCheckBoxX64(), null);
893 jContentPane
.add(getJCheckBoxIpf(), null);
894 jContentPane
.add(getJCheckBoxEbc(), null);
895 jContentPane
.add(getJCheckBoxArm(), null);
896 jContentPane
.add(getJCheckBoxPpc(), null);
902 * @see java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent)
904 * Override actionPerformed to listen all actions
907 public void actionPerformed(ActionEvent arg0
) {
908 if (arg0
.getSource() == jButtonOk
) {
914 this.setEdited(true);
917 if (arg0
.getSource() == jButtonCancel
) {
918 this.setEdited(false);
920 if (arg0
.getSource() == jButtonGenerateGuid
) {
921 jTextFieldGuid
.setText(Tools
.generateUuidString());
926 Data validation for all fields
928 @retval true - All datas are valid
929 @retval false - At least one data is invalid
932 public boolean check() {
934 // Check if all required fields are not empty
935 // and check if all data fields values are valid
941 if (isEmpty(this.jTextFieldBaseName
.getText())) {
942 Log
.wrn("Update Msa Header", "Base Name couldn't be empty");
943 //this.jTextFieldBaseName.requestFocus();
946 if (!DataValidation
.isBaseName(this.jTextFieldBaseName
.getText())) {
947 Log
.wrn("Update Msa Header", "Incorrect data type for Base Name");
948 //this.jTextFieldBaseName.requestFocus();
955 if (isEmpty(this.jTextFieldGuid
.getText())) {
956 Log
.wrn("Update Msa Header", "Guid Value couldn't be empty");
957 //this.jTextFieldGuid.requestFocus();
960 if (!DataValidation
.isGuid((this.jTextFieldGuid
).getText())) {
961 Log
.wrn("Update Msa Header", "Incorrect data type for Guid");
962 //this.jTextFieldGuid.requestFocus();
969 if (isEmpty(this.jTextFieldVersion
.getText())) {
970 Log
.wrn("Update Msa Header", "Version couldn't be empty");
971 //this.jTextFieldVersion.requestFocus();
974 if (!DataValidation
.isVersion(this.jTextFieldVersion
.getText())) {
975 Log
.wrn("Update Msa Header", "Incorrect data type for Version");
976 //this.jTextFieldVersion.requestFocus();
983 if (isEmpty(this.jTextFieldAbstract
.getText())) {
984 Log
.wrn("Update Msa Header", "Abstract couldn't be empty");
985 //this.jTextFieldAbstract.requestFocus();
988 if (!DataValidation
.isAbstract(this.jTextFieldAbstract
.getText())) {
989 Log
.wrn("Update Msa Header", "Incorrect data type for Abstract");
990 //this.jTextFieldAbstract.requestFocus();
997 if (isEmpty(this.jTextAreaDescription
.getText())) {
998 Log
.wrn("Update Msa Header", "Description couldn't be empty");
999 //this.jTextAreaDescription.requestFocus();
1006 if (isEmpty(this.jTextAreaCopyright
.getText())) {
1007 Log
.wrn("Update Msa Header", "Copyright couldn't be empty");
1008 //this.jTextFieldCopyright.requestFocus();
1015 if (isEmpty(this.jTextAreaLicense
.getText())) {
1016 Log
.wrn("Update Msa Header", "License couldn't be empty");
1017 //this.jTextAreaLicense.requestFocus();
1022 // Check Specification
1024 if (isEmpty(this.jTextFieldSpecification
.getText())) {
1025 Log
.wrn("Update Msa Header", "Specification couldn't be empty");
1026 //this.jTextFieldSpecification.requestFocus();
1029 if (!DataValidation
.isSpecification(this.jTextFieldSpecification
.getText())) {
1030 Log
.wrn("Update Msa Header", "Incorrect data type for Specification");
1031 //this.jTextFieldSpecification.requestFocus();
1039 Save all components of Msa Header
1040 if exists msaHeader, set the value directly
1041 if not exists msaHeader, new an instance first
1044 public void save() {
1046 msaHeader
.setSpecification(this.jTextFieldSpecification
.getText());
1047 msa
.setMsaHeader(msaHeader
);
1048 msa
.setModuleDefinitions(md
);
1049 this.omt
.setSaved(false);
1050 } catch (Exception e
) {
1051 Log
.wrn("Save Module", e
.getMessage());
1052 Log
.err("Save Module", e
.getMessage());
1057 This method initializes Module type and Compontent type
1060 private void initFrame() {
1061 EnumerationData ed
= new EnumerationData();
1062 Tools
.generateComboBoxByVector(jComboBoxModuleType
, ed
.getVModuleType());
1063 Tools
.generateComboBoxByVector(jComboBoxBinaryModule
, ed
.getVBoolean());
1064 this.setSelectedItems(ed
.getVSupportedArchitectures());
1068 Get MsaHeaderDocument.MsaHeader
1070 @return MsaHeaderDocument.MsaHeader
1073 public MsaHeaderDocument
.MsaHeader
getMsaHeader() {
1078 Set MsaHeaderDocument.MsaHeader
1080 @param msaHeader The input data of MsaHeaderDocument.MsaHeader
1083 public void setMsaHeader(MsaHeaderDocument
.MsaHeader msaHeader
) {
1084 this.msaHeader
= msaHeader
;
1088 * @see java.awt.event.ComponentListener#componentResized(java.awt.event.ComponentEvent)
1090 * Override componentResized to resize all components when frame's size is changed
1092 public void componentResized(ComponentEvent arg0
) {
1093 int intCurrentWidth
= this.getJContentPane().getWidth();
1094 int intPreferredWidth
= this.getJContentPane().getPreferredSize().width
;
1096 resizeComponentWidth(this.jTextFieldBaseName
, intCurrentWidth
, intPreferredWidth
);
1097 resizeComponentWidth(this.jTextFieldGuid
, intCurrentWidth
, intPreferredWidth
);
1098 resizeComponentWidth(this.jTextFieldVersion
, intCurrentWidth
, intPreferredWidth
);
1099 resizeComponentWidth(this.jScrollPaneLicense
, intCurrentWidth
, intPreferredWidth
);
1100 resizeComponentWidth(this.jTextFieldURL
, intCurrentWidth
, intPreferredWidth
);
1101 resizeComponentWidth(this.jScrollPaneCopyright
, intCurrentWidth
, intPreferredWidth
);
1102 resizeComponentWidth(this.jScrollPaneDescription
, intCurrentWidth
, intPreferredWidth
);
1103 resizeComponentWidth(this.jTextFieldSpecification
, intCurrentWidth
, intPreferredWidth
);
1104 resizeComponentWidth(this.jTextFieldAbstract
, intCurrentWidth
, intPreferredWidth
);
1105 resizeComponentWidth(this.jComboBoxModuleType
, intCurrentWidth
, intPreferredWidth
);
1106 resizeComponentWidth(this.jComboBoxBinaryModule
, intCurrentWidth
, intPreferredWidth
);
1107 resizeComponentWidth(this.jTextFieldOutputFileBasename
, intCurrentWidth
, intPreferredWidth
);
1109 relocateComponentX(this.jButtonGenerateGuid
, intCurrentWidth
, intPreferredWidth
,
1110 DataType
.SPACE_TO_RIGHT_FOR_GENERATE_BUTTON
);
1113 public void focusLost(FocusEvent arg0
) {
1114 if (this.msaHeader
== null) {
1115 msaHeader
= MsaHeaderDocument
.MsaHeader
.Factory
.newInstance();
1121 if (arg0
.getSource() == this.jTextFieldBaseName
) {
1122 if (isEmpty(this.jTextFieldBaseName
.getText())) {
1123 Log
.wrn("Update Msa Header", "Base Name couldn't be empty");
1124 //this.jTextFieldBaseName.requestFocus();
1127 if (!DataValidation
.isBaseName(this.jTextFieldBaseName
.getText())) {
1128 Log
.wrn("Update Msa Header", "Incorrect data type for Base Name");
1129 //this.jTextFieldBaseName.requestFocus();
1132 if (!this.jTextFieldBaseName
.getText().equals(msaHeader
.getModuleName())) {
1133 this.msaHeader
.setModuleName(this.jTextFieldBaseName
.getText());
1140 // Check Module Type
1142 if (arg0
.getSource() == this.jComboBoxModuleType
) {
1143 if (!jComboBoxModuleType
.getSelectedItem().toString().equals(msaHeader
.getModuleType().toString())) {
1144 msaHeader
.setModuleType(ModuleTypeDef
.Enum
.forString(jComboBoxModuleType
.getSelectedItem().toString()));
1153 if (arg0
.getSource() == this.jTextFieldGuid
) {
1154 if (isEmpty(this.jTextFieldGuid
.getText())) {
1155 Log
.wrn("Update Msa Header", "Guid Value couldn't be empty");
1156 //this.jTextFieldGuid.requestFocus();
1159 if (!DataValidation
.isGuid((this.jTextFieldGuid
).getText())) {
1160 Log
.wrn("Update Msa Header", "Incorrect data type for Guid");
1161 //this.jTextFieldGuid.requestFocus();
1164 if (!this.jTextFieldGuid
.getText().equals(msaHeader
.getGuidValue())) {
1165 this.msaHeader
.setGuidValue(this.jTextFieldGuid
.getText());
1174 if (arg0
.getSource() == this.jTextFieldVersion
) {
1175 if (isEmpty(this.jTextFieldVersion
.getText())) {
1176 Log
.wrn("Update Msa Header", "Version couldn't be empty");
1177 //this.jTextFieldVersion.requestFocus();
1180 if (!DataValidation
.isVersion(this.jTextFieldVersion
.getText())) {
1181 Log
.wrn("Update Msa Header", "Incorrect data type for Version");
1182 //this.jTextFieldVersion.requestFocus();
1185 if (!this.jTextFieldVersion
.getText().equals(msaHeader
.getVersion())) {
1186 this.msaHeader
.setVersion(this.jTextFieldVersion
.getText());
1195 if (arg0
.getSource() == this.jTextFieldAbstract
) {
1196 if (isEmpty(this.jTextFieldAbstract
.getText())) {
1197 Log
.wrn("Update Msa Header", "Abstract couldn't be empty");
1198 //this.jTextFieldAbstract.requestFocus();
1201 if (!DataValidation
.isAbstract(this.jTextFieldAbstract
.getText())) {
1202 Log
.wrn("Update Msa Header", "Incorrect data type for Abstract");
1203 //this.jTextFieldAbstract.requestFocus();
1206 if (!this.jTextFieldAbstract
.getText().equals(msaHeader
.getAbstract())) {
1207 this.msaHeader
.setAbstract(this.jTextFieldAbstract
.getText());
1214 // Check Description
1216 if (arg0
.getSource() == this.jTextAreaDescription
) {
1217 if (isEmpty(this.jTextAreaDescription
.getText())) {
1218 Log
.wrn("Update Msa Header", "Description couldn't be empty");
1219 //this.jTextAreaDescription.requestFocus();
1222 if (!this.jTextAreaDescription
.getText().equals(msaHeader
.getDescription())) {
1223 this.msaHeader
.setDescription(this.jTextAreaDescription
.getText());
1232 if (arg0
.getSource() == this.jTextAreaCopyright
) {
1233 if (isEmpty(this.jTextAreaCopyright
.getText())) {
1234 Log
.wrn("Update Msa Header", "Copyright couldn't be empty");
1235 //this.jTextFieldCopyright.requestFocus();
1238 if (!this.jTextAreaCopyright
.getText().equals(msaHeader
.getCopyright())) {
1239 this.msaHeader
.setCopyright(this.jTextAreaCopyright
.getText());
1248 if (arg0
.getSource() == this.jTextAreaLicense
) {
1249 if (isEmpty(this.jTextAreaLicense
.getText())) {
1250 Log
.wrn("Update Msa Header", "License couldn't be empty");
1251 //this.jTextAreaLicense.requestFocus();
1254 if (this.msaHeader
.getLicense() != null) {
1255 if (!this.jTextAreaLicense
.getText().equals(msaHeader
.getLicense().getStringValue())) {
1256 this.msaHeader
.getLicense().setStringValue(this.jTextAreaLicense
.getText());
1261 License mLicense
= License
.Factory
.newInstance();
1262 mLicense
.setStringValue(this.jTextAreaLicense
.getText());
1263 this.msaHeader
.setLicense(mLicense
);
1268 // Check License URL
1270 if (arg0
.getSource() == this.jTextFieldURL
) {
1271 if (!isEmpty(this.jTextFieldURL
.getText())) {
1272 if (this.msaHeader
.getLicense() == null) {
1273 License mLicense
= License
.Factory
.newInstance();
1274 mLicense
.setURL(this.jTextFieldURL
.getText());
1275 this.msaHeader
.setLicense(mLicense
);
1277 if (!this.jTextFieldURL
.getText().equals(msaHeader
.getLicense().getURL())) {
1278 this.msaHeader
.getLicense().setURL(this.jTextFieldURL
.getText());
1287 // Check Output File Basename
1289 if (arg0
.getSource() == this.jTextFieldOutputFileBasename
) {
1290 if (isEmpty(this.jTextFieldOutputFileBasename
.getText())) {
1291 Log
.wrn("Update Msa Header", "Output File Basename couldn't be empty");
1292 // jTextFieldOutputFileBasename.removeFocusListener(this);
1293 // jTextFieldOutputFileBasename.requestFocus();
1294 // jTextFieldOutputFileBasename.addFocusListener(this);
1297 if (!this.jTextFieldOutputFileBasename
.getText().equals(md
.getOutputFileBasename())) {
1298 this.md
.setOutputFileBasename(this.jTextFieldOutputFileBasename
.getText());
1305 // Check Binary Module Type
1307 if (arg0
.getSource() == this.jComboBoxBinaryModule
) {
1308 if (jComboBoxBinaryModule
.getSelectedItem().toString().equals(DataType
.TRUE
)) {
1309 if (md
.getBinaryModule()) {
1312 md
.setBinaryModule(true);
1314 } else if (jComboBoxBinaryModule
.getSelectedItem().toString().equals(DataType
.FALSE
)) {
1315 if (md
.getBinaryModule()) {
1316 md
.setBinaryModule(false);
1324 // Check Supported Arch
1326 if (arg0
.getSource() == this.jCheckBoxArm
|| arg0
.getSource() == this.jCheckBoxEbc
1327 || arg0
.getSource() == this.jCheckBoxIa32
|| arg0
.getSource() == this.jCheckBoxIpf
1328 || arg0
.getSource() == this.jCheckBoxPpc
|| arg0
.getSource() == this.jCheckBoxX64
) {
1329 if (!this.getSelectedItemsString().equals(md
.getSupportedArchitectures().toString())) {
1330 md
.setSupportedArchitectures(this.getSelectedItemsVector());
1339 private Vector
<String
> getSelectedItemsVector() {
1340 Vector
<String
> v
= new Vector
<String
>();
1341 if (this.jCheckBoxIa32
.isSelected()) {
1342 v
.addElement(jCheckBoxIa32
.getText());
1344 if (this.jCheckBoxX64
.isSelected()) {
1345 v
.addElement(jCheckBoxX64
.getText());
1347 if (this.jCheckBoxIpf
.isSelected()) {
1348 v
.addElement(jCheckBoxIpf
.getText());
1350 if (this.jCheckBoxEbc
.isSelected()) {
1351 v
.addElement(jCheckBoxEbc
.getText());
1353 if (this.jCheckBoxArm
.isSelected()) {
1354 v
.addElement(jCheckBoxArm
.getText());
1356 if (this.jCheckBoxPpc
.isSelected()) {
1357 v
.addElement(jCheckBoxPpc
.getText());
1362 private String
getSelectedItemsString() {
1364 if (this.jCheckBoxIa32
.isSelected()) {
1365 s
= s
+ jCheckBoxIa32
.getText() + " ";
1367 if (this.jCheckBoxX64
.isSelected()) {
1368 s
= s
+ jCheckBoxX64
.getText() + " ";
1370 if (this.jCheckBoxIpf
.isSelected()) {
1371 s
= s
+ jCheckBoxIpf
.getText() + " ";
1373 if (this.jCheckBoxEbc
.isSelected()) {
1374 s
= s
+ jCheckBoxEbc
.getText() + " ";
1376 if (this.jCheckBoxArm
.isSelected()) {
1377 s
= s
+ jCheckBoxArm
.getText() + " ";
1379 if (this.jCheckBoxPpc
.isSelected()) {
1380 s
= s
+ jCheckBoxPpc
.getText() + " ";
1385 private void setAllItemsSelected(boolean isSelected
) {
1386 this.jCheckBoxIa32
.setSelected(isSelected
);
1387 this.jCheckBoxX64
.setSelected(isSelected
);
1388 this.jCheckBoxIpf
.setSelected(isSelected
);
1389 this.jCheckBoxEbc
.setSelected(isSelected
);
1390 this.jCheckBoxArm
.setSelected(isSelected
);
1391 this.jCheckBoxPpc
.setSelected(isSelected
);
1394 private void setSelectedItems(Vector
<String
> v
) {
1395 setAllItemsSelected(false);
1397 for (int index
= 0; index
< v
.size(); index
++) {
1398 if (v
.get(index
).equals(this.jCheckBoxIa32
.getText())) {
1399 this.jCheckBoxIa32
.setSelected(true);
1402 if (v
.get(index
).equals(this.jCheckBoxIpf
.getText())) {
1403 this.jCheckBoxIpf
.setSelected(true);
1406 if (v
.get(index
).equals(this.jCheckBoxX64
.getText())) {
1407 this.jCheckBoxX64
.setSelected(true);
1410 if (v
.get(index
).equals(this.jCheckBoxEbc
.getText())) {
1411 this.jCheckBoxEbc
.setSelected(true);
1414 if (v
.get(index
).equals(this.jCheckBoxArm
.getText())) {
1415 this.jCheckBoxArm
.setSelected(true);
1418 if (v
.get(index
).equals(this.jCheckBoxPpc
.getText())) {
1419 this.jCheckBoxPpc
.setSelected(true);