Coding style changes

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1156 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
jlin16 2006-07-31 11:20:16 +00:00
parent 3c8842bce5
commit 4da2e62597
16 changed files with 2080 additions and 2319 deletions

View File

@ -53,26 +53,23 @@ public class GenGuidDialog extends JDialog implements ActionListener{
static private JFrame frame;
private JPanel jContentPane = null;
private JPanel jPanel = null;
private JPanel jPanel1 = null;
private JPanel jPanel2 = null;
private JPanel jPanel3 = null;
private JPanel jPanel4 = null;
private JPanel jPanelEast = null;
private JPanel jPanelCenter = null;
private JTextField jTextField = null;
private JLabel jLabel = null;
private JRadioButton jRadioButton = null;
private JRadioButton jRadioButton1 = null;
private JButton jButton = null;
private JButton jButton1 = null;
private JButton jButton2 = null;
private JRadioButton jRadioButtonReg = null;
private JButton jButtonCancel = null;
private JButton jButtonNew = null;
private JButton jButtonOk = null;
// private String guid = null;
public void actionPerformed(ActionEvent arg0) {
// TODO Auto-generated method stub
if (arg0.getSource() == jButton1){
if (arg0.getSource() == jButtonNew){
String uuid = Tools.generateUuidString();
if (jRadioButton1.isSelected()) {
if (jRadioButtonReg.isSelected()) {
jTextField.setText(uuid);
}
else {
@ -86,7 +83,7 @@ public class GenGuidDialog extends JDialog implements ActionListener{
}
}
if (arg0.getSource() == jRadioButton1){
if (arg0.getSource() == jRadioButtonReg){
//ToDo: check text field value against RegExp and transform if needed
if (jTextField.getText().matches(GenGuidDialog.guidRegistryPat)){
@ -116,7 +113,7 @@ public class GenGuidDialog extends JDialog implements ActionListener{
}
if (arg0.getSource() == jButton2){
if (arg0.getSource() == jButtonOk){
// if (jTextField.getText().matches(Tools.guidArrayPat)
// || jTextField.getText().matches(Tools.guidRegistryPat)){
// this.setVisible(false);
@ -127,7 +124,7 @@ public class GenGuidDialog extends JDialog implements ActionListener{
this.dispose();
}
if (arg0.getSource() == jButton){
if (arg0.getSource() == jButtonCancel){
this.dispose();
}
}
@ -137,54 +134,18 @@ public class GenGuidDialog extends JDialog implements ActionListener{
*
* @return javax.swing.JPanel
*/
private JPanel getJPanel() {
if (jPanel == null) {
private JPanel getJPanelEast() {
if (jPanelEast == null) {
FlowLayout flowLayout = new FlowLayout();
flowLayout.setVgap(10);
jPanel = new JPanel();
jPanel.setLayout(flowLayout);
jPanel.setPreferredSize(new java.awt.Dimension(100,30));
jPanel.add(getJButton1(), null);
jPanel.add(getJButton2(), null);
jPanel.add(getJButton(), null);
jPanelEast = new JPanel();
jPanelEast.setLayout(flowLayout);
jPanelEast.setPreferredSize(new java.awt.Dimension(100,30));
jPanelEast.add(getJButtonNew(), null);
jPanelEast.add(getJButtonOk(), null);
jPanelEast.add(getJButtonCancel(), null);
}
return jPanel;
}
/**
* This method initializes jPanel1
*
* @return javax.swing.JPanel
*/
private JPanel getJPanel1() {
if (jPanel1 == null) {
jPanel1 = new JPanel();
}
return jPanel1;
}
/**
* This method initializes jPanel2
*
* @return javax.swing.JPanel
*/
private JPanel getJPanel2() {
if (jPanel2 == null) {
jPanel2 = new JPanel();
}
return jPanel2;
}
/**
* This method initializes jPanel3
*
* @return javax.swing.JPanel
*/
private JPanel getJPanel3() {
if (jPanel3 == null) {
jPanel3 = new JPanel();
}
return jPanel3;
return jPanelEast;
}
/**
@ -192,23 +153,23 @@ public class GenGuidDialog extends JDialog implements ActionListener{
*
* @return javax.swing.JPanel
*/
private JPanel getJPanel4() {
if (jPanel4 == null) {
private JPanel getJPanelCenter() {
if (jPanelCenter == null) {
jLabel = new JLabel();
jLabel.setText("GUID Value");
GridLayout gridLayout = new GridLayout();
gridLayout.setRows(4);
jPanel4 = new JPanel();
jPanel4.setLayout(gridLayout);
jPanel4.add(getJRadioButton1(), null);
jPanel4.add(getJRadioButton(), null);
jPanel4.add(jLabel, null);
jPanel4.add(getJTextField(), null);
jPanelCenter = new JPanel();
jPanelCenter.setLayout(gridLayout);
jPanelCenter.add(getJRadioButtonReg(), null);
jPanelCenter.add(getJRadioButton(), null);
jPanelCenter.add(jLabel, null);
jPanelCenter.add(getJTextField(), null);
ButtonGroup bg = new ButtonGroup();
bg.add(jRadioButton1);
bg.add(jRadioButtonReg);
bg.add(jRadioButton);
}
return jPanel4;
return jPanelCenter;
}
/**
@ -245,14 +206,14 @@ public class GenGuidDialog extends JDialog implements ActionListener{
*
* @return javax.swing.JRadioButton
*/
private JRadioButton getJRadioButton1() {
if (jRadioButton1 == null) {
jRadioButton1 = new JRadioButton();
jRadioButton1.setText("Registry Format");
jRadioButton1.setSelected(true);
jRadioButton1.addActionListener(this);
private JRadioButton getJRadioButtonReg() {
if (jRadioButtonReg == null) {
jRadioButtonReg = new JRadioButton();
jRadioButtonReg.setText("Registry Format");
jRadioButtonReg.setSelected(true);
jRadioButtonReg.addActionListener(this);
}
return jRadioButton1;
return jRadioButtonReg;
}
/**
@ -260,14 +221,14 @@ public class GenGuidDialog extends JDialog implements ActionListener{
*
* @return javax.swing.JButton
*/
private JButton getJButton() {
if (jButton == null) {
jButton = new JButton();
jButton.setPreferredSize(new java.awt.Dimension(80,20));
jButton.setText("Cancel");
jButton.addActionListener(this);
private JButton getJButtonCancel() {
if (jButtonCancel == null) {
jButtonCancel = new JButton();
jButtonCancel.setPreferredSize(new java.awt.Dimension(80,20));
jButtonCancel.setText("Cancel");
jButtonCancel.addActionListener(this);
}
return jButton;
return jButtonCancel;
}
/**
@ -275,15 +236,15 @@ public class GenGuidDialog extends JDialog implements ActionListener{
*
* @return javax.swing.JButton
*/
private JButton getJButton1() {
if (jButton1 == null) {
jButton1 = new JButton();
jButton1.setPreferredSize(new java.awt.Dimension(80,20));
jButton1.setHorizontalTextPosition(javax.swing.SwingConstants.LEADING);
jButton1.setText("New");
jButton1.addActionListener(this);
private JButton getJButtonNew() {
if (jButtonNew == null) {
jButtonNew = new JButton();
jButtonNew.setPreferredSize(new java.awt.Dimension(80,20));
jButtonNew.setHorizontalTextPosition(javax.swing.SwingConstants.LEADING);
jButtonNew.setText("New");
jButtonNew.addActionListener(this);
}
return jButton1;
return jButtonNew;
}
/**
@ -291,15 +252,15 @@ public class GenGuidDialog extends JDialog implements ActionListener{
*
* @return javax.swing.JButton
*/
private JButton getJButton2() {
if (jButton2 == null) {
jButton2 = new JButton();
jButton2.setPreferredSize(new java.awt.Dimension(80,20));
jButton2.setText("Ok");
jButton2.setActionCommand("GenGuidValue");
jButton2.addActionListener(this);
private JButton getJButtonOk() {
if (jButtonOk == null) {
jButtonOk = new JButton();
jButtonOk.setPreferredSize(new java.awt.Dimension(80,20));
jButtonOk.setText("Ok");
jButtonOk.setActionCommand("GenGuidValue");
jButtonOk.addActionListener(this);
}
return jButton2;
return jButtonOk;
}
/**
@ -329,14 +290,14 @@ public class GenGuidDialog extends JDialog implements ActionListener{
public GenGuidDialog(ActionListener i){
super();
initialize();
jButton2.addActionListener(i);
jButtonOk.addActionListener(i);
this.addWindowListener(new WindowAdapter(){
@Override
public void windowActivated(WindowEvent arg0) {
// TODO Auto-generated method stub
super.windowActivated(arg0);
if ((jRadioButton1.isSelected() && jTextField.getText().matches(GenGuidDialog.guidArrayPat))
if ((jRadioButtonReg.isSelected() && jTextField.getText().matches(GenGuidDialog.guidArrayPat))
|| (jRadioButton.isSelected() && jTextField.getText().matches(GenGuidDialog.guidRegistryPat))) {
jTextField.setText(GenGuidDialog.formatGuidString(jTextField.getText()));
}
@ -373,11 +334,8 @@ public class GenGuidDialog extends JDialog implements ActionListener{
if (jContentPane == null) {
jContentPane = new JPanel();
jContentPane.setLayout(new BorderLayout());
jContentPane.add(getJPanel(), java.awt.BorderLayout.EAST);
jContentPane.add(getJPanel1(), java.awt.BorderLayout.WEST);
jContentPane.add(getJPanel2(), java.awt.BorderLayout.NORTH);
jContentPane.add(getJPanel3(), java.awt.BorderLayout.SOUTH);
jContentPane.add(getJPanel4(), java.awt.BorderLayout.CENTER);
jContentPane.add(getJPanelEast(), java.awt.BorderLayout.EAST);
jContentPane.add(getJPanelCenter(), java.awt.BorderLayout.CENTER);
}
return jContentPane;
}

View File

@ -113,21 +113,21 @@ public class SpdGuidDecls extends IInternalFrame implements TableModelListener{
private JTextField jTextFieldVersion = null;
private JLabel jLabel = null;
private JLabel jLabelHelp = null;
private JTextField jTextField = null;
private JTextField jTextFieldHelp = null;
private JLabel jLabel1 = null;
private JLabel jLabelSupMod = null;
private JLabel jLabel2 = null;
private JLabel jLabelSupArch = null;
private ICheckBoxList iCheckBoxList = null;
private ICheckBoxList iCheckBoxListArch = null;
private ICheckBoxList iCheckBoxList1 = null;
private ICheckBoxList iCheckBoxListGuid = null;
private ICheckBoxList iCheckBoxList2 = null;
private ICheckBoxList iCheckBoxListMod = null;
private JLabel jLabel3 = null;
private JLabel jLabelGuidType = null;
protected String[][] saa = null;
@ -450,22 +450,22 @@ public class SpdGuidDecls extends IInternalFrame implements TableModelListener{
**/
protected JPanel getJContentPane1() {
if (jContentPane == null) {
jLabel3 = new JLabel();
jLabel3.setBounds(new java.awt.Rectangle(400,122,103,16));
jLabel3.setText("GUID Type List");
jLabel3.setEnabled(true);
jLabel2 = new JLabel();
jLabel2.setBounds(new java.awt.Rectangle(197,122,108,16));
jLabel2.setText("Supported Arch");
jLabel2.setEnabled(true);
jLabel1 = new JLabel();
jLabel1.setBounds(new java.awt.Rectangle(14,120,110,16));
jLabel1.setText("Supported Module");
jLabel1.setEnabled(true);
jLabel = new JLabel();
jLabel.setText("HelpText");
jLabel.setSize(new java.awt.Dimension(109,20));
jLabel.setLocation(new java.awt.Point(14,85));
jLabelGuidType = new JLabel();
jLabelGuidType.setBounds(new java.awt.Rectangle(400,122,103,16));
jLabelGuidType.setText("GUID Type List");
jLabelGuidType.setEnabled(true);
jLabelSupArch = new JLabel();
jLabelSupArch.setBounds(new java.awt.Rectangle(197,122,108,16));
jLabelSupArch.setText("Supported Arch");
jLabelSupArch.setEnabled(true);
jLabelSupMod = new JLabel();
jLabelSupMod.setBounds(new java.awt.Rectangle(14,120,110,16));
jLabelSupMod.setText("Supported Module");
jLabelSupMod.setEnabled(true);
jLabelHelp = new JLabel();
jLabelHelp.setText("HelpText");
jLabelHelp.setSize(new java.awt.Dimension(109,20));
jLabelHelp.setLocation(new java.awt.Point(14,85));
jLabelVer = new JLabel();
jLabelVer.setBounds(new java.awt.Rectangle(14,60,111,20));
jLabelVer.setText("C_Name");
@ -505,14 +505,14 @@ public class SpdGuidDecls extends IInternalFrame implements TableModelListener{
jContentPane.add(jLabelName, null);
jContentPane.add(getJTextFieldName(), null);
jContentPane.add(jLabelGuid, null);
jContentPane.add(jLabel, null);
jContentPane.add(getJTextField(), null);
jContentPane.add(jLabel1, null);
jContentPane.add(jLabel2, null);
jContentPane.add(jLabelHelp, null);
jContentPane.add(getJTextFieldHelp(), null);
jContentPane.add(jLabelSupMod, null);
jContentPane.add(jLabelSupArch, null);
jContentPane.add(getJScrollPaneArch(), null);
jContentPane.add(getJScrollPaneGuid(), null);
jContentPane.add(getJScrollPaneModule(), null);
jContentPane.add(jLabel3, null);
jContentPane.add(jLabelGuidType, null);
}
return jContentPane;
}
@ -544,19 +544,19 @@ public class SpdGuidDecls extends IInternalFrame implements TableModelListener{
//ToDo: check before add
String[] row = {"", "", "", "", "", "", ""};
row[3] = jTextField.getText();
row[3] = jTextFieldHelp.getText();
row[2] = jTextFieldAdd.getText();
row[1] = jTextFieldVersion.getText();
row[0] = jTextFieldName.getText();
row[4] = vectorToString(iCheckBoxList.getAllCheckedItemsString());
row[4] = vectorToString(iCheckBoxListArch.getAllCheckedItemsString());
if (row[4].length() == 0) {
row[4] = null;
}
row[5] = vectorToString(iCheckBoxList2.getAllCheckedItemsString());
row[5] = vectorToString(iCheckBoxListMod.getAllCheckedItemsString());
if (row[5].length() == 0) {
row[5] = null;
}
row[6] = vectorToString(iCheckBoxList1.getAllCheckedItemsString());
row[6] = vectorToString(iCheckBoxListGuid.getAllCheckedItemsString());
if (row[6].length() == 0) {
row[6] = null;
}
@ -622,15 +622,15 @@ public class SpdGuidDecls extends IInternalFrame implements TableModelListener{
}
protected void addRow(String[] row) {
Vector<String> vArch = iCheckBoxList.getAllCheckedItemsString();
Vector<String> vArch = iCheckBoxListArch.getAllCheckedItemsString();
if (vArch.size() == 0) {
vArch = null;
}
Vector<String> vModType = iCheckBoxList2.getAllCheckedItemsString();
Vector<String> vModType = iCheckBoxListMod.getAllCheckedItemsString();
if (vModType.size() == 0) {
vModType = null;
}
Vector<String> vguidType = iCheckBoxList1.getAllCheckedItemsString();
Vector<String> vguidType = iCheckBoxListGuid.getAllCheckedItemsString();
if (vguidType.size() == 0) {
vguidType = null;
}
@ -711,7 +711,7 @@ public class SpdGuidDecls extends IInternalFrame implements TableModelListener{
resizeComponentWidth(this.jTextFieldName, this.getWidth(), intPreferredWidth);
resizeComponentWidth(this.jTextFieldAdd, this.getWidth(), intPreferredWidth);
resizeComponentWidth(this.jTextFieldVersion, this.getWidth(), intPreferredWidth);
resizeComponentWidth(this.jTextField, this.getWidth(), intPreferredWidth);
resizeComponentWidth(this.jTextFieldHelp, this.getWidth(), intPreferredWidth);
resizeComponentWidth(this.jScrollPane, this.getWidth(), intPreferredWidth);
relocateComponentX(this.jButtonGen, this.getWidth(), this.getPreferredSize().width, 40);
@ -722,13 +722,13 @@ public class SpdGuidDecls extends IInternalFrame implements TableModelListener{
*
* @return javax.swing.JTextField
*/
private JTextField getJTextField() {
if (jTextField == null) {
jTextField = new JTextField();
jTextField.setBounds(new java.awt.Rectangle(136,85,337,20));
jTextField.setPreferredSize(new Dimension(335, 20));
private JTextField getJTextFieldHelp() {
if (jTextFieldHelp == null) {
jTextFieldHelp = new JTextField();
jTextFieldHelp.setBounds(new java.awt.Rectangle(136,85,337,20));
jTextFieldHelp.setPreferredSize(new Dimension(335, 20));
}
return jTextField;
return jTextFieldHelp;
}
private JScrollPane getJScrollPaneArch() {
@ -736,7 +736,7 @@ public class SpdGuidDecls extends IInternalFrame implements TableModelListener{
jScrollPaneArch = new JScrollPane();
jScrollPaneArch.setBounds(new java.awt.Rectangle(197,142,188,74));
jScrollPaneArch.setPreferredSize(new java.awt.Dimension(188, 74));
jScrollPaneArch.setViewportView(getICheckBoxList());
jScrollPaneArch.setViewportView(getICheckBoxListArch());
}
return jScrollPaneArch;
}
@ -745,10 +745,10 @@ public class SpdGuidDecls extends IInternalFrame implements TableModelListener{
*
* @return org.tianocore.frameworkwizard.common.ui.iCheckBoxList.ICheckBoxList
*/
private ICheckBoxList getICheckBoxList() {
if (iCheckBoxList == null) {
iCheckBoxList = new ICheckBoxList();
iCheckBoxList.setBounds(new java.awt.Rectangle(197,142,188,74));
private ICheckBoxList getICheckBoxListArch() {
if (iCheckBoxListArch == null) {
iCheckBoxListArch = new ICheckBoxList();
iCheckBoxListArch.setBounds(new java.awt.Rectangle(197,142,188,74));
Vector<String> v = new Vector<String>();
v.add("IA32");
v.add("X64");
@ -756,9 +756,9 @@ public class SpdGuidDecls extends IInternalFrame implements TableModelListener{
v.add("EBC");
v.add("ARM");
v.add("PPC");
iCheckBoxList.setAllItems(v);
iCheckBoxListArch.setAllItems(v);
}
return iCheckBoxList;
return iCheckBoxListArch;
}
protected JScrollPane getJScrollPaneGuid() {
@ -767,7 +767,7 @@ public class SpdGuidDecls extends IInternalFrame implements TableModelListener{
jScrollPaneGuid.setPreferredSize(new java.awt.Dimension(190,74));
jScrollPaneGuid.setLocation(new java.awt.Point(400,142));
jScrollPaneGuid.setSize(new java.awt.Dimension(260,74));
jScrollPaneGuid.setViewportView(getICheckBoxList1());
jScrollPaneGuid.setViewportView(getICheckBoxListGuid());
}
return jScrollPaneGuid;
}
@ -776,10 +776,10 @@ public class SpdGuidDecls extends IInternalFrame implements TableModelListener{
*
* @return org.tianocore.frameworkwizard.common.ui.iCheckBoxList.ICheckBoxList
*/
private ICheckBoxList getICheckBoxList1() {
if (iCheckBoxList1 == null) {
iCheckBoxList1 = new ICheckBoxList();
iCheckBoxList1.setBounds(new java.awt.Rectangle(400,142,177,74));
private ICheckBoxList getICheckBoxListGuid() {
if (iCheckBoxListGuid == null) {
iCheckBoxListGuid = new ICheckBoxList();
iCheckBoxListGuid.setBounds(new java.awt.Rectangle(400,142,177,74));
Vector<String> v = new Vector<String>();
v.add("DATA_HUB_RECORD");
v.add("EFI_EVENT");
@ -790,9 +790,9 @@ public class SpdGuidDecls extends IInternalFrame implements TableModelListener{
v.add("HOB");
v.add("TOKEN_SPACE_GUID");
iCheckBoxList1.setAllItems(v);
iCheckBoxListGuid.setAllItems(v);
}
return iCheckBoxList1;
return iCheckBoxListGuid;
}
private JScrollPane getJScrollPaneModule() {
@ -800,7 +800,7 @@ public class SpdGuidDecls extends IInternalFrame implements TableModelListener{
jScrollPaneModule = new JScrollPane();
jScrollPaneModule.setBounds(new java.awt.Rectangle(14,142,170,74));
jScrollPaneModule.setPreferredSize(new java.awt.Dimension(170, 74));
jScrollPaneModule.setViewportView(getICheckBoxList2());
jScrollPaneModule.setViewportView(getICheckBoxListMod());
}
return jScrollPaneModule;
}
@ -809,10 +809,10 @@ public class SpdGuidDecls extends IInternalFrame implements TableModelListener{
*
* @return org.tianocore.frameworkwizard.common.ui.iCheckBoxList.ICheckBoxList
*/
private ICheckBoxList getICheckBoxList2() {
if (iCheckBoxList2 == null) {
iCheckBoxList2 = new ICheckBoxList();
iCheckBoxList2.setBounds(new java.awt.Rectangle(14,142,170,74));
private ICheckBoxList getICheckBoxListMod() {
if (iCheckBoxListMod == null) {
iCheckBoxListMod = new ICheckBoxList();
iCheckBoxListMod.setBounds(new java.awt.Rectangle(14,142,170,74));
Vector<String> v = new Vector<String>();
v.add("BASE");
v.add("SEC");
@ -826,9 +826,9 @@ public class SpdGuidDecls extends IInternalFrame implements TableModelListener{
v.add("UEFI_DRIVER");
v.add("UEFI_APPLICATION");
v.add("USER_DEFINED");
iCheckBoxList2.setAllItems(v);
iCheckBoxListMod.setAllItems(v);
}
return iCheckBoxList2;
return iCheckBoxListMod;
}
public static void main(String[] args){
@ -864,8 +864,8 @@ public class SpdGuidDecls extends IInternalFrame implements TableModelListener{
return v;
}
protected JLabel getJLabel3() {
return jLabel3;
protected JLabel getJLabelGuidType() {
return jLabelGuidType;
}
}

View File

@ -124,7 +124,7 @@ public class SpdHeader extends IInternalFrame {
private JLabel jLabel = null;
private JTextField jTextField = null;
private JTextField jTextFieldUrl = null;
/**
This method initializes jTextFieldBaseName
@ -430,26 +430,26 @@ public class SpdHeader extends IInternalFrame {
*
* @return javax.swing.JTextField
*/
private JTextField getJTextField() {
if (jTextField == null) {
jTextField = new JTextField();
jTextField.setBounds(new java.awt.Rectangle(161,195,320,20));
jTextField.setPreferredSize(new java.awt.Dimension(320, 20));
jTextField.addFocusListener(new FocusAdapter(){
private JTextField getJTextFieldUrl() {
if (jTextFieldUrl == null) {
jTextFieldUrl = new JTextField();
jTextFieldUrl.setBounds(new java.awt.Rectangle(161,195,320,20));
jTextFieldUrl.setPreferredSize(new java.awt.Dimension(320, 20));
jTextFieldUrl.addFocusListener(new FocusAdapter(){
public void focusLost(FocusEvent e){
if (jTextField.getText().length() == 0 && sfc.getSpdHdrUrl() == null) {
if (jTextFieldUrl.getText().length() == 0 && sfc.getSpdHdrUrl() == null) {
return;
}
if (jTextField.getText().equals(sfc.getSpdHdrUrl())) {
if (jTextFieldUrl.getText().equals(sfc.getSpdHdrUrl())) {
return;
}
sfc.setSpdHdrLicense(jTextAreaLicense.getText());
sfc.setSpdHdrUrl(jTextField.getText());
sfc.setSpdHdrUrl(jTextFieldUrl.getText());
docConsole.setSaved(false);
}
});
}
return jTextField;
return jTextFieldUrl;
}
public static void main(String[] args) {
@ -513,7 +513,7 @@ public class SpdHeader extends IInternalFrame {
jTextAreaLicense.setText(sfc.getSpdHdrLicense());
}
if (sfc.getSpdHdrUrl() != null) {
jTextField.setText(sfc.getSpdHdrUrl());
jTextFieldUrl.setText(sfc.getSpdHdrUrl());
}
if (sfc.getSpdHdrCopyright() != null) {
jTextFieldCopyright.setText(sfc.getSpdHdrCopyright());
@ -624,7 +624,7 @@ public class SpdHeader extends IInternalFrame {
jContentPane.add(getJTextFieldCopyright(), null);
jContentPane.add(jLabel, null);
jContentPane.add(getJTextField(), null);
jContentPane.add(getJTextFieldUrl(), null);
}
return jContentPane;
}
@ -665,7 +665,7 @@ public class SpdHeader extends IInternalFrame {
resizeComponentWidth(this.jTextFieldBaseName, intCurrentWidth,intPreferredWidth);
resizeComponentWidth(this.jTextFieldGuid, intCurrentWidth,intPreferredWidth);
resizeComponentWidth(this.jTextFieldVersion, intCurrentWidth,intPreferredWidth);
resizeComponentWidth(this.jTextField, intCurrentWidth,intPreferredWidth);
resizeComponentWidth(this.jTextFieldUrl, intCurrentWidth,intPreferredWidth);
resizeComponentWidth(this.jScrollPaneLicense, intCurrentWidth,intPreferredWidth);
resizeComponentWidth(this.jTextFieldCopyright, intCurrentWidth,intPreferredWidth);
resizeComponentWidth(this.jScrollPaneDescription, intCurrentWidth,intPreferredWidth);

View File

@ -77,7 +77,7 @@ public class SpdLibClassDecls extends IInternalFrame implements TableModelListen
private JPanel jContentPane = null;
private JTextField jTextFieldAdd = null;
private JTextField jTextFieldClass = null;
private JComboBox jComboBoxSelect = null;
@ -133,7 +133,7 @@ public class SpdLibClassDecls extends IInternalFrame implements TableModelListen
private ICheckBoxList iCheckBoxListModules = null;
private ICheckBoxList iCheckBoxList = null;
private ICheckBoxList iCheckBoxListArch = null;
private JComboBox jComboBox = null;
@ -163,14 +163,14 @@ public class SpdLibClassDecls extends IInternalFrame implements TableModelListen
@return javax.swing.JTextField
**/
private JTextField getJTextFieldAdd() {
if (jTextFieldAdd == null) {
jTextFieldAdd = new JTextField();
jTextFieldAdd.setBounds(new java.awt.Rectangle(122,6,390,20));
jTextFieldAdd.setPreferredSize(new java.awt.Dimension(260,20));
jTextFieldAdd.setEnabled(true);
private JTextField getJTextFieldClass() {
if (jTextFieldClass == null) {
jTextFieldClass = new JTextField();
jTextFieldClass.setBounds(new java.awt.Rectangle(122,6,390,20));
jTextFieldClass.setPreferredSize(new java.awt.Dimension(260,20));
jTextFieldClass.setEnabled(true);
}
return jTextFieldAdd;
return jTextFieldClass;
}
/**
@ -512,7 +512,7 @@ public class SpdLibClassDecls extends IInternalFrame implements TableModelListen
jContentPane.add(jLabelHdr, null);
jContentPane.add(jStarLabel1, null);
jContentPane.add(jStarLabel2, null);
jContentPane.add(getJTextFieldAdd(), null);
jContentPane.add(getJTextFieldClass(), null);
jContentPane.add(getJComboBoxSelect(), null);
jContentPane.add(getJScrollPane(), null);
jContentPane.add(getJButtonAdd(), null);
@ -597,12 +597,12 @@ public class SpdLibClassDecls extends IInternalFrame implements TableModelListen
//ToDo: check before add
// LAH WAS String[] row = {null, null, null, jComboBox.getSelectedItem()+"", jTextField2RecInstVer.getText(), null, null};
String[] row = {null, null, null, null, null, null, null};
row[cnClassName] = jTextFieldAdd.getText();
row[cnClassName] = jTextFieldClass.getText();
row[cnHdrFile] = jTextFieldHdr.getText().replace('\\', '/');
row[cnHelpText] = jTextFieldHelp.getText();
row[cnRecInstName] = jComboBox.getSelectedItem()+"";
row[cnRecInstVer] = jTextField2RecInstVer.getText();
row[cnSupArch] = vectorToString(iCheckBoxList.getAllCheckedItemsString());
row[cnSupArch] = vectorToString(iCheckBoxListArch.getAllCheckedItemsString());
if (row[cnSupArch].length() == 0) {
row[cnSupArch] = null;
}
@ -755,7 +755,7 @@ public class SpdLibClassDecls extends IInternalFrame implements TableModelListen
public void componentResized(ComponentEvent arg0) {
int intPreferredWidth = 500;
resizeComponentWidth(this.jTextFieldAdd, this.getWidth(), intPreferredWidth);
resizeComponentWidth(this.jTextFieldClass, this.getWidth(), intPreferredWidth);
resizeComponentWidth(this.jTextFieldHelp, this.getWidth(), intPreferredWidth);
resizeComponentWidth(this.jScrollPane, this.getWidth(), intPreferredWidth-10);
@ -849,7 +849,7 @@ public class SpdLibClassDecls extends IInternalFrame implements TableModelListen
jScrollPane1Arch = new JScrollPane();
jScrollPane1Arch.setBounds(new java.awt.Rectangle(218,170,293,73));
jScrollPane1Arch.setPreferredSize(new java.awt.Dimension(320, 80));
jScrollPane1Arch.setViewportView(getICheckBoxList());
jScrollPane1Arch.setViewportView(getICheckBoxListArch());
}
return jScrollPane1Arch;
}
@ -858,10 +858,10 @@ public class SpdLibClassDecls extends IInternalFrame implements TableModelListen
*
* @return org.tianocore.frameworkwizard.common.ui.iCheckBoxList.ICheckBoxList
*/
private ICheckBoxList getICheckBoxList() {
if (iCheckBoxList == null) {
iCheckBoxList = new ICheckBoxList();
iCheckBoxList.setBounds(new java.awt.Rectangle(218,171,292,66));
private ICheckBoxList getICheckBoxListArch() {
if (iCheckBoxListArch == null) {
iCheckBoxListArch = new ICheckBoxList();
iCheckBoxListArch.setBounds(new java.awt.Rectangle(218,171,292,66));
Vector<String> v = new Vector<String>();
v.add("IA32");
v.add("X64");
@ -869,9 +869,9 @@ public class SpdLibClassDecls extends IInternalFrame implements TableModelListen
v.add("EBC");
v.add("ARM");
v.add("PPC");
iCheckBoxList.setAllItems(v);
iCheckBoxListArch.setAllItems(v);
}
return iCheckBoxList;
return iCheckBoxListArch;
}
/**
@ -887,11 +887,11 @@ public class SpdLibClassDecls extends IInternalFrame implements TableModelListen
jComboBox.setLocation(new java.awt.Point(218,111));
jComboBox.addFocusListener(new java.awt.event.FocusAdapter() {
public void focusGained(java.awt.event.FocusEvent e) {
if (jTextFieldAdd.getText().length() == 0) {
if (jTextFieldClass.getText().length() == 0) {
return;
}
jComboBox.removeAllItems();
getLibInstances(jTextFieldAdd.getText());
getLibInstances(jTextFieldClass.getText());
Set<String> libNames = libNameGuidMap.keySet();
Iterator<String> si = libNames.iterator();
while(si.hasNext()) {

View File

@ -64,7 +64,7 @@ public class SpdMsaFiles extends IInternalFrame implements TableModelListener{
private JPanel jContentPane = null;
private JScrollPane jScrollPane1 = null;
private JScrollPane jScrollPaneMsa = null;
private JButton jButtonAdd = null;
@ -105,13 +105,13 @@ public class SpdMsaFiles extends IInternalFrame implements TableModelListener{
@return javax.swing.JScrollPane
**/
private JScrollPane getJScrollPane1() {
if (jScrollPane1 == null) {
jScrollPane1 = new JScrollPane();
jScrollPane1.setBounds(new java.awt.Rectangle(13,177,461,421));
jScrollPane1.setViewportView(getJTable());
private JScrollPane getJScrollPaneMsa() {
if (jScrollPaneMsa == null) {
jScrollPaneMsa = new JScrollPane();
jScrollPaneMsa.setBounds(new java.awt.Rectangle(13,177,461,421));
jScrollPaneMsa.setViewportView(getJTable());
}
return jScrollPane1;
return jScrollPaneMsa;
}
/**
@ -308,7 +308,7 @@ public class SpdMsaFiles extends IInternalFrame implements TableModelListener{
jContentPane.setLayout(null);
jContentPane.add(jLabel, null);
jContentPane.add(jStarLabel2, null);
jContentPane.add(getJScrollPane1(), null);
jContentPane.add(getJScrollPaneMsa(), null);
jContentPane.add(getJButtonAdd(), null);
jContentPane.add(getJButtonRemove(), null);
jContentPane.add(getJButtonClearAll(), null);
@ -485,7 +485,7 @@ public class SpdMsaFiles extends IInternalFrame implements TableModelListener{
public void componentResized(ComponentEvent arg0) {
int intPreferredWidth = 500;
resizeComponentWidth(this.jScrollPane1, this.getWidth(), intPreferredWidth);
resizeComponentWidth(this.jScrollPaneMsa, this.getWidth(), intPreferredWidth);
resizeComponentWidth(this.jTextField, this.getWidth(), intPreferredWidth);
relocateComponentX(this.jButtonBrowse, this.getWidth(), this.getPreferredSize().width, 25);
}

View File

@ -31,9 +31,9 @@ public class SpdPackageDefinitions extends IInternalFrame {
*/
private static final long serialVersionUID = 1L;
private JPanel jContentPane = null;
private JLabel jLabel = null;
private JLabel jLabelRdOnly = null;
private JComboBox jComboBoxReadOnly = null;
private JLabel jLabel1 = null;
private JLabel jLabelRePkg = null;
private JComboBox jComboBoxRePackage = null;
private StarLabel starLabel = null;
private StarLabel starLabel1 = null;
@ -91,21 +91,21 @@ public class SpdPackageDefinitions extends IInternalFrame {
starLabel1.setVisible(true);
starLabel = new StarLabel();
starLabel.setBounds(new java.awt.Rectangle(4,22,10,20));
jLabel1 = new JLabel();
jLabel1.setPreferredSize(new java.awt.Dimension(65,20));
jLabel1.setLocation(new java.awt.Point(22,62));
jLabel1.setSize(new java.awt.Dimension(65,20));
jLabel1.setText("RePackage");
jLabel = new JLabel();
jLabel.setPreferredSize(new java.awt.Dimension(57,20));
jLabel.setLocation(new java.awt.Point(22,22));
jLabel.setSize(new java.awt.Dimension(57,20));
jLabel.setText("Read Only");
jLabelRePkg = new JLabel();
jLabelRePkg.setPreferredSize(new java.awt.Dimension(65,20));
jLabelRePkg.setLocation(new java.awt.Point(22,62));
jLabelRePkg.setSize(new java.awt.Dimension(65,20));
jLabelRePkg.setText("RePackage");
jLabelRdOnly = new JLabel();
jLabelRdOnly.setPreferredSize(new java.awt.Dimension(57,20));
jLabelRdOnly.setLocation(new java.awt.Point(22,22));
jLabelRdOnly.setSize(new java.awt.Dimension(57,20));
jLabelRdOnly.setText("Read Only");
jContentPane = new JPanel();
jContentPane.setLayout(null);
jContentPane.add(jLabel, null);
jContentPane.add(jLabelRdOnly, null);
jContentPane.add(getJComboBox(), null);
jContentPane.add(jLabel1, null);
jContentPane.add(jLabelRePkg, null);
jContentPane.add(getJComboBox1(), null);
jContentPane.add(starLabel, null);
jContentPane.add(starLabel1, null);

View File

@ -94,7 +94,7 @@ public class SpdPackageHeaders extends IInternalFrame implements TableModelListe
private JScrollPane jScrollPane = null;
private JScrollPane jScrollPane1 = null;
private JScrollPane jScrollPanePkgHdr = null;
private int selectedRow = -1;
@ -331,7 +331,7 @@ public class SpdPackageHeaders extends IInternalFrame implements TableModelListe
jContentPane.add(getJTextField(), null);
jContentPane.add(getJButtonBrowse(), null);
jContentPane.add(getJScrollPane1(), null);
jContentPane.add(getJScrollPanePkgHdr(), null);
}
return jContentPane;
}
@ -502,13 +502,13 @@ public class SpdPackageHeaders extends IInternalFrame implements TableModelListe
*
* @return javax.swing.JScrollPane
*/
private JScrollPane getJScrollPane1() {
if (jScrollPane1 == null) {
jScrollPane1 = new JScrollPane();
jScrollPane1.setBounds(new java.awt.Rectangle(13,149,453,258));
jScrollPane1.setViewportView(getJTable());
private JScrollPane getJScrollPanePkgHdr() {
if (jScrollPanePkgHdr == null) {
jScrollPanePkgHdr = new JScrollPane();
jScrollPanePkgHdr.setBounds(new java.awt.Rectangle(13,149,453,258));
jScrollPanePkgHdr.setViewportView(getJTable());
}
return jScrollPane1;
return jScrollPanePkgHdr;
}
/**

View File

@ -105,7 +105,7 @@ public class SpdPcdDefs extends IInternalFrame implements TableModelListener{
private JLabel jLabelVarVal = null;
private JTextField jTextField = null;
private JTextField jTextFieldHelp = null;
private JLabel jLabelDefVal = null;
@ -129,27 +129,27 @@ public class SpdPcdDefs extends IInternalFrame implements TableModelListener{
private StarLabel starLabel = null;
private JCheckBox jCheckBox = null;
private JCheckBox jCheckBoxFeatureFlag = null;
private JCheckBox jCheckBox1 = null;
private JCheckBox jCheckBoxFixedAtBuild = null;
private JCheckBox jCheckBox2 = null;
private JCheckBox jCheckBoxPatchInMod = null;
private JCheckBox jCheckBox3 = null;
private JCheckBox jCheckBoxDyn = null;
private JCheckBox jCheckBox4 = null;
private JCheckBox jCheckBoxDynEx = null;
private JScrollPane jScrollPane1 = null;
private JScrollPane jScrollPaneArch = null;
private ICheckBoxList iCheckBoxList = null;
private ICheckBoxList iCheckBoxListArch = null;
private JScrollPane jScrollPane2 = null;
private JScrollPane jScrollPaneMod = null;
private ICheckBoxList iCheckBoxList1 = null;
private ICheckBoxList iCheckBoxListMod = null;
private JLabel jLabel = null;
private JLabel jLabelSupMod = null;
private JLabel jLabel1 = null;
private JLabel jLabelSupArch = null;
/**
This method initializes this
@ -338,14 +338,14 @@ public class SpdPcdDefs extends IInternalFrame implements TableModelListener{
private JPanel getJContentPane1() {
if (jContentPane == null) {
jLabel1 = new JLabel();
jLabel1.setBounds(new java.awt.Rectangle(241,192,89,16));
jLabel1.setText("Supported Arch");
jLabel1.setEnabled(true);
jLabel = new JLabel();
jLabel.setBounds(new java.awt.Rectangle(15,193,103,16));
jLabel.setText("Supported Module");
jLabel.setEnabled(true);
jLabelSupArch = new JLabel();
jLabelSupArch.setBounds(new java.awt.Rectangle(241,192,89,16));
jLabelSupArch.setText("Supported Arch");
jLabelSupArch.setEnabled(true);
jLabelSupMod = new JLabel();
jLabelSupMod.setBounds(new java.awt.Rectangle(15,193,103,16));
jLabelSupMod.setText("Supported Module");
jLabelSupMod.setEnabled(true);
starLabel = new StarLabel();
starLabel.setBounds(new java.awt.Rectangle(2,134,10,20));
jLabelDefVal = new JLabel();
@ -404,7 +404,7 @@ public class SpdPcdDefs extends IInternalFrame implements TableModelListener{
jContentPane.add(jStarLabel, null);
jContentPane.add(jStarLabel1, null);
jContentPane.add(jStarLabel4, null);
jContentPane.add(getJTextField(), null);
jContentPane.add(getJTextFieldHelp(), null);
jContentPane.add(jLabelDefVal, null);
jContentPane.add(getJTextFieldDefaultValue(), null);
jContentPane.add(getJButtonAdd(), null);
@ -412,15 +412,15 @@ public class SpdPcdDefs extends IInternalFrame implements TableModelListener{
jContentPane.add(getJButtonClearAll(), null);
jContentPane.add(getJScrollPane(), null);
jContentPane.add(starLabel, null);
jContentPane.add(getJCheckBox(), null);
jContentPane.add(getJCheckBox1(), null);
jContentPane.add(getJCheckBox2(), null);
jContentPane.add(getJCheckBox3(), null);
jContentPane.add(getJCheckBox4(), null);
jContentPane.add(getJScrollPane1(), null);
jContentPane.add(getJScrollPane2(), null);
jContentPane.add(jLabel, null);
jContentPane.add(jLabel1, null);
jContentPane.add(getJCheckBoxFeatureFlag(), null);
jContentPane.add(getJCheckBoxFixedAtBuild(), null);
jContentPane.add(getJCheckBoxPatchInMod(), null);
jContentPane.add(getJCheckBoxDyn(), null);
jContentPane.add(getJCheckBoxDynEx(), null);
jContentPane.add(getJScrollPaneArch(), null);
jContentPane.add(getJScrollPaneMod(), null);
jContentPane.add(jLabelSupMod, null);
jContentPane.add(jLabelSupArch, null);
}
return jContentPane;
}
@ -454,30 +454,30 @@ public class SpdPcdDefs extends IInternalFrame implements TableModelListener{
if (arg0.getSource() == jButtonAdd) {
//ToDo: check before add
boolean[] b = {jCheckBox.isSelected(), jCheckBox1.isSelected(), jCheckBox2.isSelected(), jCheckBox3.isSelected(), jCheckBox4.isSelected()};
boolean[] b = {jCheckBoxFeatureFlag.isSelected(), jCheckBoxFixedAtBuild.isSelected(), jCheckBoxPatchInMod.isSelected(), jCheckBoxDyn.isSelected(), jCheckBoxDynEx.isSelected()};
if (!checkValidUsage(b)) {
return;
}
String archList = vectorToString(iCheckBoxList.getAllCheckedItemsString());
String archList = vectorToString(iCheckBoxListArch.getAllCheckedItemsString());
if (archList.length() == 0) {
archList = null;
}
String modTypeList = vectorToString(iCheckBoxList1.getAllCheckedItemsString());
String modTypeList = vectorToString(iCheckBoxListMod.getAllCheckedItemsString());
if (modTypeList.length() == 0) {
modTypeList = null;
}
Object[] row = {jTextFieldC_Name.getText(), jTextFieldToken.getText(),
jTextFieldTsGuid.getText(), jComboBoxDataType.getSelectedItem(),
jTextFieldDefaultValue.getText(), jTextField.getText(),
jCheckBox.isSelected(), jCheckBox1.isSelected(),
jCheckBox2.isSelected(), jCheckBox3.isSelected(), jCheckBox4.isSelected(),
jTextFieldDefaultValue.getText(), jTextFieldHelp.getText(),
jCheckBoxFeatureFlag.isSelected(), jCheckBoxFixedAtBuild.isSelected(),
jCheckBoxPatchInMod.isSelected(), jCheckBoxDyn.isSelected(), jCheckBoxDynEx.isSelected(),
archList, modTypeList};
if (!dataValidation(row)) {
return;
}
model.addRow(row);
jTable.changeSelection(model.getRowCount()-1, 0, false, false);
String usage = getValidUsage(jCheckBox.isSelected(), jCheckBox1.isSelected(), jCheckBox2.isSelected(), jCheckBox3.isSelected(), jCheckBox4.isSelected());
String usage = getValidUsage(jCheckBoxFeatureFlag.isSelected(), jCheckBoxFixedAtBuild.isSelected(), jCheckBoxPatchInMod.isSelected(), jCheckBoxDyn.isSelected(), jCheckBoxDynEx.isSelected());
if (usage.length() == 0) {
usage = null;
}
@ -531,13 +531,13 @@ public class SpdPcdDefs extends IInternalFrame implements TableModelListener{
*
* @return javax.swing.JTextField
*/
private JTextField getJTextField() {
if (jTextField == null) {
jTextField = new JTextField();
jTextField.setBounds(new java.awt.Rectangle(156,108,317,20));
jTextField.setPreferredSize(new java.awt.Dimension(315,20));
private JTextField getJTextFieldHelp() {
if (jTextFieldHelp == null) {
jTextFieldHelp = new JTextField();
jTextFieldHelp.setBounds(new java.awt.Rectangle(156,108,317,20));
jTextFieldHelp.setPreferredSize(new java.awt.Dimension(315,20));
}
return jTextField;
return jTextFieldHelp;
}
/**
@ -610,7 +610,7 @@ public class SpdPcdDefs extends IInternalFrame implements TableModelListener{
resizeComponentWidth(this.jTextFieldToken, this.getWidth(), intPreferredWidth);
resizeComponentWidth(this.jTextFieldTsGuid, this.getWidth(), intPreferredWidth);
resizeComponentWidth(this.jTextFieldDefaultValue, this.getWidth(), intPreferredWidth);
resizeComponentWidth(this.jTextField, this.getWidth(), intPreferredWidth);
resizeComponentWidth(this.jTextFieldHelp, this.getWidth(), intPreferredWidth);
resizeComponentWidth(this.jScrollPane, this.getWidth(), intPreferredWidth);
resizeComponentWidth(this.jTextFieldDefaultValue, this.getWidth(), intPreferredWidth);
@ -805,14 +805,14 @@ public class SpdPcdDefs extends IInternalFrame implements TableModelListener{
*
* @return javax.swing.JCheckBox
*/
private JCheckBox getJCheckBox() {
if (jCheckBox == null) {
jCheckBox = new JCheckBox();
jCheckBox.setBounds(new java.awt.Rectangle(156,161,100,21));
jCheckBox.setText("Feature Flag");
jCheckBox.setPreferredSize(new java.awt.Dimension(21,20));
private JCheckBox getJCheckBoxFeatureFlag() {
if (jCheckBoxFeatureFlag == null) {
jCheckBoxFeatureFlag = new JCheckBox();
jCheckBoxFeatureFlag.setBounds(new java.awt.Rectangle(156,161,100,21));
jCheckBoxFeatureFlag.setText("Feature Flag");
jCheckBoxFeatureFlag.setPreferredSize(new java.awt.Dimension(21,20));
}
return jCheckBox;
return jCheckBoxFeatureFlag;
}
/**
@ -820,14 +820,14 @@ public class SpdPcdDefs extends IInternalFrame implements TableModelListener{
*
* @return javax.swing.JCheckBox
*/
private JCheckBox getJCheckBox1() {
if (jCheckBox1 == null) {
jCheckBox1 = new JCheckBox();
jCheckBox1.setBounds(new java.awt.Rectangle(312,133,108,20));
jCheckBox1.setText("Fixed at Build");
jCheckBox1.setPreferredSize(new java.awt.Dimension(21,20));
private JCheckBox getJCheckBoxFixedAtBuild() {
if (jCheckBoxFixedAtBuild == null) {
jCheckBoxFixedAtBuild = new JCheckBox();
jCheckBoxFixedAtBuild.setBounds(new java.awt.Rectangle(312,133,108,20));
jCheckBoxFixedAtBuild.setText("Fixed at Build");
jCheckBoxFixedAtBuild.setPreferredSize(new java.awt.Dimension(21,20));
}
return jCheckBox1;
return jCheckBoxFixedAtBuild;
}
/**
@ -835,14 +835,14 @@ public class SpdPcdDefs extends IInternalFrame implements TableModelListener{
*
* @return javax.swing.JCheckBox
*/
private JCheckBox getJCheckBox2() {
if (jCheckBox2 == null) {
jCheckBox2 = new JCheckBox();
jCheckBox2.setBounds(new java.awt.Rectangle(156,133,154,20));
jCheckBox2.setText("Patchable in Module");
jCheckBox2.setPreferredSize(new java.awt.Dimension(21,20));
private JCheckBox getJCheckBoxPatchInMod() {
if (jCheckBoxPatchInMod == null) {
jCheckBoxPatchInMod = new JCheckBox();
jCheckBoxPatchInMod.setBounds(new java.awt.Rectangle(156,133,154,20));
jCheckBoxPatchInMod.setText("Patchable in Module");
jCheckBoxPatchInMod.setPreferredSize(new java.awt.Dimension(21,20));
}
return jCheckBox2;
return jCheckBoxPatchInMod;
}
/**
@ -850,14 +850,14 @@ public class SpdPcdDefs extends IInternalFrame implements TableModelListener{
*
* @return javax.swing.JCheckBox
*/
private JCheckBox getJCheckBox3() {
if (jCheckBox3 == null) {
jCheckBox3 = new JCheckBox();
jCheckBox3.setBounds(new java.awt.Rectangle(278,161,80,20));
jCheckBox3.setText("Dynamic");
jCheckBox3.setPreferredSize(new java.awt.Dimension(21,20));
private JCheckBox getJCheckBoxDyn() {
if (jCheckBoxDyn == null) {
jCheckBoxDyn = new JCheckBox();
jCheckBoxDyn.setBounds(new java.awt.Rectangle(278,161,80,20));
jCheckBoxDyn.setText("Dynamic");
jCheckBoxDyn.setPreferredSize(new java.awt.Dimension(21,20));
}
return jCheckBox3;
return jCheckBoxDyn;
}
/**
@ -865,14 +865,14 @@ public class SpdPcdDefs extends IInternalFrame implements TableModelListener{
*
* @return javax.swing.JCheckBox
*/
private JCheckBox getJCheckBox4() {
if (jCheckBox4 == null) {
jCheckBox4 = new JCheckBox();
jCheckBox4.setBounds(new java.awt.Rectangle(371,161,99,20));
jCheckBox4.setText("DynamicEx");
jCheckBox4.setPreferredSize(new java.awt.Dimension(21,20));
private JCheckBox getJCheckBoxDynEx() {
if (jCheckBoxDynEx == null) {
jCheckBoxDynEx = new JCheckBox();
jCheckBoxDynEx.setBounds(new java.awt.Rectangle(371,161,99,20));
jCheckBoxDynEx.setText("DynamicEx");
jCheckBoxDynEx.setPreferredSize(new java.awt.Dimension(21,20));
}
return jCheckBox4;
return jCheckBoxDynEx;
}
private String getValidUsage(boolean ff, boolean fab, boolean pim, boolean d, boolean de) {
@ -930,14 +930,14 @@ public class SpdPcdDefs extends IInternalFrame implements TableModelListener{
*
* @return javax.swing.JScrollPane
*/
private JScrollPane getJScrollPane1() {
if (jScrollPane1 == null) {
jScrollPane1 = new JScrollPane();
jScrollPane1.setBounds(new java.awt.Rectangle(242,213,188,54));
jScrollPane1.setViewportView(getICheckBoxList());
jScrollPane1.setPreferredSize(new Dimension(188, 74));
private JScrollPane getJScrollPaneArch() {
if (jScrollPaneArch == null) {
jScrollPaneArch = new JScrollPane();
jScrollPaneArch.setBounds(new java.awt.Rectangle(242,213,188,54));
jScrollPaneArch.setViewportView(getICheckBoxListArch());
jScrollPaneArch.setPreferredSize(new Dimension(188, 74));
}
return jScrollPane1;
return jScrollPaneArch;
}
/**
@ -945,10 +945,10 @@ public class SpdPcdDefs extends IInternalFrame implements TableModelListener{
*
* @return org.tianocore.frameworkwizard.common.ui.iCheckBoxList.ICheckBoxList
*/
private ICheckBoxList getICheckBoxList() {
if (iCheckBoxList == null) {
iCheckBoxList = new ICheckBoxList();
iCheckBoxList.setBounds(new Rectangle(197, 142, 188, 74));
private ICheckBoxList getICheckBoxListArch() {
if (iCheckBoxListArch == null) {
iCheckBoxListArch = new ICheckBoxList();
iCheckBoxListArch.setBounds(new Rectangle(197, 142, 188, 74));
Vector<String> v = new Vector<String>();
v.add("IA32");
v.add("X64");
@ -956,9 +956,9 @@ public class SpdPcdDefs extends IInternalFrame implements TableModelListener{
v.add("EBC");
v.add("ARM");
v.add("PPC");
iCheckBoxList.setAllItems(v);
iCheckBoxListArch.setAllItems(v);
}
return iCheckBoxList;
return iCheckBoxListArch;
}
/**
@ -966,14 +966,14 @@ public class SpdPcdDefs extends IInternalFrame implements TableModelListener{
*
* @return javax.swing.JScrollPane
*/
private JScrollPane getJScrollPane2() {
if (jScrollPane2 == null) {
jScrollPane2 = new JScrollPane();
jScrollPane2.setBounds(new java.awt.Rectangle(15,213,199,55));
jScrollPane2.setViewportView(getICheckBoxList1());
jScrollPane2.setPreferredSize(new Dimension(170, 74));
private JScrollPane getJScrollPaneMod() {
if (jScrollPaneMod == null) {
jScrollPaneMod = new JScrollPane();
jScrollPaneMod.setBounds(new java.awt.Rectangle(15,213,199,55));
jScrollPaneMod.setViewportView(getICheckBoxListMod());
jScrollPaneMod.setPreferredSize(new Dimension(170, 74));
}
return jScrollPane2;
return jScrollPaneMod;
}
/**
@ -981,10 +981,10 @@ public class SpdPcdDefs extends IInternalFrame implements TableModelListener{
*
* @return org.tianocore.frameworkwizard.common.ui.iCheckBoxList.ICheckBoxList
*/
private ICheckBoxList getICheckBoxList1() {
if (iCheckBoxList1 == null) {
iCheckBoxList1 = new ICheckBoxList();
iCheckBoxList1.setBounds(new Rectangle(14, 142, 170, 74));
private ICheckBoxList getICheckBoxListMod() {
if (iCheckBoxListMod == null) {
iCheckBoxListMod = new ICheckBoxList();
iCheckBoxListMod.setBounds(new Rectangle(14, 142, 170, 74));
Vector<String> v = new Vector<String>();
v.add("BASE");
v.add("SEC");
@ -998,9 +998,9 @@ public class SpdPcdDefs extends IInternalFrame implements TableModelListener{
v.add("UEFI_DRIVER");
v.add("UEFI_APPLICATION");
v.add("USER_DEFINED");
iCheckBoxList1.setAllItems(v);
iCheckBoxListMod.setAllItems(v);
}
return iCheckBoxList1;
return iCheckBoxListMod;
}
protected String vectorToString(Vector<String> v) {

View File

@ -28,38 +28,38 @@ public class FpdDynamicPcdBuildDefinitions extends IInternalFrame {
*/
private static final long serialVersionUID = 1L;
private JPanel jContentPane = null;
private JPanel jPanel = null;
private JPanel jPanel1 = null;
private JPanel jPanel2 = null;
private JScrollPane jScrollPane = null;
private JTable jTable = null;
private DynPcdTableModel model = null;
private DynPcdTableModel model1 = null;
private JPanel jPanelContentNorth = null;
private JPanel jPanelContentCenter = null;
private JPanel jPanelContentSouth = null;
private JScrollPane jScrollPaneDynPcd = null;
private JTable jTableDynPcd = null;
private DynPcdTableModel modelPcd = null;
private DynPcdTableModel modelSku = null;
private FpdFileContents ffc = null;
private OpeningPlatformType docConsole = null;
private JPanel jPanel3 = null;
private JCheckBox jCheckBox = null;
private JPanel jPanel4 = null;
private JRadioButton jRadioButton = null;
private JRadioButton jRadioButton1 = null;
private JScrollPane jScrollPane1 = null;
private JTable jTable1 = null;
private JButton jButton = null;
private JLabel jLabel = null;
private JTextField jTextField = null;
private JLabel jLabel1 = null;
private JTextField jTextField1 = null;
private JLabel jLabel2 = null;
private JLabel jLabel3 = null;
private JTextField jTextField2 = null;
private JLabel jLabel4 = null;
private JTextField jTextField3 = null;
private JTextField jTextField4 = null;
private JLabel jLabel5 = null;
private JTextField jTextField5 = null;
private JRadioButton jRadioButton2 = null;
private JPanel jPanelSkuInfo = null;
private JCheckBox jCheckBoxSkuEnable = null;
private JPanel jPanelDynPcdValue = null;
private JRadioButton jRadioButtonHii = null;
private JRadioButton jRadioButtonVpd = null;
private JScrollPane jScrollPaneSkuInfo = null;
private JTable jTableSkuInfo = null;
private JButton jButtonSkuInfoUpdate = null;
private JLabel jLabelVarName = null;
private JTextField jTextFieldVarName = null;
private JLabel jLabelVarGuid = null;
private JTextField jTextFieldVarGuid = null;
private JLabel jLabelPad = null;
private JLabel jLabelVarOffset = null;
private JTextField jTextFieldVarOffset = null;
private JLabel jLabelHiiDefaultValue = null;
private JTextField jTextFieldHiiDefaultValue = null;
private JTextField jTextFieldVpdOffset = null;
private JLabel jLabelVpdOffset = null;
private JTextField jTextFieldDefaultValue = null;
private JRadioButton jRadioButtonDefaultValue = null;
private ButtonGroup bg = new ButtonGroup();
private JLabel jLabel6 = null;
private JLabel jLabelPadd = null;
/**
* This is the default constructor
*/
@ -85,13 +85,13 @@ public class FpdDynamicPcdBuildDefinitions extends IInternalFrame {
String[][] saa = new String[ffc.getDynamicPcdBuildDataCount()][5];
ffc.getDynamicPcdBuildData(saa);
for (int i = 0; i < saa.length; ++i) {
model.addRow(saa[i]);
modelPcd.addRow(saa[i]);
}
saa = new String[ffc.getPlatformDefsSkuInfoCount()][2];
ffc.getPlatformDefsSkuInfos(saa);
for (int i = 0; i < saa.length; ++i) {
model1.addRow(saa[i]);
modelSku.addRow(saa[i]);
}
}
@ -116,9 +116,9 @@ public class FpdDynamicPcdBuildDefinitions extends IInternalFrame {
if (jContentPane == null) {
jContentPane = new JPanel();
jContentPane.setLayout(new BorderLayout());
jContentPane.add(getJPanel(), java.awt.BorderLayout.NORTH);
jContentPane.add(getJPanel1(), java.awt.BorderLayout.CENTER);
jContentPane.add(getJPanel2(), java.awt.BorderLayout.SOUTH);
jContentPane.add(getJPanelContentNorth(), java.awt.BorderLayout.NORTH);
jContentPane.add(getJPanelContentCenter(), java.awt.BorderLayout.CENTER);
jContentPane.add(getJPanelContentSouth(), java.awt.BorderLayout.SOUTH);
}
return jContentPane;
}
@ -128,11 +128,11 @@ public class FpdDynamicPcdBuildDefinitions extends IInternalFrame {
*
* @return javax.swing.JPanel
*/
private JPanel getJPanel() {
if (jPanel == null) {
jPanel = new JPanel();
private JPanel getJPanelContentNorth() {
if (jPanelContentNorth == null) {
jPanelContentNorth = new JPanel();
}
return jPanel;
return jPanelContentNorth;
}
/**
@ -140,14 +140,14 @@ public class FpdDynamicPcdBuildDefinitions extends IInternalFrame {
*
* @return javax.swing.JPanel
*/
private JPanel getJPanel1() {
if (jPanel1 == null) {
jPanel1 = new JPanel();
jPanel1.add(getJScrollPane(), null);
jPanel1.add(getJPanel3(), null);
jPanel1.add(getJPanel4(), null);
private JPanel getJPanelContentCenter() {
if (jPanelContentCenter == null) {
jPanelContentCenter = new JPanel();
jPanelContentCenter.add(getJScrollPaneDynPcd(), null);
jPanelContentCenter.add(getJPanelSkuInfo(), null);
jPanelContentCenter.add(getJPanelDynPcdValue(), null);
}
return jPanel1;
return jPanelContentCenter;
}
/**
@ -155,11 +155,11 @@ public class FpdDynamicPcdBuildDefinitions extends IInternalFrame {
*
* @return javax.swing.JPanel
*/
private JPanel getJPanel2() {
if (jPanel2 == null) {
jPanel2 = new JPanel();
private JPanel getJPanelContentSouth() {
if (jPanelContentSouth == null) {
jPanelContentSouth = new JPanel();
}
return jPanel2;
return jPanelContentSouth;
}
/**
@ -167,13 +167,13 @@ public class FpdDynamicPcdBuildDefinitions extends IInternalFrame {
*
* @return javax.swing.JScrollPane
*/
private JScrollPane getJScrollPane() {
if (jScrollPane == null) {
jScrollPane = new JScrollPane();
jScrollPane.setPreferredSize(new java.awt.Dimension(600,200));
jScrollPane.setViewportView(getJTable());
private JScrollPane getJScrollPaneDynPcd() {
if (jScrollPaneDynPcd == null) {
jScrollPaneDynPcd = new JScrollPane();
jScrollPaneDynPcd.setPreferredSize(new java.awt.Dimension(600,200));
jScrollPaneDynPcd.setViewportView(getJTableDynPcd());
}
return jScrollPane;
return jScrollPaneDynPcd;
}
/**
@ -181,18 +181,18 @@ public class FpdDynamicPcdBuildDefinitions extends IInternalFrame {
*
* @return javax.swing.JTable
*/
private JTable getJTable() {
if (jTable == null) {
model = new DynPcdTableModel();
model.addColumn("CName");
model.addColumn("Token");
model.addColumn("TokenSpaceGuid");
model.addColumn("MaxDatumSize");
model.addColumn("DatumType");
jTable = new JTable(model);
jTable.setRowHeight(20);
jTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
jTable.getSelectionModel().addListSelectionListener(new ListSelectionListener(){
private JTable getJTableDynPcd() {
if (jTableDynPcd == null) {
modelPcd = new DynPcdTableModel();
modelPcd.addColumn("CName");
modelPcd.addColumn("Token");
modelPcd.addColumn("TokenSpaceGuid");
modelPcd.addColumn("MaxDatumSize");
modelPcd.addColumn("DatumType");
jTableDynPcd = new JTable(modelPcd);
jTableDynPcd.setRowHeight(20);
jTableDynPcd.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
jTableDynPcd.getSelectionModel().addListSelectionListener(new ListSelectionListener(){
public void valueChanged(ListSelectionEvent e) {
if (e.getValueIsAdjusting()){
return;
@ -209,57 +209,57 @@ public class FpdDynamicPcdBuildDefinitions extends IInternalFrame {
}
});
}
return jTable;
return jTableDynPcd;
}
//
// should display default sku info here, as no selection event of table1 will be triggered when change selection of rows in table.
//
private void displayDetails(int i) {
jTable1.changeSelection(0, 1, false, false);
jTableSkuInfo.changeSelection(0, 1, false, false);
int skuCount = ffc.getDynamicPcdSkuInfoCount(i);
String defaultVal = ffc.getDynamicPcdBuildDataValue(i);
if (defaultVal != null) {
jRadioButton2.setSelected(true);
jTextField5.setText(defaultVal);
jRadioButtonDefaultValue.setSelected(true);
jTextFieldDefaultValue.setText(defaultVal);
if ( skuCount == 1) {
jCheckBox.setSelected(false);
jCheckBoxSkuEnable.setSelected(false);
}
else{
jCheckBox.setSelected(true);
jCheckBoxSkuEnable.setSelected(true);
}
}
else if (ffc.getDynamicPcdBuildDataVpdOffset(i) != null) {
jRadioButton1.setSelected(true);
jTextField4.setText(ffc.getDynamicPcdBuildDataVpdOffset(i));
jRadioButtonVpd.setSelected(true);
jTextFieldVpdOffset.setText(ffc.getDynamicPcdBuildDataVpdOffset(i));
if (skuCount ==1) {
jCheckBox.setSelected(false);
jCheckBoxSkuEnable.setSelected(false);
}
else{
jCheckBox.setSelected(true);
jCheckBoxSkuEnable.setSelected(true);
}
}
else {
jRadioButton.setSelected(true);
jRadioButtonHii.setSelected(true);
String[][] saa = new String[ffc.getDynamicPcdSkuInfoCount(i)][7];
ffc.getDynamicPcdSkuInfos(i, saa);
jTextField.setText(saa[0][1]);
jTextField1.setText(saa[0][2]);
jTextField2.setText(saa[0][3]);
jTextField3.setText(saa[0][4]);
jTextFieldVarName.setText(saa[0][1]);
jTextFieldVarGuid.setText(saa[0][2]);
jTextFieldVarOffset.setText(saa[0][3]);
jTextFieldHiiDefaultValue.setText(saa[0][4]);
if (skuCount ==1) {
jCheckBox.setSelected(false);
jCheckBoxSkuEnable.setSelected(false);
}
else{
jCheckBox.setSelected(true);
jCheckBoxSkuEnable.setSelected(true);
}
}
}
private void displaySkuInfoDetails(int i) {
int pcdSelected = jTable.getSelectedRow();
int pcdSelected = jTableDynPcd.getSelectedRow();
if (pcdSelected < 0) {
return;
}
@ -268,21 +268,21 @@ public class FpdDynamicPcdBuildDefinitions extends IInternalFrame {
ffc.getDynamicPcdSkuInfos(pcdSelected, saa);
if (saa[i][5] != null){
jRadioButton1.setSelected(true);
jTextField4.setText(saa[i][5]);
jRadioButtonVpd.setSelected(true);
jTextFieldVpdOffset.setText(saa[i][5]);
}
else if (saa[i][1] != null) {
jRadioButton.setSelected(true);
jTextField.setText(saa[i][1]);
jTextField1.setText(saa[i][2]);
jTextField2.setText(saa[i][3]);
jTextField3.setText(saa[i][4]);
jRadioButtonHii.setSelected(true);
jTextFieldVarName.setText(saa[i][1]);
jTextFieldVarGuid.setText(saa[i][2]);
jTextFieldVarOffset.setText(saa[i][3]);
jTextFieldHiiDefaultValue.setText(saa[i][4]);
}
else{
jRadioButton2.setSelected(true);
jTextField5.setText(saa[i][6]);
jRadioButtonDefaultValue.setSelected(true);
jTextFieldDefaultValue.setText(saa[i][6]);
}
}
@ -292,19 +292,19 @@ public class FpdDynamicPcdBuildDefinitions extends IInternalFrame {
*
* @return javax.swing.JPanel
*/
private JPanel getJPanel3() {
if (jPanel3 == null) {
private JPanel getJPanelSkuInfo() {
if (jPanelSkuInfo == null) {
FlowLayout flowLayout = new FlowLayout();
flowLayout.setAlignment(java.awt.FlowLayout.LEFT);
jPanel3 = new JPanel();
jPanel3.setBorder(javax.swing.BorderFactory.createEtchedBorder(javax.swing.border.EtchedBorder.RAISED));
jPanel3.setLayout(flowLayout);
jPanel3.setPreferredSize(new java.awt.Dimension(600,100));
jPanel3.add(getJCheckBox(), null);
jPanel3.add(getJScrollPane1(), null);
jPanel3.add(getJButton(), null);
jPanelSkuInfo = new JPanel();
jPanelSkuInfo.setBorder(javax.swing.BorderFactory.createEtchedBorder(javax.swing.border.EtchedBorder.RAISED));
jPanelSkuInfo.setLayout(flowLayout);
jPanelSkuInfo.setPreferredSize(new java.awt.Dimension(600,100));
jPanelSkuInfo.add(getJCheckBoxSkuEnable(), null);
jPanelSkuInfo.add(getJScrollPaneSkuInfo(), null);
jPanelSkuInfo.add(getJButtonSkuInfoUpdate(), null);
}
return jPanel3;
return jPanelSkuInfo;
}
/**
@ -312,17 +312,17 @@ public class FpdDynamicPcdBuildDefinitions extends IInternalFrame {
*
* @return javax.swing.JCheckBox
*/
private JCheckBox getJCheckBox() {
if (jCheckBox == null) {
jCheckBox = new JCheckBox();
jCheckBox.setText("SKU Enable");
jCheckBox.addItemListener(new java.awt.event.ItemListener() {
private JCheckBox getJCheckBoxSkuEnable() {
if (jCheckBoxSkuEnable == null) {
jCheckBoxSkuEnable = new JCheckBox();
jCheckBoxSkuEnable.setText("SKU Enable");
jCheckBoxSkuEnable.addItemListener(new java.awt.event.ItemListener() {
public void itemStateChanged(java.awt.event.ItemEvent e) {
jTable1.setEnabled(jCheckBox.isSelected());
jTableSkuInfo.setEnabled(jCheckBoxSkuEnable.isSelected());
}
});
}
return jCheckBox;
return jCheckBoxSkuEnable;
}
@ -331,60 +331,60 @@ public class FpdDynamicPcdBuildDefinitions extends IInternalFrame {
*
* @return javax.swing.JPanel
*/
private JPanel getJPanel4() {
if (jPanel4 == null) {
jLabel5 = new JLabel();
jLabel5.setPreferredSize(new java.awt.Dimension(80,20));
jLabel5.setText("VPD Offset");
jLabel4 = new JLabel();
jLabel4.setPreferredSize(new java.awt.Dimension(100,20));
jLabel4.setText("HII Default Value");
jLabel3 = new JLabel();
jLabel3.setText("Variable Offset");
jLabel3.setPreferredSize(new java.awt.Dimension(90,20));
jLabel2 = new JLabel();
jLabel2.setText(" ");
jLabel1 = new JLabel();
jLabel1.setText("Variable GUID");
jLabel1.setPreferredSize(new java.awt.Dimension(100,20));
jLabel = new JLabel();
jLabel.setText("Variable Name");
jLabel.setToolTipText("");
jLabel.setPreferredSize(new java.awt.Dimension(90,20));
private JPanel getJPanelDynPcdValue() {
if (jPanelDynPcdValue == null) {
jLabelVpdOffset = new JLabel();
jLabelVpdOffset.setPreferredSize(new java.awt.Dimension(80,20));
jLabelVpdOffset.setText("VPD Offset");
jLabelHiiDefaultValue = new JLabel();
jLabelHiiDefaultValue.setPreferredSize(new java.awt.Dimension(100,20));
jLabelHiiDefaultValue.setText("HII Default Value");
jLabelVarOffset = new JLabel();
jLabelVarOffset.setText("Variable Offset");
jLabelVarOffset.setPreferredSize(new java.awt.Dimension(90,20));
jLabelPad = new JLabel();
jLabelPad.setText(" ");
jLabelVarGuid = new JLabel();
jLabelVarGuid.setText("Variable GUID");
jLabelVarGuid.setPreferredSize(new java.awt.Dimension(100,20));
jLabelVarName = new JLabel();
jLabelVarName.setText("Variable Name");
jLabelVarName.setToolTipText("");
jLabelVarName.setPreferredSize(new java.awt.Dimension(90,20));
FlowLayout flowLayout1 = new FlowLayout();
flowLayout1.setAlignment(java.awt.FlowLayout.LEFT);
jPanel4 = new JPanel();
jPanel4.setBorder(javax.swing.BorderFactory.createEtchedBorder(javax.swing.border.EtchedBorder.LOWERED));
jPanel4.setLayout(flowLayout1);
jPanel4.setPreferredSize(new java.awt.Dimension(600,120));
jPanel4.add(getJRadioButton(), null);
jPanel4.add(jLabel, null);
jPanel4.add(getJTextField(), null);
jPanel4.add(jLabel1, null);
jPanel4.add(getJTextField1(), null);
jPanel4.add(jLabel2, null);
jPanel4.add(jLabel3, null);
jPanel4.add(getJTextField2(), null);
jPanel4.add(jLabel4, null);
jPanel4.add(getJTextField3(), null);
jPanel4.add(getJRadioButton1(), null);
jPanel4.add(jLabel5, null);
jPanel4.add(getJTextField4(), null);
jLabel6 = new JLabel();
jLabel6.setText(" ");
jPanel4.add(jLabel6, null);
jLabel.setEnabled(false);
jLabel1.setEnabled(false);
jLabel4.setEnabled(false);
jLabel3.setEnabled(false);
jLabel5.setEnabled(false);
jPanel4.add(getJRadioButton2(), null);
jPanel4.add(getJTextField5(), null);
bg.add(jRadioButton);
bg.add(jRadioButton1);
jPanelDynPcdValue = new JPanel();
jPanelDynPcdValue.setBorder(javax.swing.BorderFactory.createEtchedBorder(javax.swing.border.EtchedBorder.LOWERED));
jPanelDynPcdValue.setLayout(flowLayout1);
jPanelDynPcdValue.setPreferredSize(new java.awt.Dimension(600,120));
jPanelDynPcdValue.add(getJRadioButtonHii(), null);
jPanelDynPcdValue.add(jLabelVarName, null);
jPanelDynPcdValue.add(getJTextFieldVarName(), null);
jPanelDynPcdValue.add(jLabelVarGuid, null);
jPanelDynPcdValue.add(getJTextFieldVarGuid(), null);
jPanelDynPcdValue.add(jLabelPad, null);
jPanelDynPcdValue.add(jLabelVarOffset, null);
jPanelDynPcdValue.add(getJTextFieldVarOffset(), null);
jPanelDynPcdValue.add(jLabelHiiDefaultValue, null);
jPanelDynPcdValue.add(getJTextFieldHiiDefaultValue(), null);
jPanelDynPcdValue.add(getJRadioButtonVpd(), null);
jPanelDynPcdValue.add(jLabelVpdOffset, null);
jPanelDynPcdValue.add(getJTextFieldVpdOffset(), null);
jLabelPadd = new JLabel();
jLabelPadd.setText(" ");
jPanelDynPcdValue.add(jLabelPadd, null);
jLabelVarName.setEnabled(false);
jLabelVarGuid.setEnabled(false);
jLabelHiiDefaultValue.setEnabled(false);
jLabelVarOffset.setEnabled(false);
jLabelVpdOffset.setEnabled(false);
jPanelDynPcdValue.add(getJRadioButtonDefaultValue(), null);
jPanelDynPcdValue.add(getJTextFieldDefaultValue(), null);
bg.add(jRadioButtonHii);
bg.add(jRadioButtonVpd);
}
return jPanel4;
return jPanelDynPcdValue;
}
/**
@ -392,26 +392,26 @@ public class FpdDynamicPcdBuildDefinitions extends IInternalFrame {
*
* @return javax.swing.JRadioButton
*/
private JRadioButton getJRadioButton() {
if (jRadioButton == null) {
jRadioButton = new JRadioButton();
jRadioButton.setText("HII Enable");
jRadioButton.addItemListener(new java.awt.event.ItemListener() {
private JRadioButton getJRadioButtonHii() {
if (jRadioButtonHii == null) {
jRadioButtonHii = new JRadioButton();
jRadioButtonHii.setText("HII Enable");
jRadioButtonHii.addItemListener(new java.awt.event.ItemListener() {
public void itemStateChanged(java.awt.event.ItemEvent e) {
boolean selected = jRadioButton.isSelected();
jLabel.setEnabled(selected);
jLabel1.setEnabled(selected);
jLabel2.setEnabled(selected);
jLabel3.setEnabled(selected);
jLabel4.setEnabled(selected);
jTextField.setEnabled(selected);
jTextField1.setEnabled(selected);
jTextField2.setEnabled(selected);
jTextField3.setEnabled(selected);
boolean selected = jRadioButtonHii.isSelected();
jLabelVarName.setEnabled(selected);
jLabelVarGuid.setEnabled(selected);
jLabelPad.setEnabled(selected);
jLabelVarOffset.setEnabled(selected);
jLabelHiiDefaultValue.setEnabled(selected);
jTextFieldVarName.setEnabled(selected);
jTextFieldVarGuid.setEnabled(selected);
jTextFieldVarOffset.setEnabled(selected);
jTextFieldHiiDefaultValue.setEnabled(selected);
}
});
}
return jRadioButton;
return jRadioButtonHii;
}
/**
@ -419,19 +419,19 @@ public class FpdDynamicPcdBuildDefinitions extends IInternalFrame {
*
* @return javax.swing.JRadioButton
*/
private JRadioButton getJRadioButton1() {
if (jRadioButton1 == null) {
jRadioButton1 = new JRadioButton();
jRadioButton1.setText("VPD Enable");
jRadioButton1.addItemListener(new java.awt.event.ItemListener() {
private JRadioButton getJRadioButtonVpd() {
if (jRadioButtonVpd == null) {
jRadioButtonVpd = new JRadioButton();
jRadioButtonVpd.setText("VPD Enable");
jRadioButtonVpd.addItemListener(new java.awt.event.ItemListener() {
public void itemStateChanged(java.awt.event.ItemEvent e) {
boolean selected = jRadioButton1.isSelected();
jTextField4.setEnabled(selected);
jLabel5.setEnabled(selected);
boolean selected = jRadioButtonVpd.isSelected();
jTextFieldVpdOffset.setEnabled(selected);
jLabelVpdOffset.setEnabled(selected);
}
});
}
return jRadioButton1;
return jRadioButtonVpd;
}
/**
@ -439,13 +439,13 @@ public class FpdDynamicPcdBuildDefinitions extends IInternalFrame {
*
* @return javax.swing.JScrollPane
*/
private JScrollPane getJScrollPane1() {
if (jScrollPane1 == null) {
jScrollPane1 = new JScrollPane();
jScrollPane1.setPreferredSize(new java.awt.Dimension(300,80));
jScrollPane1.setViewportView(getJTable1());
private JScrollPane getJScrollPaneSkuInfo() {
if (jScrollPaneSkuInfo == null) {
jScrollPaneSkuInfo = new JScrollPane();
jScrollPaneSkuInfo.setPreferredSize(new java.awt.Dimension(300,80));
jScrollPaneSkuInfo.setViewportView(getJTableSkuInfo());
}
return jScrollPane1;
return jScrollPaneSkuInfo;
}
/**
@ -453,17 +453,17 @@ public class FpdDynamicPcdBuildDefinitions extends IInternalFrame {
*
* @return javax.swing.JTable
*/
private JTable getJTable1() {
if (jTable1 == null) {
model1 = new DynPcdTableModel();
jTable1 = new JTable(model1);
model1.addColumn("SKU ID");
model1.addColumn("SKU Name");
private JTable getJTableSkuInfo() {
if (jTableSkuInfo == null) {
modelSku = new DynPcdTableModel();
jTableSkuInfo = new JTable(modelSku);
modelSku.addColumn("SKU ID");
modelSku.addColumn("SKU Name");
jTable1.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
jTable1.getSelectionModel().addListSelectionListener(new ListSelectionListener(){
jTableSkuInfo.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
jTableSkuInfo.getSelectionModel().addListSelectionListener(new ListSelectionListener(){
public void valueChanged(ListSelectionEvent e) {
if (jTable.getSelectedRow() < 0) {
if (jTableDynPcd.getSelectedRow() < 0) {
return;
}
if (e.getValueIsAdjusting()){
@ -480,7 +480,7 @@ public class FpdDynamicPcdBuildDefinitions extends IInternalFrame {
}
});
}
return jTable1;
return jTableSkuInfo;
}
/**
@ -488,14 +488,14 @@ public class FpdDynamicPcdBuildDefinitions extends IInternalFrame {
*
* @return javax.swing.JButton
*/
private JButton getJButton() {
if (jButton == null) {
jButton = new JButton();
jButton.setPreferredSize(new java.awt.Dimension(180,20));
jButton.setText(" Update SKU Information");
jButton.addActionListener(new java.awt.event.ActionListener() {
private JButton getJButtonSkuInfoUpdate() {
if (jButtonSkuInfoUpdate == null) {
jButtonSkuInfoUpdate = new JButton();
jButtonSkuInfoUpdate.setPreferredSize(new java.awt.Dimension(180,20));
jButtonSkuInfoUpdate.setText(" Update SKU Information");
jButtonSkuInfoUpdate.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
int pcdSelected = jTable.getSelectedRow();
int pcdSelected = jTableDynPcd.getSelectedRow();
if (pcdSelected < 0) {
return;
}
@ -505,7 +505,7 @@ public class FpdDynamicPcdBuildDefinitions extends IInternalFrame {
}
});
}
return jButton;
return jButtonSkuInfoUpdate;
}
private void updateSkuInfo (int pcdSelected) {
@ -517,28 +517,28 @@ public class FpdDynamicPcdBuildDefinitions extends IInternalFrame {
String hiiDefault = null;
String value = null;
String vpdOffset = null;
if (jRadioButton.isSelected()) {
varName = jTextField.getText();
varGuid = jTextField1.getText();
varOffset = jTextField2.getText();
hiiDefault = jTextField3.getText();
if (jRadioButtonHii.isSelected()) {
varName = jTextFieldVarName.getText();
varGuid = jTextFieldVarGuid.getText();
varOffset = jTextFieldVarOffset.getText();
hiiDefault = jTextFieldHiiDefaultValue.getText();
}
if (jRadioButton1.isSelected()) {
vpdOffset = jTextField4.getText();
if (jRadioButtonVpd.isSelected()) {
vpdOffset = jTextFieldVpdOffset.getText();
}
if (jRadioButton2.isSelected()) {
value = jTextField5.getText();
if (jRadioButtonDefaultValue.isSelected()) {
value = jTextFieldDefaultValue.getText();
}
//
// SKU disabled. only modify data for default SKU.
//
if (!jCheckBox.isSelected()) {
if (!jCheckBoxSkuEnable.isSelected()) {
if (true) {
ffc.removeDynamicPcdBuildDataSkuInfo(pcdSelected);
if (jRadioButton.isSelected()) {
if (jRadioButtonHii.isSelected()) {
ffc.genDynamicPcdBuildDataSkuInfo("0", varName, varGuid, varOffset, hiiDefault, null, null, pcdSelected);
}
else if (jRadioButton1.isSelected()){
else if (jRadioButtonVpd.isSelected()){
ffc.genDynamicPcdBuildDataSkuInfo("0", null, null, null, null, vpdOffset, null, pcdSelected);
}
else{
@ -549,19 +549,19 @@ public class FpdDynamicPcdBuildDefinitions extends IInternalFrame {
//
// SKU Enabled, need add data to all SKUs.
//
if (jCheckBox.isSelected()) {
if (jCheckBoxSkuEnable.isSelected()) {
if (skuCount == 1) {
for (int i = 1; i < jTable1.getRowCount(); ++i) {
ffc.genDynamicPcdBuildDataSkuInfo(jTable1.getValueAt(i, 0)+"", varName, varGuid, varOffset, hiiDefault, vpdOffset, value, pcdSelected);
for (int i = 1; i < jTableSkuInfo.getRowCount(); ++i) {
ffc.genDynamicPcdBuildDataSkuInfo(jTableSkuInfo.getValueAt(i, 0)+"", varName, varGuid, varOffset, hiiDefault, vpdOffset, value, pcdSelected);
}
}
else {
int row = jTable1.getSelectedRow();
int row = jTableSkuInfo.getSelectedRow();
if (row < 0) {
return;
}
ffc.updateDynamicPcdBuildDataSkuInfo(jTable1.getValueAt(row, 0)+"", varName, varGuid, varOffset, hiiDefault, vpdOffset, value, pcdSelected);
ffc.updateDynamicPcdBuildDataSkuInfo(jTableSkuInfo.getValueAt(row, 0)+"", varName, varGuid, varOffset, hiiDefault, vpdOffset, value, pcdSelected);
}
}
}
@ -570,13 +570,13 @@ public class FpdDynamicPcdBuildDefinitions extends IInternalFrame {
*
* @return javax.swing.JTextField
*/
private JTextField getJTextField() {
if (jTextField == null) {
jTextField = new JTextField();
jTextField.setPreferredSize(new java.awt.Dimension(150,20));
jTextField.setEnabled(false);
private JTextField getJTextFieldVarName() {
if (jTextFieldVarName == null) {
jTextFieldVarName = new JTextField();
jTextFieldVarName.setPreferredSize(new java.awt.Dimension(150,20));
jTextFieldVarName.setEnabled(false);
}
return jTextField;
return jTextFieldVarName;
}
/**
@ -584,13 +584,13 @@ public class FpdDynamicPcdBuildDefinitions extends IInternalFrame {
*
* @return javax.swing.JTextField
*/
private JTextField getJTextField1() {
if (jTextField1 == null) {
jTextField1 = new JTextField();
jTextField1.setPreferredSize(new java.awt.Dimension(150,20));
jTextField1.setEnabled(false);
private JTextField getJTextFieldVarGuid() {
if (jTextFieldVarGuid == null) {
jTextFieldVarGuid = new JTextField();
jTextFieldVarGuid.setPreferredSize(new java.awt.Dimension(150,20));
jTextFieldVarGuid.setEnabled(false);
}
return jTextField1;
return jTextFieldVarGuid;
}
/**
@ -598,13 +598,13 @@ public class FpdDynamicPcdBuildDefinitions extends IInternalFrame {
*
* @return javax.swing.JTextField
*/
private JTextField getJTextField2() {
if (jTextField2 == null) {
jTextField2 = new JTextField();
jTextField2.setPreferredSize(new java.awt.Dimension(150,20));
jTextField2.setEnabled(false);
private JTextField getJTextFieldVarOffset() {
if (jTextFieldVarOffset == null) {
jTextFieldVarOffset = new JTextField();
jTextFieldVarOffset.setPreferredSize(new java.awt.Dimension(150,20));
jTextFieldVarOffset.setEnabled(false);
}
return jTextField2;
return jTextFieldVarOffset;
}
/**
@ -612,13 +612,13 @@ public class FpdDynamicPcdBuildDefinitions extends IInternalFrame {
*
* @return javax.swing.JTextField
*/
private JTextField getJTextField3() {
if (jTextField3 == null) {
jTextField3 = new JTextField();
jTextField3.setPreferredSize(new java.awt.Dimension(150,20));
jTextField3.setEnabled(false);
private JTextField getJTextFieldHiiDefaultValue() {
if (jTextFieldHiiDefaultValue == null) {
jTextFieldHiiDefaultValue = new JTextField();
jTextFieldHiiDefaultValue.setPreferredSize(new java.awt.Dimension(150,20));
jTextFieldHiiDefaultValue.setEnabled(false);
}
return jTextField3;
return jTextFieldHiiDefaultValue;
}
/**
@ -626,13 +626,13 @@ public class FpdDynamicPcdBuildDefinitions extends IInternalFrame {
*
* @return javax.swing.JTextField
*/
private JTextField getJTextField4() {
if (jTextField4 == null) {
jTextField4 = new JTextField();
jTextField4.setPreferredSize(new java.awt.Dimension(150,20));
jTextField4.setEnabled(false);
private JTextField getJTextFieldVpdOffset() {
if (jTextFieldVpdOffset == null) {
jTextFieldVpdOffset = new JTextField();
jTextFieldVpdOffset.setPreferredSize(new java.awt.Dimension(150,20));
jTextFieldVpdOffset.setEnabled(false);
}
return jTextField4;
return jTextFieldVpdOffset;
}
/**
@ -640,12 +640,12 @@ public class FpdDynamicPcdBuildDefinitions extends IInternalFrame {
*
* @return javax.swing.JTextField
*/
private JTextField getJTextField5() {
if (jTextField5 == null) {
jTextField5 = new JTextField();
jTextField5.setPreferredSize(new java.awt.Dimension(150,20));
private JTextField getJTextFieldDefaultValue() {
if (jTextFieldDefaultValue == null) {
jTextFieldDefaultValue = new JTextField();
jTextFieldDefaultValue.setPreferredSize(new java.awt.Dimension(150,20));
}
return jTextField5;
return jTextFieldDefaultValue;
}
/**
@ -653,20 +653,20 @@ public class FpdDynamicPcdBuildDefinitions extends IInternalFrame {
*
* @return javax.swing.JRadioButton
*/
private JRadioButton getJRadioButton2() {
if (jRadioButton2 == null) {
jRadioButton2 = new JRadioButton();
jRadioButton2.setText("Default PCD Value");
jRadioButton2.setSelected(true);
jRadioButton2.setPreferredSize(new java.awt.Dimension(175,20));
jRadioButton2.addItemListener(new java.awt.event.ItemListener() {
private JRadioButton getJRadioButtonDefaultValue() {
if (jRadioButtonDefaultValue == null) {
jRadioButtonDefaultValue = new JRadioButton();
jRadioButtonDefaultValue.setText("Default PCD Value");
jRadioButtonDefaultValue.setSelected(true);
jRadioButtonDefaultValue.setPreferredSize(new java.awt.Dimension(175,20));
jRadioButtonDefaultValue.addItemListener(new java.awt.event.ItemListener() {
public void itemStateChanged(java.awt.event.ItemEvent e) {
jTextField5.setEnabled(jRadioButton2.isSelected());
jTextFieldDefaultValue.setEnabled(jRadioButtonDefaultValue.isSelected());
}
});
bg.add(jRadioButton2);
bg.add(jRadioButtonDefaultValue);
}
return jRadioButton2;
return jRadioButtonDefaultValue;
}
} // @jve:decl-index=0:visual-constraint="10,10"

View File

@ -2465,7 +2465,7 @@ class PcdItemTypeConflictException extends Exception {
private String details = null;
PcdItemTypeConflictException(String info){
details = info;
details = "ItemTypeConflict: " + info;
}
public String getMessage() {
@ -2482,7 +2482,7 @@ class PcdDeclNotFound extends Exception {
private String details = null;
PcdDeclNotFound(String info) {
details = info;
details = "PcdDeclNotFound: " + info;
}
public String getMessage() {
@ -2499,7 +2499,7 @@ class PcdValueMalFormed extends Exception {
private String details = null;
PcdValueMalFormed(String info) {
details = info;
details = "PcdValueMalFormed: " + info;
}
public String getMessage() {

View File

@ -37,21 +37,21 @@ public class FpdFrameworkModules extends IInternalFrame {
private static final long serialVersionUID = 1L;
static JFrame frame;
private JSplitPane jSplitPane = null;
private JPanel jPanel = null;
private JPanel jPanel1 = null;
private JPanel jPanelTop = null;
private JPanel jPanelBottom = null;
private JLabel jLabel = null;
private JScrollPane jScrollPane = null;
private JTable jTable = null;
private JPanel jPanel2 = null;
private JButton jButton = null;
private JLabel jLabel1 = null;
private JPanel jPanel3 = null;
private JScrollPane jScrollPane1 = null;
private JTable jTable1 = null;
private JButton jButton1 = null;
private JButton jButton2 = null;
private NonEditableTableModel model = null;
private NonEditableTableModel model1 = null;
private JScrollPane jScrollPaneAllModules = null;
private JTable jTableAllModules = null;
private JPanel jPanelTopSouth = null;
private JButton jButtonAddModule = null;
private JLabel jLabelModulesAdded = null;
private JPanel jPanelBottomSouth = null;
private JScrollPane jScrollPaneFpdModules = null;
private JTable jTableFpdModules = null;
private JButton jButtonSettings = null;
private JButton jButtonRemoveModule = null;
private NonEditableTableModel modelAllModules = null;
private NonEditableTableModel modelFpdModules = null;
private FpdModuleSA settingDlg = null;
@ -71,8 +71,8 @@ public class FpdFrameworkModules extends IInternalFrame {
jSplitPane = new JSplitPane();
jSplitPane.setOrientation(javax.swing.JSplitPane.VERTICAL_SPLIT);
jSplitPane.setDividerLocation(250);
jSplitPane.setBottomComponent(getJPanel1());
jSplitPane.setTopComponent(getJPanel());
jSplitPane.setBottomComponent(getJPanelBottom());
jSplitPane.setTopComponent(getJPanelTop());
}
return jSplitPane;
}
@ -82,17 +82,17 @@ public class FpdFrameworkModules extends IInternalFrame {
*
* @return javax.swing.JPanel
*/
private JPanel getJPanel() {
if (jPanel == null) {
private JPanel getJPanelTop() {
if (jPanelTop == null) {
jLabel = new JLabel();
jLabel.setText("Modules in Workspace");
jPanel = new JPanel();
jPanel.setLayout(new BorderLayout());
jPanel.add(jLabel, java.awt.BorderLayout.NORTH);
jPanel.add(getJScrollPane(), java.awt.BorderLayout.CENTER);
jPanel.add(getJPanel2(), java.awt.BorderLayout.SOUTH);
jPanelTop = new JPanel();
jPanelTop.setLayout(new BorderLayout());
jPanelTop.add(jLabel, java.awt.BorderLayout.NORTH);
jPanelTop.add(getJScrollPaneAllModules(), java.awt.BorderLayout.CENTER);
jPanelTop.add(getJPanelTopSouth(), java.awt.BorderLayout.SOUTH);
}
return jPanel;
return jPanelTop;
}
/**
@ -100,17 +100,17 @@ public class FpdFrameworkModules extends IInternalFrame {
*
* @return javax.swing.JPanel
*/
private JPanel getJPanel1() {
if (jPanel1 == null) {
jLabel1 = new JLabel();
jLabel1.setText("Modules Added");
jPanel1 = new JPanel();
jPanel1.setLayout(new BorderLayout());
jPanel1.add(jLabel1, java.awt.BorderLayout.NORTH);
jPanel1.add(getJPanel3(), java.awt.BorderLayout.SOUTH);
jPanel1.add(getJScrollPane1(), java.awt.BorderLayout.CENTER);
private JPanel getJPanelBottom() {
if (jPanelBottom == null) {
jLabelModulesAdded = new JLabel();
jLabelModulesAdded.setText("Modules Added");
jPanelBottom = new JPanel();
jPanelBottom.setLayout(new BorderLayout());
jPanelBottom.add(jLabelModulesAdded, java.awt.BorderLayout.NORTH);
jPanelBottom.add(getJPanelBottomSouth(), java.awt.BorderLayout.SOUTH);
jPanelBottom.add(getJScrollPaneFpdModules(), java.awt.BorderLayout.CENTER);
}
return jPanel1;
return jPanelBottom;
}
/**
@ -118,13 +118,13 @@ public class FpdFrameworkModules extends IInternalFrame {
*
* @return javax.swing.JScrollPane
*/
private JScrollPane getJScrollPane() {
if (jScrollPane == null) {
jScrollPane = new JScrollPane();
jScrollPane.setPreferredSize(new java.awt.Dimension(600,200));
jScrollPane.setViewportView(getJTable());
private JScrollPane getJScrollPaneAllModules() {
if (jScrollPaneAllModules == null) {
jScrollPaneAllModules = new JScrollPane();
jScrollPaneAllModules.setPreferredSize(new java.awt.Dimension(600,200));
jScrollPaneAllModules.setViewportView(getJTableAllModules());
}
return jScrollPane;
return jScrollPaneAllModules;
}
/**
@ -132,20 +132,20 @@ public class FpdFrameworkModules extends IInternalFrame {
*
* @return javax.swing.JTable
*/
private JTable getJTable() {
if (jTable == null) {
model = new NonEditableTableModel();
jTable = new JTable(model);
jTable.setRowHeight(20);
model.addColumn("ModuleName");
model.addColumn("ModuleVersion");
model.addColumn("PackageName");
model.addColumn("PackageVersion");
model.addColumn("Path");
private JTable getJTableAllModules() {
if (jTableAllModules == null) {
modelAllModules = new NonEditableTableModel();
jTableAllModules = new JTable(modelAllModules);
jTableAllModules.setRowHeight(20);
modelAllModules.addColumn("ModuleName");
modelAllModules.addColumn("ModuleVersion");
modelAllModules.addColumn("PackageName");
modelAllModules.addColumn("PackageVersion");
modelAllModules.addColumn("Path");
jTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
jTableAllModules.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
}
return jTable;
return jTableAllModules;
}
/**
@ -153,15 +153,15 @@ public class FpdFrameworkModules extends IInternalFrame {
*
* @return javax.swing.JPanel
*/
private JPanel getJPanel2() {
if (jPanel2 == null) {
private JPanel getJPanelTopSouth() {
if (jPanelTopSouth == null) {
FlowLayout flowLayout = new FlowLayout();
flowLayout.setAlignment(java.awt.FlowLayout.RIGHT);
jPanel2 = new JPanel();
jPanel2.setLayout(flowLayout);
jPanel2.add(getJButton(), null);
jPanelTopSouth = new JPanel();
jPanelTopSouth.setLayout(flowLayout);
jPanelTopSouth.add(getJButtonAddModule(), null);
}
return jPanel2;
return jPanelTopSouth;
}
/**
@ -169,19 +169,19 @@ public class FpdFrameworkModules extends IInternalFrame {
*
* @return javax.swing.JButton
*/
private JButton getJButton() {
if (jButton == null) {
jButton = new JButton();
jButton.setPreferredSize(new java.awt.Dimension(130,20));
jButton.setText("Add a Module");
jButton.addActionListener(new java.awt.event.ActionListener() {
private JButton getJButtonAddModule() {
if (jButtonAddModule == null) {
jButtonAddModule = new JButton();
jButtonAddModule.setPreferredSize(new java.awt.Dimension(130,20));
jButtonAddModule.setText("Add a Module");
jButtonAddModule.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
int selectedRow = jTable.getSelectedRow();
int selectedRow = jTableAllModules.getSelectedRow();
if (selectedRow < 0){
return;
}
String path = model.getValueAt(selectedRow, 4)+"";
String path = modelAllModules.getValueAt(selectedRow, 4)+"";
ModuleIdentification mi = miList.get(selectedRow);
Vector<String> vArchs = null;
try {
@ -229,7 +229,7 @@ public class FpdFrameworkModules extends IInternalFrame {
row[2] = mi.getPackage().getName();
}
model1.addRow(row);
modelFpdModules.addRow(row);
docConsole.setSaved(false);
try{
@ -243,11 +243,11 @@ public class FpdFrameworkModules extends IInternalFrame {
JOptionPane.showMessageDialog(frame, "This Module with Arch "+ archsAdded +" Added Successfully.");
jTable1.changeSelection(model1.getRowCount()-1, 0, false, false);
jTableFpdModules.changeSelection(modelFpdModules.getRowCount()-1, 0, false, false);
}
});
}
return jButton;
return jButtonAddModule;
}
/**
@ -255,16 +255,16 @@ public class FpdFrameworkModules extends IInternalFrame {
*
* @return javax.swing.JPanel
*/
private JPanel getJPanel3() {
if (jPanel3 == null) {
private JPanel getJPanelBottomSouth() {
if (jPanelBottomSouth == null) {
FlowLayout flowLayout1 = new FlowLayout();
flowLayout1.setAlignment(java.awt.FlowLayout.RIGHT);
jPanel3 = new JPanel();
jPanel3.setLayout(flowLayout1);
jPanel3.add(getJButton1(), null);
jPanel3.add(getJButton2(), null);
jPanelBottomSouth = new JPanel();
jPanelBottomSouth.setLayout(flowLayout1);
jPanelBottomSouth.add(getJButtonSettings(), null);
jPanelBottomSouth.add(getJButtonRemoveModule(), null);
}
return jPanel3;
return jPanelBottomSouth;
}
/**
@ -272,13 +272,13 @@ public class FpdFrameworkModules extends IInternalFrame {
*
* @return javax.swing.JScrollPane
*/
private JScrollPane getJScrollPane1() {
if (jScrollPane1 == null) {
jScrollPane1 = new JScrollPane();
jScrollPane1.setPreferredSize(new java.awt.Dimension(453,200));
jScrollPane1.setViewportView(getJTable1());
private JScrollPane getJScrollPaneFpdModules() {
if (jScrollPaneFpdModules == null) {
jScrollPaneFpdModules = new JScrollPane();
jScrollPaneFpdModules.setPreferredSize(new java.awt.Dimension(453,200));
jScrollPaneFpdModules.setViewportView(getJTableFpdModules());
}
return jScrollPane1;
return jScrollPaneFpdModules;
}
/**
@ -286,21 +286,21 @@ public class FpdFrameworkModules extends IInternalFrame {
*
* @return javax.swing.JTable
*/
private JTable getJTable1() {
if (jTable1 == null) {
model1 = new NonEditableTableModel();
jTable1 = new JTable(model1);
jTable1.setRowHeight(20);
model1.addColumn("ModuleName");
model1.addColumn("ModuleVersion");
model1.addColumn("PackageName");
model1.addColumn("PackageVersion");
model1.addColumn("SupportedArch");
model1.addColumn("Path");
private JTable getJTableFpdModules() {
if (jTableFpdModules == null) {
modelFpdModules = new NonEditableTableModel();
jTableFpdModules = new JTable(modelFpdModules);
jTableFpdModules.setRowHeight(20);
modelFpdModules.addColumn("ModuleName");
modelFpdModules.addColumn("ModuleVersion");
modelFpdModules.addColumn("PackageName");
modelFpdModules.addColumn("PackageVersion");
modelFpdModules.addColumn("SupportedArch");
modelFpdModules.addColumn("Path");
jTable1.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
jTableFpdModules.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
}
return jTable1;
return jTableFpdModules;
}
/**
@ -308,14 +308,14 @@ public class FpdFrameworkModules extends IInternalFrame {
*
* @return javax.swing.JButton
*/
private JButton getJButton1() {
if (jButton1 == null) {
jButton1 = new JButton();
jButton1.setPreferredSize(new java.awt.Dimension(130,20));
jButton1.setText("Settings");
jButton1.addActionListener(new java.awt.event.ActionListener() {
private JButton getJButtonSettings() {
if (jButtonSettings == null) {
jButtonSettings = new JButton();
jButtonSettings.setPreferredSize(new java.awt.Dimension(130,20));
jButtonSettings.setText("Settings");
jButtonSettings.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
int selectedRow = jTable1.getSelectedRow();
int selectedRow = jTableFpdModules.getSelectedRow();
if (selectedRow < 0){
return;
}
@ -335,7 +335,7 @@ public class FpdFrameworkModules extends IInternalFrame {
}
});
}
return jButton1;
return jButtonSettings;
}
/**
@ -343,14 +343,14 @@ public class FpdFrameworkModules extends IInternalFrame {
*
* @return javax.swing.JButton
*/
private JButton getJButton2() {
if (jButton2 == null) {
jButton2 = new JButton();
jButton2.setPreferredSize(new java.awt.Dimension(130,20));
jButton2.setText("Remove Module");
jButton2.addActionListener(new java.awt.event.ActionListener() {
private JButton getJButtonRemoveModule() {
if (jButtonRemoveModule == null) {
jButtonRemoveModule = new JButton();
jButtonRemoveModule.setPreferredSize(new java.awt.Dimension(130,20));
jButtonRemoveModule.setText("Remove Module");
jButtonRemoveModule.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
int selectedRow = jTable1.getSelectedRow();
int selectedRow = jTableFpdModules.getSelectedRow();
if (selectedRow < 0){
return;
}
@ -364,7 +364,7 @@ public class FpdFrameworkModules extends IInternalFrame {
ModuleIdentification mi = getModuleId(sa[0] + " " + sa[1] + " " + sa[2] + " " + sa[3] + " " + sa[4]);
mv = mi.getVersion();
pv = mi.getPackage().getVersion();
model1.removeRow(selectedRow);
modelFpdModules.removeRow(selectedRow);
if (arch == null) {
// if no arch specified in ModuleSA
fpdMsa.remove(mg+mv+pg+pv);
@ -383,7 +383,7 @@ public class FpdFrameworkModules extends IInternalFrame {
}
});
}
return jButton2;
return jButtonRemoveModule;
}
/**
@ -449,7 +449,7 @@ public class FpdFrameworkModules extends IInternalFrame {
JOptionPane.showMessageDialog(frame, "ShowFPDModules:" + e.getMessage());
}
}
model1.addRow(row);
modelFpdModules.addRow(row);
ArrayList<String> al = fpdMsa.get(saa[i][0]+row[1]+saa[i][2]+row[3]);
if (al == null) {
al = new ArrayList<String>();
@ -490,7 +490,7 @@ public class FpdFrameworkModules extends IInternalFrame {
catch (Exception e) {
JOptionPane.showMessageDialog(frame, "ShowAllModules:" + e.getMessage());
}
model.addRow(s);
modelAllModules.addRow(s);
miList.add(mi);
}
}

View File

@ -122,7 +122,7 @@ public class FpdHeader extends IInternalFrame {
private JLabel jLabel = null;
private JTextField jTextField = null;
private JTextField jTextFieldUrl = null;
private FpdFileContents ffc = null;
@ -432,26 +432,26 @@ public class FpdHeader extends IInternalFrame {
*
* @return javax.swing.JTextField
*/
private JTextField getJTextField() {
if (jTextField == null) {
jTextField = new JTextField();
jTextField.setBounds(new java.awt.Rectangle(160,193,320,20));
jTextField.setPreferredSize(new Dimension(320, 20));
jTextField.addFocusListener(new FocusAdapter(){
private JTextField getJTextFieldUrl() {
if (jTextFieldUrl == null) {
jTextFieldUrl = new JTextField();
jTextFieldUrl.setBounds(new java.awt.Rectangle(160,193,320,20));
jTextFieldUrl.setPreferredSize(new Dimension(320, 20));
jTextFieldUrl.addFocusListener(new FocusAdapter(){
public void focusLost(FocusEvent e){
if (jTextField.getText().length() == 0 && ffc.getFpdHdrUrl() == null) {
if (jTextFieldUrl.getText().length() == 0 && ffc.getFpdHdrUrl() == null) {
return;
}
if (jTextField.getText().equals(ffc.getFpdHdrUrl())) {
if (jTextFieldUrl.getText().equals(ffc.getFpdHdrUrl())) {
return;
}
ffc.setFpdHdrLicense(jTextAreaLicense.getText());
ffc.setFpdHdrUrl(jTextField.getText());
ffc.setFpdHdrUrl(jTextFieldUrl.getText());
docConsole.setSaved(false);
}
});
}
return jTextField;
return jTextFieldUrl;
}
public static void main(String[] args) {
@ -523,7 +523,7 @@ public class FpdHeader extends IInternalFrame {
jTextFieldAbstract.setText(ffc.getFpdHdrAbs());
}
if (ffc.getFpdHdrUrl() != null) {
jTextField.setText(ffc.getFpdHdrUrl());
jTextFieldUrl.setText(ffc.getFpdHdrUrl());
}
if (ffc.getFpdHdrCopyright() != null) {
jTextFieldCopyright.setText(ffc.getFpdHdrCopyright());
@ -627,7 +627,7 @@ public class FpdHeader extends IInternalFrame {
jContentPane.add(getJTextFieldCopyright(), null);
jContentPane.add(jLabel, null);
jContentPane.add(getJTextField(), null);
jContentPane.add(getJTextFieldUrl(), null);
}
return jContentPane;
}
@ -668,7 +668,7 @@ public class FpdHeader extends IInternalFrame {
resizeComponentWidth(this.jTextFieldBaseName, this.getWidth(), intPreferredWidth);
resizeComponentWidth(this.jTextFieldGuid, this.getWidth(), intPreferredWidth);
resizeComponentWidth(this.jTextFieldVersion, this.getWidth(), intPreferredWidth);
resizeComponentWidth(this.jTextField, this.getWidth(), intPreferredWidth);
resizeComponentWidth(this.jTextFieldUrl, this.getWidth(), intPreferredWidth);
resizeComponentWidth(this.jScrollPaneLicense, this.getWidth(), intPreferredWidth);
resizeComponentWidth(this.jTextFieldCopyright, this.getWidth(), intPreferredWidth);
resizeComponentWidth(this.jScrollPaneDescription, this.getWidth(), intPreferredWidth);

View File

@ -44,14 +44,10 @@ public class GenListDialog extends JDialog implements ActionListener{
private static final long serialVersionUID = 1L;
private JPanel jContentPane = null;
private JPanel jPanel = null;
private JPanel jPanel1 = null;
private JPanel jPanel2 = null;
private JPanel jPanel3 = null;
private JPanel jPanel4 = null;
private JButton jButton = null;
private JButton jButton1 = null;
private JButton jButton2 = null;
private JPanel jPanelContentEast = null;
private JPanel jPanelContentCenter = null;
private JButton jButtonCancel = null;
private JButton jButtonOk = null;
private ICheckBoxList checkBoxList = null;
@ -60,17 +56,13 @@ public class GenListDialog extends JDialog implements ActionListener{
public void actionPerformed(ActionEvent arg0) {
// TODO Auto-generated method stub
if (arg0.getSource() == jButton1){
checkBoxList.setAllItemsUnchecked();
}
if (arg0.getSource() == jButton2){
if (arg0.getSource() == jButtonOk){
this.dispose();
}
if (arg0.getSource() == jButton){
if (arg0.getSource() == jButtonCancel){
this.dispose();
}
}
@ -80,54 +72,17 @@ public class GenListDialog extends JDialog implements ActionListener{
*
* @return javax.swing.JPanel
*/
private JPanel getJPanel() {
if (jPanel == null) {
private JPanel getJPanelContentEast() {
if (jPanelContentEast == null) {
FlowLayout flowLayout = new FlowLayout();
flowLayout.setVgap(10);
jPanel = new JPanel();
jPanel.setLayout(flowLayout);
jPanel.setPreferredSize(new java.awt.Dimension(100,30));
jPanel.add(getJButton1(), null);
jPanel.add(getJButton2(), null);
jPanel.add(getJButton(), null);
jPanelContentEast = new JPanel();
jPanelContentEast.setLayout(flowLayout);
jPanelContentEast.setPreferredSize(new java.awt.Dimension(100,30));
jPanelContentEast.add(getJButtonOk(), null);
jPanelContentEast.add(getJButtonCancel(), null);
}
return jPanel;
}
/**
* This method initializes jPanel1
*
* @return javax.swing.JPanel
*/
private JPanel getJPanel1() {
if (jPanel1 == null) {
jPanel1 = new JPanel();
}
return jPanel1;
}
/**
* This method initializes jPanel2
*
* @return javax.swing.JPanel
*/
private JPanel getJPanel2() {
if (jPanel2 == null) {
jPanel2 = new JPanel();
}
return jPanel2;
}
/**
* This method initializes jPanel3
*
* @return javax.swing.JPanel
*/
private JPanel getJPanel3() {
if (jPanel3 == null) {
jPanel3 = new JPanel();
}
return jPanel3;
return jPanelContentEast;
}
/**
@ -135,14 +90,14 @@ public class GenListDialog extends JDialog implements ActionListener{
*
* @return javax.swing.JPanel
*/
private JPanel getJPanel4() {
if (jPanel4 == null) {
jPanel4 = new JPanel();
jPanel4.setLayout(new FlowLayout());
jPanel4.add(getJScrollPane(), null);
private JPanel getJPanelContentCenter() {
if (jPanelContentCenter == null) {
jPanelContentCenter = new JPanel();
jPanelContentCenter.setLayout(new FlowLayout());
jPanelContentCenter.add(getJScrollPane(), null);
}
return jPanel4;
return jPanelContentCenter;
}
/**
@ -150,31 +105,14 @@ public class GenListDialog extends JDialog implements ActionListener{
*
* @return javax.swing.JButton
*/
private JButton getJButton() {
if (jButton == null) {
jButton = new JButton();
jButton.setPreferredSize(new java.awt.Dimension(80,20));
jButton.setText("Cancel");
jButton.addActionListener(this);
private JButton getJButtonCancel() {
if (jButtonCancel == null) {
jButtonCancel = new JButton();
jButtonCancel.setPreferredSize(new java.awt.Dimension(80,20));
jButtonCancel.setText("Cancel");
jButtonCancel.addActionListener(this);
}
return jButton;
}
/**
* This method initializes jButton1
*
* @return javax.swing.JButton
*/
private JButton getJButton1() {
if (jButton1 == null) {
jButton1 = new JButton();
jButton1.setPreferredSize(new java.awt.Dimension(80,20));
jButton1.setHorizontalTextPosition(javax.swing.SwingConstants.LEADING);
jButton1.setText("Clear");
jButton1.setVisible(false);
jButton1.addActionListener(this);
}
return jButton1;
return jButtonCancel;
}
/**
@ -182,15 +120,15 @@ public class GenListDialog extends JDialog implements ActionListener{
*
* @return javax.swing.JButton
*/
private JButton getJButton2() {
if (jButton2 == null) {
jButton2 = new JButton();
jButton2.setPreferredSize(new java.awt.Dimension(80,20));
jButton2.setText("Ok");
jButton2.setActionCommand("GenGuidValue");
jButton2.addActionListener(this);
private JButton getJButtonOk() {
if (jButtonOk == null) {
jButtonOk = new JButton();
jButtonOk.setPreferredSize(new java.awt.Dimension(80,20));
jButtonOk.setText("Ok");
jButtonOk.setActionCommand("GenGuidValue");
jButtonOk.addActionListener(this);
}
return jButton2;
return jButtonOk;
}
/**
@ -211,17 +149,7 @@ public class GenListDialog extends JDialog implements ActionListener{
if (checkBoxList == null) {
checkBoxList = new ICheckBoxList();
checkBoxList.setBounds(new java.awt.Rectangle(40,20,177,74));
// Vector<String> v = new Vector<String>();
// v.add("DATA_HUB_RECORD");
// v.add("EFI_EVENT");
// v.add("EFI_SYSTEM_CONFIGURATION_TABLE");
// v.add("EFI_VARIABLE");
// v.add("GUID");
// v.add("HII_PACKAGE_LIST");
// v.add("HOB");
// v.add("TOKEN_SPACE_GUID");
//
// checkBoxList.setAllItems(v);
}
return checkBoxList;
}
@ -256,7 +184,7 @@ public class GenListDialog extends JDialog implements ActionListener{
public GenListDialog(ActionListener i){
this();
jButton2.addActionListener(i);
jButtonOk.addActionListener(i);
}
@ -283,11 +211,8 @@ public class GenListDialog extends JDialog implements ActionListener{
if (jContentPane == null) {
jContentPane = new JPanel();
jContentPane.setLayout(new BorderLayout());
jContentPane.add(getJPanel(), java.awt.BorderLayout.EAST);
jContentPane.add(getJPanel1(), java.awt.BorderLayout.WEST);
jContentPane.add(getJPanel2(), java.awt.BorderLayout.NORTH);
jContentPane.add(getJPanel3(), java.awt.BorderLayout.SOUTH);
jContentPane.add(getJPanel4(), java.awt.BorderLayout.CENTER);
jContentPane.add(getJPanelContentEast(), java.awt.BorderLayout.EAST);
jContentPane.add(getJPanelContentCenter(), java.awt.BorderLayout.CENTER);
}
return jContentPane;
}