Modify BuildOptions and Flash editors in FPD file.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@676 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
jlin16 2006-06-30 11:27:36 +00:00
parent c9760f97a6
commit 202c4f38c5
5 changed files with 52 additions and 98 deletions

View File

@ -2370,6 +2370,7 @@ public class FrameworkWizardUI extends IFrame implements MouseListener, TreeSele
**/ **/
private void showPlatformElement(int elementType, OpeningPlatformType fpd) { private void showPlatformElement(int elementType, OpeningPlatformType fpd) {
this.cleanDesktopPanePlatform(); this.cleanDesktopPanePlatform();
fpd.setSaved(false);
switch (elementType) { switch (elementType) {
case IDefaultMutableTreeNode.FPD_PLATFORMDEFINITIONS: case IDefaultMutableTreeNode.FPD_PLATFORMDEFINITIONS:
FpdPlatformDefs frmFpdPlatformDefs = new FpdPlatformDefs(fpd.getXmlFpd()); FpdPlatformDefs frmFpdPlatformDefs = new FpdPlatformDefs(fpd.getXmlFpd());
@ -2412,6 +2413,7 @@ public class FrameworkWizardUI extends IFrame implements MouseListener, TreeSele
private void showPackageElement(int elementType, OpeningPackageType spd) { private void showPackageElement(int elementType, OpeningPackageType spd) {
this.cleanDesktopPanePackage(); this.cleanDesktopPanePackage();
Tools.dirForNewSpd = spd.getId().getPath(); Tools.dirForNewSpd = spd.getId().getPath();
spd.setSaved(false);
switch (elementType) { switch (elementType) {
case IDefaultMutableTreeNode.SPD_HEADER: case IDefaultMutableTreeNode.SPD_HEADER:
SpdHeader frmSpdHeader = new SpdHeader(spd.getXmlSpd()); SpdHeader frmSpdHeader = new SpdHeader(spd.getXmlSpd());

View File

@ -66,14 +66,11 @@ public class FpdBuildOptions extends IInternalFrame {
private JPanel jPanel9 = null; private JPanel jPanel9 = null;
private JPanel jPanel10 = null; private JPanel jPanel10 = null;
private JPanel jPanel11 = null; private JPanel jPanel11 = null;
private JRadioButton jRadioButton = null;
private JTextField jTextField2 = null; private JTextField jTextField2 = null;
private JLabel jLabel3 = null; private JLabel jLabel3 = null;
private JTextField jTextField3 = null; private JTextField jTextField3 = null;
private JButton jButton4 = null; private JButton jButton4 = null;
private JButton jButton5 = null; private JButton jButton5 = null;
private JRadioButton jRadioButton1 = null;
private JLabel jLabel4 = null;
private JTextField jTextField4 = null; private JTextField jTextField4 = null;
private JScrollPane jScrollPane2 = null; private JScrollPane jScrollPane2 = null;
private JTable jTable2 = null; private JTable jTable2 = null;
@ -147,6 +144,8 @@ public class FpdBuildOptions extends IInternalFrame {
private JTextField jTextField13 = null; private JTextField jTextField13 = null;
private JLabel jLabel15 = null; private JLabel jLabel15 = null;
private int selectedRow = -1; private int selectedRow = -1;
private JLabel jLabel = null;
private JLabel jLabel1 = null;
/** /**
* This method initializes jPanel * This method initializes jPanel
* *
@ -223,9 +222,7 @@ public class FpdBuildOptions extends IInternalFrame {
jPanel8.add(getJPanel9(), java.awt.BorderLayout.NORTH); jPanel8.add(getJPanel9(), java.awt.BorderLayout.NORTH);
jPanel8.add(getJPanel10(), java.awt.BorderLayout.SOUTH); jPanel8.add(getJPanel10(), java.awt.BorderLayout.SOUTH);
jPanel8.add(getJPanel11(), java.awt.BorderLayout.CENTER); jPanel8.add(getJPanel11(), java.awt.BorderLayout.CENTER);
ButtonGroup bg = new ButtonGroup();
bg.add(jRadioButton);
bg.add(jRadioButton1);
} }
return jPanel8; return jPanel8;
} }
@ -237,18 +234,19 @@ public class FpdBuildOptions extends IInternalFrame {
*/ */
private JPanel getJPanel9() { private JPanel getJPanel9() {
if (jPanel9 == null) { if (jPanel9 == null) {
jLabel = new JLabel();
jLabel.setText("ANT Task File");
jLabel.setPreferredSize(new java.awt.Dimension(80,20));
FlowLayout flowLayout8 = new FlowLayout(); FlowLayout flowLayout8 = new FlowLayout();
flowLayout8.setAlignment(java.awt.FlowLayout.LEFT); flowLayout8.setAlignment(java.awt.FlowLayout.LEFT);
jLabel3 = new JLabel(); jLabel3 = new JLabel();
jLabel3.setText("ID"); jLabel3.setText("ID");
jPanel9 = new JPanel(); jPanel9 = new JPanel();
jPanel9.setLayout(flowLayout8); jPanel9.setLayout(flowLayout8);
jPanel9.add(getJRadioButton(), null); jPanel9.add(jLabel, null);
jPanel9.add(getJTextField2(), null); jPanel9.add(getJTextField2(), null);
jPanel9.add(jLabel3, null); jPanel9.add(jLabel3, null);
jPanel9.add(getJTextField3(), null); jPanel9.add(getJTextField3(), null);
jPanel9.add(getJButton4(), null);
jPanel9.add(getJButton5(), null);
} }
return jPanel9; return jPanel9;
} }
@ -272,43 +270,23 @@ public class FpdBuildOptions extends IInternalFrame {
*/ */
private JPanel getJPanel11() { private JPanel getJPanel11() {
if (jPanel11 == null) { if (jPanel11 == null) {
jLabel1 = new JLabel();
jLabel1.setText("ANT Command Options");
jLabel1.setPreferredSize(new java.awt.Dimension(131,20));
FlowLayout flowLayout3 = new FlowLayout(); FlowLayout flowLayout3 = new FlowLayout();
flowLayout3.setHgap(5); flowLayout3.setHgap(5);
flowLayout3.setAlignment(java.awt.FlowLayout.LEFT); flowLayout3.setAlignment(java.awt.FlowLayout.LEFT);
jLabel4 = new JLabel();
jLabel4.setText("Execution Order");
jLabel4.setEnabled(false);
jLabel4.setPreferredSize(new java.awt.Dimension(100,16));
jPanel11 = new JPanel(); jPanel11 = new JPanel();
jPanel11.setLayout(flowLayout3); jPanel11.setLayout(flowLayout3);
jPanel11.add(getJRadioButton1(), null); jPanel11.add(jLabel1, null);
jPanel11.add(jLabel4, null);
jPanel11.add(getJTextField4(), null); jPanel11.add(getJTextField4(), null);
jPanel11.add(getJButton4(), null);
jPanel11.add(getJButton5(), null);
jPanel11.add(getJScrollPane2(), null); jPanel11.add(getJScrollPane2(), null);
} }
return jPanel11; return jPanel11;
} }
/**
* This method initializes jRadioButton
*
* @return javax.swing.JRadioButton
*/
private JRadioButton getJRadioButton() {
if (jRadioButton == null) {
jRadioButton = new JRadioButton();
jRadioButton.setText("ANT tasks File");
jRadioButton.setSelected(true);
jRadioButton.addItemListener(new ItemListener() {
public void itemStateChanged(ItemEvent arg0) {
boolean selected = jRadioButton.isSelected();
jTextField2.setEnabled(selected);
}
});
}
return jRadioButton;
}
/** /**
* This method initializes jTextField2 * This method initializes jTextField2
* *
@ -343,19 +321,14 @@ public class FpdBuildOptions extends IInternalFrame {
private JButton getJButton4() { private JButton getJButton4() {
if (jButton4 == null) { if (jButton4 == null) {
jButton4 = new JButton(); jButton4 = new JButton();
jButton4.setPreferredSize(new java.awt.Dimension(70,20)); jButton4.setPreferredSize(new java.awt.Dimension(90,20));
jButton4.setText("Add"); jButton4.setText("Add");
jButton4.addActionListener(new ActionListener() { jButton4.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
Object[] o = {jTextField3.getText(), null, null}; Object[] o = {jTextField3.getText(), null, null};
if (jRadioButton.isSelected()) {
o[1] = jTextField2.getText(); o[1] = jTextField2.getText();
ffc.genBuildOptionsUserDefAntTask(o[0]+"", o[1]+"", null);
}
if (jRadioButton1.isSelected()) {
o[2] = jTextField4.getText(); o[2] = jTextField4.getText();
ffc.genBuildOptionsUserDefAntTask(o[0]+"", null, o[2]+""); ffc.genBuildOptionsUserDefAntTask(o[0]+"", null, o[2]+"");
}
antTaskTableModel.addRow(o); antTaskTableModel.addRow(o);
} }
@ -372,7 +345,7 @@ public class FpdBuildOptions extends IInternalFrame {
private JButton getJButton5() { private JButton getJButton5() {
if (jButton5 == null) { if (jButton5 == null) {
jButton5 = new JButton(); jButton5 = new JButton();
jButton5.setPreferredSize(new java.awt.Dimension(70,20)); jButton5.setPreferredSize(new java.awt.Dimension(90,20));
jButton5.setText("Delete"); jButton5.setText("Delete");
jButton5.addActionListener(new ActionListener() { jButton5.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
@ -386,27 +359,6 @@ public class FpdBuildOptions extends IInternalFrame {
return jButton5; return jButton5;
} }
/**
* This method initializes jRadioButton1
*
* @return javax.swing.JRadioButton
*/
private JRadioButton getJRadioButton1() {
if (jRadioButton1 == null) {
jRadioButton1 = new JRadioButton();
jRadioButton1.setText("ANT Command");
jRadioButton1.setPreferredSize(new java.awt.Dimension(180,24));
jRadioButton1.addItemListener(new ItemListener() {
public void itemStateChanged(ItemEvent arg0) {
boolean selected = jRadioButton1.isSelected();
jLabel4.setEnabled(selected);
jTextField4.setEnabled(selected);
}
});
}
return jRadioButton1;
}
/** /**
* This method initializes jTextField4 * This method initializes jTextField4
* *
@ -415,8 +367,8 @@ public class FpdBuildOptions extends IInternalFrame {
private JTextField getJTextField4() { private JTextField getJTextField4() {
if (jTextField4 == null) { if (jTextField4 == null) {
jTextField4 = new JTextField(); jTextField4 = new JTextField();
jTextField4.setPreferredSize(new java.awt.Dimension(100,20)); jTextField4.setPreferredSize(new java.awt.Dimension(270,20));
jTextField4.setEnabled(false); jTextField4.setEnabled(true);
} }
return jTextField4; return jTextField4;
} }
@ -446,7 +398,7 @@ public class FpdBuildOptions extends IInternalFrame {
jTable2 = new JTable(antTaskTableModel); jTable2 = new JTable(antTaskTableModel);
antTaskTableModel.addColumn("ID"); antTaskTableModel.addColumn("ID");
antTaskTableModel.addColumn("Filename"); antTaskTableModel.addColumn("Filename");
antTaskTableModel.addColumn("ExecutionOrder"); antTaskTableModel.addColumn("ANT Command Options");
jTable2.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); jTable2.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
jTable2.getSelectionModel().addListSelectionListener(new ListSelectionListener(){ jTable2.getSelectionModel().addListSelectionListener(new ListSelectionListener(){

View File

@ -1005,7 +1005,7 @@ public class FpdFileContents {
if (fileName != null){ if (fileName != null){
at.setFilename(fileName); at.setFilename(fileName);
} }
else { if (execOrder != null) {
at.setAntCmdOptions(execOrder); at.setAntCmdOptions(execOrder);
} }
} }

View File

@ -1341,34 +1341,34 @@ public class FpdFlash extends IInternalFrame {
if (k.equals("EFI_ERASE_POLARITY") && m.get(k).equals("1")) { if (k.equals("EFI_ERASE_POLARITY") && m.get(k).equals("1")) {
boolArray[0] = t; boolArray[0] = t;
} }
if (k.equals("EFI_READ_STATUS") && m.get(k).equals("1")) { if (k.equals("EFI_READ_STATUS") && m.get(k).equals("TRUE")) {
boolArray[1] = t; boolArray[1] = t;
} }
if (k.equals("EFI_WRITE_STATUS") && m.get(k).equals("1")) { if (k.equals("EFI_WRITE_STATUS") && m.get(k).equals("TRUE")) {
boolArray[2] = t; boolArray[2] = t;
} }
if (k.equals("EFI_LOCK_STATUS") && m.get(k).equals("1")) { if (k.equals("EFI_LOCK_STATUS") && m.get(k).equals("TRUE")) {
boolArray[3] = t; boolArray[3] = t;
} }
if (k.equals("EFI_MEMORY_MAPPED") && m.get(k).equals("1")) { if (k.equals("EFI_MEMORY_MAPPED") && m.get(k).equals("TRUE")) {
boolArray[4] = t; boolArray[4] = t;
} }
if (k.equals("EFI_STICKY_WRITE") && m.get(k).equals("1")) { if (k.equals("EFI_STICKY_WRITE") && m.get(k).equals("TRUE")) {
boolArray[5] = t; boolArray[5] = t;
} }
if (k.equals("EFI_READ_DISABLED_CAP") && m.get(k).equals("1")) { if (k.equals("EFI_READ_DISABLED_CAP") && m.get(k).equals("TRUE")) {
boolArray[6] = t; boolArray[6] = t;
} }
if (k.equals("EFI_READ_ENABLED_CAP") && m.get(k).equals("1")) { if (k.equals("EFI_READ_ENABLED_CAP") && m.get(k).equals("TRUE")) {
boolArray[7] = t; boolArray[7] = t;
} }
if (k.equals("EFI_WRITE_DISABLED_CAP") && m.get(k).equals("1")) { if (k.equals("EFI_WRITE_DISABLED_CAP") && m.get(k).equals("TRUE")) {
boolArray[8] = t; boolArray[8] = t;
} }
if (k.equals("EFI_WRITE_ENABLED_CAP") && m.get(k).equals("1")) { if (k.equals("EFI_WRITE_ENABLED_CAP") && m.get(k).equals("TRUE")) {
boolArray[9] = t; boolArray[9] = t;
} }
if (k.equals("EFI_LOCK_CAP") && m.get(k).equals("1")) { if (k.equals("EFI_LOCK_CAP") && m.get(k).equals("TRUE")) {
boolArray[10] = t; boolArray[10] = t;
} }
} }
@ -1382,64 +1382,64 @@ public class FpdFlash extends IInternalFrame {
m.put("EFI_ERASE_POLARITY", "0"); m.put("EFI_ERASE_POLARITY", "0");
} }
if (boolArray[1]) { if (boolArray[1]) {
m.put("EFI_READ_STATUS", "1"); m.put("EFI_READ_STATUS", "TRUE");
} }
else { else {
m.put("EFI_READ_STATUS", "0"); m.put("EFI_READ_STATUS", "FALSE");
} }
if (boolArray[2]) { if (boolArray[2]) {
m.put("EFI_WRITE_STATUS", "1"); m.put("EFI_WRITE_STATUS", "TRUE");
} }
else { else {
m.put("EFI_WRITE_STATUS", "0"); m.put("EFI_WRITE_STATUS", "FALSE");
} }
if (boolArray[3]) { if (boolArray[3]) {
m.put("EFI_LOCK_STATUS", "1"); m.put("EFI_LOCK_STATUS", "TRUE");
} }
else { else {
m.put("EFI_LOCK_STATUS", "0"); m.put("EFI_LOCK_STATUS", "FALSE");
} }
if (boolArray[4]) { if (boolArray[4]) {
m.put("EFI_MEMORY_MAPPED", "1"); m.put("EFI_MEMORY_MAPPED", "TRUE");
} }
else { else {
m.put("EFI_MEMORY_MAPPED", "0"); m.put("EFI_MEMORY_MAPPED", "FALSE");
} }
if (boolArray[5]) { if (boolArray[5]) {
m.put("EFI_STICKY_WRITE", "1"); m.put("EFI_STICKY_WRITE", "TRUE");
} }
else { else {
m.put("EFI_STICKY_WRITE", "0"); m.put("EFI_STICKY_WRITE", "FALSE");
} }
if (boolArray[6]) { if (boolArray[6]) {
m.put("EFI_READ_DISABLED_CAP", "1"); m.put("EFI_READ_DISABLED_CAP", "TRUE");
} }
else { else {
m.put("EFI_READ_DISABLED_CAP", "0"); m.put("EFI_READ_DISABLED_CAP", "FALSE");
} }
if (boolArray[7]) { if (boolArray[7]) {
m.put("EFI_READ_ENABLED_CAP", "1"); m.put("EFI_READ_ENABLED_CAP", "TRUE");
} }
else { else {
m.put("EFI_READ_ENABLED_CAP", "0"); m.put("EFI_READ_ENABLED_CAP", "FALSE");
} }
if (boolArray[8]) { if (boolArray[8]) {
m.put("EFI_WRITE_DISABLED_CAP", "1"); m.put("EFI_WRITE_DISABLED_CAP", "TRUE");
} }
else { else {
m.put("EFI_WRITE_DISABLED_CAP", "0"); m.put("EFI_WRITE_DISABLED_CAP", "FALSE");
} }
if (boolArray[9]) { if (boolArray[9]) {
m.put("EFI_WRITE_ENABLED_CAP", "1"); m.put("EFI_WRITE_ENABLED_CAP", "TRUE");
} }
else { else {
m.put("EFI_WRITE_ENABLED_CAP", "0"); m.put("EFI_WRITE_ENABLED_CAP", "FALSE");
} }
if (boolArray[10]) { if (boolArray[10]) {
m.put("EFI_LOCK_CAP", "1"); m.put("EFI_LOCK_CAP", "TRUE");
} }
else { else {
m.put("EFI_LOCK_CAP", "0"); m.put("EFI_LOCK_CAP", "FALSE");
} }
} }
/** /**

View File

@ -466,7 +466,7 @@ public class FpdPlatformDefs extends IInternalFrame {
private JTextField getJTextField() { private JTextField getJTextField() {
if (jTextField == null) { if (jTextField == null) {
jTextField = new JTextField(); jTextField = new JTextField();
jTextField.setPreferredSize(new Dimension(280, 20)); jTextField.setPreferredSize(new java.awt.Dimension(350,20));
} }
return jTextField; return jTextField;
} }