Fix EDKT263. Change save dialog to open dialog. Update all Frame's titles.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1510 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
wuyizhong 2006-09-11 09:12:17 +00:00
parent 7dd2b2ad65
commit 2e39c71883
11 changed files with 63 additions and 18 deletions

View File

@ -0,0 +1,36 @@
package org.tianocore.frameworkwizard.far;
public class FarStringDefinition {
///
/// Definition for all step's title string
///
public static final String CREATE_STEP_ONE_TITLE =
"Create Framework Archive(FAR) - Step 1: Set FAR's basic information";
public static final String CREATE_STEP_TWO_TITLE =
"Create Framework Archive(FAR) - Step 2: Choose Packages and Platforms";
public static final String CREATE_STEP_THREE_TITLE =
"Create Framework Archive(FAR) - Step 3: Set file filter";
public static final String CREATE_STEP_FOUR_TITLE =
"Create Framework Archive(FAR) - Step 4: Choose target file and finish";
public static final String DELETE_STEP_ONE_TITLE =
"Delete Framework Archive(FAR) - Step 1: Choose FAR from framework database";
public static final String DELETE_STEP_TWO_TITLE =
"Delete Framework Archive(FAR) - Step 2: Choose delete mode and finish";
public static final String UPDATE_STEP_ONE_TITLE =
"Update Framework Archive(FAR) - Step 1: Browse FAR file";
public static final String UPDATE_STEP_TWO_TITLE =
"Update Framework Archive(FAR) - Step 2: Summary";
public static final String INSTALL_STEP_ONE_TITLE =
"Install Framework Archive(FAR) - Step 1: Browse FAR file";
public static final String INSTALL_STEP_TWO_TITLE =
"Install Framework Archive(FAR) - Step 2: Set path for packages or/and platforms";
///
///
///
}

View File

@ -35,6 +35,7 @@ import org.tianocore.frameworkwizard.common.Tools;
import org.tianocore.frameworkwizard.common.ui.IDialog;
import org.tianocore.frameworkwizard.far.AggregationOperation;
import org.tianocore.frameworkwizard.far.Far;
import org.tianocore.frameworkwizard.far.FarStringDefinition;
import org.tianocore.frameworkwizard.far.PackageQuery;
import org.tianocore.frameworkwizard.far.PackageQueryInterface;
import org.tianocore.frameworkwizard.packaging.PackageIdentification;
@ -194,7 +195,7 @@ public class CreateStepFour extends IDialog implements MouseListener {
private void initialize() {
this.setSize(700, 400);
this.setContentPane(getJContentPane());
this.setTitle("Create Framework Archive(FAR) - Step 4: Finish");
this.setTitle(FarStringDefinition.CREATE_STEP_FOUR_TITLE);
this.centerWindow();
}
@ -207,7 +208,7 @@ public class CreateStepFour extends IDialog implements MouseListener {
if (jContentPane == null) {
jLabel2 = new JLabel();
jLabel2.setBounds(new java.awt.Rectangle(30,70,111,18));
jLabel2.setText("Select File to Save: ");
jLabel2.setText("File to Save: ");
jLabel = new JLabel();
jLabel.setBounds(new java.awt.Rectangle(29,108,320,20));
jLabel.setText("This FAR will depend on following packages: ");

View File

@ -30,6 +30,7 @@ import org.tianocore.frameworkwizard.common.ui.IDialog;
import org.tianocore.frameworkwizard.common.ui.IFrame;
import org.tianocore.frameworkwizard.common.ui.StarLabel;
import org.tianocore.frameworkwizard.far.FarHeader;
import org.tianocore.frameworkwizard.far.FarStringDefinition;
public class CreateStepOne extends IDialog implements MouseListener {
@ -397,7 +398,7 @@ public class CreateStepOne extends IDialog implements MouseListener {
private void initialize() {
this.setSize(700, 425);
this.setContentPane(getJScrollPane());
this.setTitle("Create Framework Archive(FAR) - Step 1: Set FAR's baseic information");
this.setTitle(FarStringDefinition.CREATE_STEP_ONE_TITLE);
this.centerWindow();
}
@ -600,7 +601,7 @@ public class CreateStepOne extends IDialog implements MouseListener {
// Add some logic process here
//
if (!valid()) {
return;
return ;
}
if (stepTwo == null) {
stepTwo = new CreateStepTwo(this, true, this);

View File

@ -26,6 +26,8 @@ import javax.swing.JLabel;
import org.tianocore.frameworkwizard.common.ui.IDialog;
import org.tianocore.frameworkwizard.common.ui.iCheckBoxList.ICheckBoxList;
import org.tianocore.frameworkwizard.far.FarStringDefinition;
import javax.swing.JScrollPane;
import javax.swing.JTextField;
@ -76,8 +78,7 @@ public class CreateStepThree extends IDialog implements MouseListener {
if (jTextArea == null) {
jTextArea = new JTextArea();
jTextArea.setBounds(new java.awt.Rectangle(30, 7, 642, 50));
jTextArea.setText("Step 2: Set File Filter\n");
jTextArea.append("Add more file filter regular expressions in text field separated with space. \n");
jTextArea.setText("Add more file filter regular expressions in text field separated with space. \n");
jTextArea.append("Note that regular expressions please reference PERL language. ");
jTextArea.setEditable(false);
}
@ -195,7 +196,7 @@ public class CreateStepThree extends IDialog implements MouseListener {
private void initialize() {
this.setSize(700, 400);
this.setContentPane(getJContentPane());
this.setTitle("Create Framework Archive(FAR) - Step 3: Set File Filter");
this.setTitle(FarStringDefinition.CREATE_STEP_THREE_TITLE);
this.centerWindow();
}

View File

@ -29,6 +29,7 @@ import javax.swing.JTextArea;
import org.tianocore.frameworkwizard.common.Log;
import org.tianocore.frameworkwizard.common.ui.IDialog;
import org.tianocore.frameworkwizard.common.ui.iCheckBoxList.ICheckBoxList;
import org.tianocore.frameworkwizard.far.FarStringDefinition;
import org.tianocore.frameworkwizard.packaging.PackageIdentification;
import org.tianocore.frameworkwizard.platform.PlatformIdentification;
import org.tianocore.frameworkwizard.workspace.WorkspaceTools;
@ -84,8 +85,7 @@ public class CreateStepTwo extends IDialog implements MouseListener {
if (jTextArea == null) {
jTextArea = new JTextArea();
jTextArea.setBounds(new java.awt.Rectangle(30, 7, 642, 50));
jTextArea.setText("Step 1: Choose Packages and Platforms\n");
jTextArea.append("Choose at least one package or platform. ");
jTextArea.setText("Choose at least one package or platform. ");
jTextArea.setEditable(false);
}
return jTextArea;
@ -209,7 +209,7 @@ public class CreateStepTwo extends IDialog implements MouseListener {
private void initialize() {
this.setSize(700, 400);
this.setContentPane(getJContentPane());
this.setTitle("Create Framework Archive(FAR) - Step 2: Choose Packages and Platform");
this.setTitle(FarStringDefinition.CREATE_STEP_TWO_TITLE);
this.centerWindow();
}

View File

@ -35,6 +35,7 @@ import org.tianocore.frameworkwizard.common.ui.IDialog;
import org.tianocore.frameworkwizard.common.ui.IFrame;
import org.tianocore.frameworkwizard.far.AggregationOperation;
import org.tianocore.frameworkwizard.far.FarIdentification;
import org.tianocore.frameworkwizard.far.FarStringDefinition;
import org.tianocore.frameworkwizard.far.PackageQuery;
import org.tianocore.frameworkwizard.far.PackageQueryInterface;
import org.tianocore.frameworkwizard.packaging.PackageIdentification;
@ -253,7 +254,7 @@ public class DeleteStepOne extends IDialog implements ListSelectionListener {
private void initialize() {
this.setSize(700, 400);
this.setContentPane(getJContentPane());
this.setTitle("Delete Framework Archive(FAR) - Step 1: Choose FAR from framework database");
this.setTitle(FarStringDefinition.DELETE_STEP_ONE_TITLE);
Dimension d = Toolkit.getDefaultToolkit().getScreenSize();
this.setLocation((d.width - this.getSize().width) / 2, (d.height - this.getSize().height) / 2);
}

View File

@ -33,6 +33,7 @@ import javax.swing.JRadioButton;
import org.tianocore.frameworkwizard.common.DataType;
import org.tianocore.frameworkwizard.common.ui.IDialog;
import org.tianocore.frameworkwizard.far.FarIdentification;
import org.tianocore.frameworkwizard.far.FarStringDefinition;
import org.tianocore.frameworkwizard.packaging.PackageIdentification;
import org.tianocore.frameworkwizard.platform.PlatformIdentification;
import org.tianocore.frameworkwizard.workspace.WorkspaceTools;
@ -174,7 +175,7 @@ public class DeleteStepTwo extends IDialog implements MouseListener {
private void initialize() {
this.setSize(700, 400);
this.setContentPane(getJContentPane());
this.setTitle("Delete Framework Archive(FAR) - Step 2: Choose Delete Mode");
this.setTitle(FarStringDefinition.DELETE_STEP_TWO_TITLE);
Dimension d = Toolkit.getDefaultToolkit().getScreenSize();
this.setLocation((d.width - this.getSize().width) / 2, (d.height - this.getSize().height) / 2);
}

View File

@ -38,6 +38,7 @@ import org.tianocore.frameworkwizard.common.ui.IDialog;
import org.tianocore.frameworkwizard.common.ui.IFrame;
import org.tianocore.frameworkwizard.far.DistributeRule;
import org.tianocore.frameworkwizard.far.Far;
import org.tianocore.frameworkwizard.far.FarStringDefinition;
import org.tianocore.frameworkwizard.packaging.PackageIdentification;
import org.tianocore.frameworkwizard.workspace.Workspace;
@ -220,7 +221,7 @@ public class InstallStepOne extends IDialog implements MouseListener {
private void initialize() {
this.setSize(700, 400);
this.setContentPane(getJContentPane());
this.setTitle("Install Framework Archive(FAR) - Step 1: Choose FAR file");
this.setTitle(FarStringDefinition.INSTALL_STEP_ONE_TITLE);
Dimension d = Toolkit.getDefaultToolkit().getScreenSize();
this.setLocation((d.width - this.getSize().width) / 2, (d.height - this.getSize().height) / 2);
}
@ -309,7 +310,7 @@ public class InstallStepOne extends IDialog implements MouseListener {
fc.addChoosableFileFilter(new IFileFilter(DataType.FAR_SURFACE_AREA_EXT));
fc.setCurrentDirectory(new File(Workspace.getCurrentWorkspace()));
int result = fc.showSaveDialog(new JPanel());
int result = fc.showOpenDialog(new JPanel());
if (result == JFileChooser.APPROVE_OPTION) {
jLabelWarning.setVisible(false);
jTable.setVisible(false);

View File

@ -41,6 +41,7 @@ import org.tianocore.frameworkwizard.common.Log;
import org.tianocore.frameworkwizard.common.Tools;
import org.tianocore.frameworkwizard.common.ui.IDialog;
import org.tianocore.frameworkwizard.far.Far;
import org.tianocore.frameworkwizard.far.FarStringDefinition;
import org.tianocore.frameworkwizard.packaging.PackageIdentification;
import org.tianocore.frameworkwizard.platform.PlatformIdentification;
import org.tianocore.frameworkwizard.workspace.Workspace;
@ -287,7 +288,7 @@ public class InstallStepTwo extends IDialog implements MouseListener {
private void initialize() {
this.setSize(700, 400);
this.setContentPane(getJContentPane());
this.setTitle("Install Framework Archive(FAR) - Step 2: Set Path for Packages and Platforms");
this.setTitle(FarStringDefinition.INSTALL_STEP_TWO_TITLE);
Dimension d = Toolkit.getDefaultToolkit().getScreenSize();
this.setLocation((d.width - this.getSize().width) / 2, (d.height - this.getSize().height) / 2);
}

View File

@ -36,6 +36,7 @@ import org.tianocore.frameworkwizard.common.ui.IDialog;
import org.tianocore.frameworkwizard.common.ui.IFrame;
import org.tianocore.frameworkwizard.far.Far;
import org.tianocore.frameworkwizard.far.FarIdentification;
import org.tianocore.frameworkwizard.far.FarStringDefinition;
import org.tianocore.frameworkwizard.workspace.Workspace;
import org.tianocore.frameworkwizard.workspace.WorkspaceTools;
@ -200,7 +201,7 @@ public class UpdateStepOne extends IDialog implements MouseListener {
private void initialize() {
this.setSize(700, 400);
this.setContentPane(getJContentPane());
this.setTitle("Update Framework Archive(FAR) - Step 1: Choose FAR File");
this.setTitle(FarStringDefinition.UPDATE_STEP_ONE_TITLE);
Dimension d = Toolkit.getDefaultToolkit().getScreenSize();
this.setLocation((d.width - this.getSize().width) / 2, (d.height - this.getSize().height) / 2);
}
@ -276,7 +277,7 @@ public class UpdateStepOne extends IDialog implements MouseListener {
fc.addChoosableFileFilter(new IFileFilter(DataType.FAR_SURFACE_AREA_EXT));
fc.setCurrentDirectory(new File(Workspace.getCurrentWorkspace()));
int result = fc.showSaveDialog(new JPanel());
int result = fc.showOpenDialog(new JPanel());
if (result == JFileChooser.APPROVE_OPTION) {
this.jTextFieldFarFile.setText(Tools.addPathExt(fc.getSelectedFile().getPath(),
DataType.RETURN_TYPE_FAR_SURFACE_AREA));

View File

@ -41,6 +41,7 @@ import org.tianocore.frameworkwizard.common.ui.IDialog;
import org.tianocore.frameworkwizard.far.AggregationOperation;
import org.tianocore.frameworkwizard.far.DistributeRule;
import org.tianocore.frameworkwizard.far.Far;
import org.tianocore.frameworkwizard.far.FarStringDefinition;
import org.tianocore.frameworkwizard.packaging.PackageIdentification;
import org.tianocore.frameworkwizard.platform.PlatformIdentification;
import org.tianocore.frameworkwizard.workspace.Workspace;
@ -220,7 +221,7 @@ public class UpdateStepTwo extends IDialog implements MouseListener {
private void initialize() {
this.setSize(700, 400);
this.setContentPane(getJContentPane());
this.setTitle("Update Framework Archive(FAR) - Step 2: Summary");
this.setTitle(FarStringDefinition.UPDATE_STEP_TWO_TITLE);
Dimension d = Toolkit.getDefaultToolkit().getScreenSize();
this.setLocation((d.width - this.getSize().width) / 2, (d.height - this.getSize().height) / 2);
}