jCheckBoxIa32.setBounds(new java.awt.Rectangle(valueCol, 505, 55, 20));\r
jCheckBoxIa32.setText("IA32");\r
jCheckBoxIa32.setToolTipText(DataType.SUP_ARCH_LIST_HELP_TEXT);\r
- jCheckBoxIa32.addFocusListener(this);\r
}\r
return jCheckBoxIa32;\r
}\r
jCheckBoxX64.setBounds(new java.awt.Rectangle(valueCol + 55, 505, 53, 20));\r
jCheckBoxX64.setText("X64");\r
jCheckBoxX64.setToolTipText(DataType.SUP_ARCH_LIST_HELP_TEXT);\r
- jCheckBoxX64.addFocusListener(this);\r
}\r
return jCheckBoxX64;\r
}\r
jCheckBoxIpf.setBounds(new java.awt.Rectangle(valueCol + 110, 505, 52, 20));\r
jCheckBoxIpf.setText("IPF");\r
jCheckBoxIpf.setToolTipText(DataType.SUP_ARCH_LIST_HELP_TEXT);\r
- jCheckBoxIpf.addFocusListener(this);\r
}\r
return jCheckBoxIpf;\r
}\r
jCheckBoxEbc.setBounds(new java.awt.Rectangle(valueCol + 165, 505, 53, 20));\r
jCheckBoxEbc.setText("EBC");\r
jCheckBoxEbc.setToolTipText(DataType.SUP_ARCH_LIST_HELP_TEXT);\r
- jCheckBoxEbc.addFocusListener(this);\r
}\r
return jCheckBoxEbc;\r
}\r
jCheckBoxArm.setBounds(new java.awt.Rectangle(valueCol + 220, 505, 54, 20));\r
jCheckBoxArm.setText("ARM");\r
jCheckBoxArm.setToolTipText(DataType.SUP_ARCH_LIST_HELP_TEXT);\r
- jCheckBoxArm.addFocusListener(this);\r
}\r
return jCheckBoxArm;\r
}\r
jCheckBoxPpc.setBounds(new java.awt.Rectangle(valueCol + 285, 505, 53, 20));\r
jCheckBoxPpc.setText("PPC");\r
jCheckBoxPpc.setToolTipText(DataType.SUP_ARCH_LIST_HELP_TEXT);\r
- jCheckBoxPpc.addFocusListener(this);\r
}\r
return jCheckBoxPpc;\r
}\r
jComboBoxModuleType = new JComboBox();\r
jComboBoxModuleType.setBounds(new java.awt.Rectangle(valueCol, 35, valueWidth, 20));\r
jComboBoxModuleType.setPreferredSize(new java.awt.Dimension(valueWidth, 20));\r
- jComboBoxModuleType.addFocusListener(this);\r
}\r
return jComboBoxModuleType;\r
}\r
jComboBoxPcdIsDriver = new JTextField();\r
jComboBoxPcdIsDriver.setPreferredSize(new java.awt.Dimension(valueWidth, 20));\r
jComboBoxPcdIsDriver.setBounds(new java.awt.Rectangle(valueCol, 530, valueWidth, 20));\r
- //jComboBoxPcdIsDriver.addItemListener(this);\r
- jComboBoxPcdIsDriver.addFocusListener(this);\r
jComboBoxPcdIsDriver.setEnabled(false);\r
- //Tools.generateComboBoxByVector(jComboBoxPcdIsDriver, ed.getVPcdDriverTypes());\r
jComboBoxPcdIsDriver.setVisible(false);\r
}\r
return jComboBoxPcdIsDriver;\r
}\r
}\r
\r
- //\r
- // Check Module Type\r
- //\r
- if (arg0.getSource() == this.jComboBoxModuleType) {\r
- if (!jComboBoxModuleType.getSelectedItem().toString().equals(msaHeader.getModuleType().toString())) {\r
- msaHeader.setModuleType(ModuleTypeDef.Enum.forString(jComboBoxModuleType.getSelectedItem().toString()));\r
- } else {\r
- return;\r
- }\r
- }\r
-\r
//\r
// Check Guid\r
//\r
}\r
}\r
\r
- //\r
- // Check Supported Arch\r
- //\r
- if (arg0.getSource() == this.jCheckBoxArm || arg0.getSource() == this.jCheckBoxEbc\r
- || arg0.getSource() == this.jCheckBoxIa32 || arg0.getSource() == this.jCheckBoxIpf\r
- || arg0.getSource() == this.jCheckBoxPpc || arg0.getSource() == this.jCheckBoxX64) {\r
- if (!this.getSelectedItemsString().equals(md.getSupportedArchitectures().toString())) {\r
- md.setSupportedArchitectures(this.getSelectedItemsVector());\r
- } else {\r
- return;\r
- }\r
- }\r
-\r
- //\r
- // Check Flash Map\r
- //\r
- if (arg0.getSource() == this.jCheckBoxFlashMap) {\r
- if ((this.ex == null) && this.jCheckBoxFlashMap.isSelected()) {\r
- this.ex = ExternsDocument.Externs.Factory.newInstance();\r
- this.ex.setTianoR8FlashMapH(this.jCheckBoxFlashMap.isSelected());\r
- this.msa.setExterns(this.ex);\r
- } else if ((this.ex != null) && this.jCheckBoxFlashMap.isSelected()) {\r
- this.ex.setTianoR8FlashMapH(this.jCheckBoxFlashMap.isSelected());\r
- this.msa.setExterns(this.ex);\r
- } else if ((this.ex != null) && !this.jCheckBoxFlashMap.isSelected()) {\r
- ExternsDocument.Externs newEx = ExternsDocument.Externs.Factory.newInstance();\r
- if (this.ex.getExternList() != null) {\r
- for (int index = 0; index < this.ex.getExternList().size(); index++) {\r
- newEx.addNewExtern();\r
- newEx.setExternArray(index, this.ex.getExternArray(index));\r
- }\r
- }\r
- if (this.ex.getSpecificationList() != null) {\r
- for (int index = 0; index < this.ex.getSpecificationList().size(); index++) {\r
- newEx.addNewSpecification();\r
- newEx.setSpecificationArray(index, this.ex.getSpecificationArray(index));\r
- }\r
- }\r
- if (this.ex.getPcdIsDriver() != null) {\r
- newEx.setPcdIsDriver(this.ex.getPcdIsDriver());\r
- }\r
- this.ex = newEx;\r
- this.msa.setExterns(this.ex);\r
- }\r
- }\r
-\r
this.save();\r
}\r
\r
jCheckBoxFlashMap = new JCheckBox();\r
jCheckBoxFlashMap.setBounds(new java.awt.Rectangle(labelCol, 555, 480, 20));\r
jCheckBoxFlashMap.setText("Does this module require a legacy FlashMap header file?");\r
- jCheckBoxFlashMap.addFocusListener(this);\r
}\r
return jCheckBoxFlashMap;\r
}\r
}\r
\r
public void itemStateChanged(ItemEvent arg0) {\r
+ //\r
+ // Check Supported Arch\r
+ //\r
if (arg0.getSource() == this.jCheckBoxIa32 || arg0.getSource() == this.jCheckBoxIpf\r
|| arg0.getSource() == this.jCheckBoxX64 || arg0.getSource() == this.jCheckBoxEbc\r
|| arg0.getSource() == this.jCheckBoxArm || arg0.getSource() == this.jCheckBoxPpc) {\r
.wrn("At lease one Supportted Architecture should be selected! IA32 is selected as default value!");\r
this.jCheckBoxIa32.setSelected(true);\r
}\r
+\r
+ if (!this.getSelectedItemsString().equals(md.getSupportedArchitectures().toString())) {\r
+ md.setSupportedArchitectures(this.getSelectedItemsVector());\r
+ this.save();\r
+ }\r
}\r
\r
if (arg0.getSource() == this.jComboBoxModuleType) {\r
this.jCheckBoxPcd.setEnabled(false);\r
this.jCheckBoxPcd.setSelected(false);\r
}\r
+ if (!jComboBoxModuleType.getSelectedItem().toString().equals(msaHeader.getModuleType().toString())) {\r
+ msaHeader.setModuleType(ModuleTypeDef.Enum.forString(jComboBoxModuleType.getSelectedItem().toString()));\r
+ this.save();\r
+ }\r
}\r
\r
//\r
}\r
this.save();\r
}\r
- \r
- this.omt.setSaved(false);\r
+ //\r
+ // Check Flash Map\r
+ //\r
+ if (arg0.getSource() == this.jCheckBoxFlashMap) {\r
+ if ((this.ex == null) && this.jCheckBoxFlashMap.isSelected()) {\r
+ this.ex = ExternsDocument.Externs.Factory.newInstance();\r
+ this.ex.setTianoR8FlashMapH(this.jCheckBoxFlashMap.isSelected());\r
+ this.msa.setExterns(this.ex);\r
+ } else if ((this.ex != null) && this.jCheckBoxFlashMap.isSelected()) {\r
+ this.ex.setTianoR8FlashMapH(this.jCheckBoxFlashMap.isSelected());\r
+ this.msa.setExterns(this.ex);\r
+ } else if ((this.ex != null) && !this.jCheckBoxFlashMap.isSelected()) {\r
+ ExternsDocument.Externs newEx = ExternsDocument.Externs.Factory.newInstance();\r
+ if (this.ex.getExternList() != null) {\r
+ for (int index = 0; index < this.ex.getExternList().size(); index++) {\r
+ newEx.addNewExtern();\r
+ newEx.setExternArray(index, this.ex.getExternArray(index));\r
+ }\r
+ }\r
+ if (this.ex.getSpecificationList() != null) {\r
+ for (int index = 0; index < this.ex.getSpecificationList().size(); index++) {\r
+ newEx.addNewSpecification();\r
+ newEx.setSpecificationArray(index, this.ex.getSpecificationArray(index));\r
+ }\r
+ }\r
+ if (this.ex.getPcdIsDriver() != null) {\r
+ newEx.setPcdIsDriver(this.ex.getPcdIsDriver());\r
+ }\r
+ this.ex = newEx;\r
+ this.msa.setExterns(this.ex);\r
+ }\r
+ this.save();\r
+ }\r
}\r
- \r
+\r
private void addListeners() {\r
this.jTextFieldBaseName.getDocument().addDocumentListener(this);\r
this.jTextFieldGuid.getDocument().addDocumentListener(this);\r
this.jTextFieldSpecification.getDocument().addDocumentListener(this);\r
this.jTextFieldURL.getDocument().addDocumentListener(this);\r
this.jTextFieldVersion.getDocument().addDocumentListener(this);\r
- \r
+\r
this.jComboBoxModuleType.addItemListener(this);\r
- \r
+\r
this.jCheckBoxIa32.addItemListener(this);\r
this.jCheckBoxX64.addItemListener(this);\r
this.jCheckBoxIpf.addItemListener(this);\r
this.jCheckBoxEbc.addItemListener(this);\r
this.jCheckBoxArm.addItemListener(this);\r
this.jCheckBoxPpc.addItemListener(this);\r
- \r
+\r
this.jCheckBoxPcd.addItemListener(this);\r
- \r
+\r
this.jCheckBoxFlashMap.addItemListener(this);\r
}\r
\r
public void insertUpdate(DocumentEvent e) {\r
- this.omt.setSaved(false); \r
+ this.omt.setSaved(false);\r
}\r
\r
public void removeUpdate(DocumentEvent e) {\r