]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Fix EDKT263. Change save dialog to open dialog. Update all Frame's titles.
authorwuyizhong <wuyizhong@6f19259b-4bc3-4df7-8a09-765794883524>
Mon, 11 Sep 2006 09:12:17 +0000 (09:12 +0000)
committerwuyizhong <wuyizhong@6f19259b-4bc3-4df7-8a09-765794883524>
Mon, 11 Sep 2006 09:12:17 +0000 (09:12 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1510 6f19259b-4bc3-4df7-8a09-765794883524

Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/far/FarStringDefinition.java [new file with mode: 0644]
Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/far/createui/CreateStepFour.java
Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/far/createui/CreateStepOne.java
Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/far/createui/CreateStepThree.java
Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/far/createui/CreateStepTwo.java
Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/far/deleteui/DeleteStepOne.java
Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/far/deleteui/DeleteStepTwo.java
Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/far/installui/InstallStepOne.java
Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/far/installui/InstallStepTwo.java
Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/far/updateui/UpdateStepOne.java
Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/far/updateui/UpdateStepTwo.java

diff --git a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/far/FarStringDefinition.java b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/far/FarStringDefinition.java
new file mode 100644 (file)
index 0000000..71adab4
--- /dev/null
@@ -0,0 +1,36 @@
+package org.tianocore.frameworkwizard.far;\r
+\r
+public class FarStringDefinition {\r
+\r
+    ///\r
+    /// Definition for all step's title string\r
+    ///\r
+    public static final String CREATE_STEP_ONE_TITLE = \r
+        "Create Framework Archive(FAR) - Step 1: Set FAR's basic information";\r
+    public static final String CREATE_STEP_TWO_TITLE = \r
+        "Create Framework Archive(FAR) - Step 2: Choose Packages and Platforms";\r
+    public static final String CREATE_STEP_THREE_TITLE = \r
+        "Create Framework Archive(FAR) - Step 3: Set file filter";\r
+    public static final String CREATE_STEP_FOUR_TITLE = \r
+        "Create Framework Archive(FAR) - Step 4: Choose target file and finish";\r
+\r
+    public static final String DELETE_STEP_ONE_TITLE = \r
+        "Delete Framework Archive(FAR) - Step 1: Choose FAR from framework database";\r
+    public static final String DELETE_STEP_TWO_TITLE = \r
+        "Delete Framework Archive(FAR) - Step 2: Choose delete mode and finish";\r
+    \r
+    public static final String UPDATE_STEP_ONE_TITLE = \r
+        "Update Framework Archive(FAR) - Step 1: Browse FAR file";\r
+    public static final String UPDATE_STEP_TWO_TITLE = \r
+        "Update Framework Archive(FAR) - Step 2: Summary";\r
+    \r
+    public static final String INSTALL_STEP_ONE_TITLE = \r
+        "Install Framework Archive(FAR) - Step 1: Browse FAR file";\r
+    public static final String INSTALL_STEP_TWO_TITLE = \r
+        "Install Framework Archive(FAR) - Step 2: Set path for packages or/and platforms";\r
+    \r
+    ///\r
+    /// \r
+    ///\r
+    \r
+}\r
index 314d0d0b1eceb6c8de32a717731f35e92278e228..24227242805b8fc6a94c627fcd4289ee6323256b 100644 (file)
@@ -35,6 +35,7 @@ import org.tianocore.frameworkwizard.common.Tools;
 import org.tianocore.frameworkwizard.common.ui.IDialog;\r
 import org.tianocore.frameworkwizard.far.AggregationOperation;\r
 import org.tianocore.frameworkwizard.far.Far;\r
+import org.tianocore.frameworkwizard.far.FarStringDefinition;\r
 import org.tianocore.frameworkwizard.far.PackageQuery;\r
 import org.tianocore.frameworkwizard.far.PackageQueryInterface;\r
 import org.tianocore.frameworkwizard.packaging.PackageIdentification;\r
@@ -194,7 +195,7 @@ public class CreateStepFour extends IDialog implements MouseListener {
     private void initialize() {\r
         this.setSize(700, 400);\r
         this.setContentPane(getJContentPane());\r
-        this.setTitle("Create Framework Archive(FAR) - Step 4: Finish");\r
+        this.setTitle(FarStringDefinition.CREATE_STEP_FOUR_TITLE);\r
         this.centerWindow();\r
     }\r
 \r
@@ -207,7 +208,7 @@ public class CreateStepFour extends IDialog implements MouseListener {
         if (jContentPane == null) {\r
             jLabel2 = new JLabel();\r
             jLabel2.setBounds(new java.awt.Rectangle(30,70,111,18));\r
-            jLabel2.setText("Select File to Save:  ");\r
+            jLabel2.setText("File to Save:  ");\r
             jLabel = new JLabel();\r
             jLabel.setBounds(new java.awt.Rectangle(29,108,320,20));\r
             jLabel.setText("This FAR will depend on following packages: ");\r
index 7439c82c0eccc69acacf8792de394820f5cb55ea..32d2da4278a70b23c44ac543a009e45f9a008d16 100644 (file)
@@ -30,6 +30,7 @@ import org.tianocore.frameworkwizard.common.ui.IDialog;
 import org.tianocore.frameworkwizard.common.ui.IFrame;\r
 import org.tianocore.frameworkwizard.common.ui.StarLabel;\r
 import org.tianocore.frameworkwizard.far.FarHeader;\r
+import org.tianocore.frameworkwizard.far.FarStringDefinition;\r
 \r
 public class CreateStepOne extends IDialog implements MouseListener {\r
 \r
@@ -397,7 +398,7 @@ public class CreateStepOne extends IDialog implements MouseListener {
     private void initialize() {\r
         this.setSize(700, 425);\r
         this.setContentPane(getJScrollPane());\r
-        this.setTitle("Create Framework Archive(FAR) - Step 1: Set FAR's baseic information");\r
+        this.setTitle(FarStringDefinition.CREATE_STEP_ONE_TITLE);\r
         this.centerWindow();\r
     }\r
 \r
@@ -600,7 +601,7 @@ public class CreateStepOne extends IDialog implements MouseListener {
             // Add some logic process here\r
             //\r
             if (!valid()) {\r
-                return;\r
+                return ;\r
             }\r
             if (stepTwo == null) {\r
                 stepTwo = new CreateStepTwo(this, true, this);\r
index 53a6f6f519fbd655bcb537a9111c0c9bd0c17794..380081066bb4fc4548986be76d753e0f43a73d05 100644 (file)
@@ -26,6 +26,8 @@ import javax.swing.JLabel;
 \r
 import org.tianocore.frameworkwizard.common.ui.IDialog;\r
 import org.tianocore.frameworkwizard.common.ui.iCheckBoxList.ICheckBoxList;\r
+import org.tianocore.frameworkwizard.far.FarStringDefinition;\r
+\r
 import javax.swing.JScrollPane;\r
 import javax.swing.JTextField;\r
 \r
@@ -76,8 +78,7 @@ public class CreateStepThree extends IDialog implements MouseListener {
         if (jTextArea == null) {\r
             jTextArea = new JTextArea();\r
             jTextArea.setBounds(new java.awt.Rectangle(30, 7, 642, 50));\r
-            jTextArea.setText("Step 2: Set File Filter\n");\r
-            jTextArea.append("Add more file filter regular expressions in text field separated with space. \n");\r
+            jTextArea.setText("Add more file filter regular expressions in text field separated with space. \n");\r
             jTextArea.append("Note that regular expressions please reference PERL language. ");\r
             jTextArea.setEditable(false);\r
         }\r
@@ -195,7 +196,7 @@ public class CreateStepThree extends IDialog implements MouseListener {
     private void initialize() {\r
         this.setSize(700, 400);\r
         this.setContentPane(getJContentPane());\r
-        this.setTitle("Create Framework Archive(FAR) - Step 3: Set File Filter");\r
+        this.setTitle(FarStringDefinition.CREATE_STEP_THREE_TITLE);\r
         this.centerWindow();\r
     }\r
 \r
index 75c4bc83c0b313fd4c79b5150b76c6634517a172..240ebef2a704064243685de229b0a9f45f200cfb 100644 (file)
@@ -29,6 +29,7 @@ import javax.swing.JTextArea;
 import org.tianocore.frameworkwizard.common.Log;\r
 import org.tianocore.frameworkwizard.common.ui.IDialog;\r
 import org.tianocore.frameworkwizard.common.ui.iCheckBoxList.ICheckBoxList;\r
+import org.tianocore.frameworkwizard.far.FarStringDefinition;\r
 import org.tianocore.frameworkwizard.packaging.PackageIdentification;\r
 import org.tianocore.frameworkwizard.platform.PlatformIdentification;\r
 import org.tianocore.frameworkwizard.workspace.WorkspaceTools;\r
@@ -84,8 +85,7 @@ public class CreateStepTwo extends IDialog implements MouseListener {
         if (jTextArea == null) {\r
             jTextArea = new JTextArea();\r
             jTextArea.setBounds(new java.awt.Rectangle(30, 7, 642, 50));\r
-            jTextArea.setText("Step 1: Choose Packages and Platforms\n");\r
-            jTextArea.append("Choose at least one package or platform. ");\r
+            jTextArea.setText("Choose at least one package or platform. ");\r
             jTextArea.setEditable(false);\r
         }\r
         return jTextArea;\r
@@ -209,7 +209,7 @@ public class CreateStepTwo extends IDialog implements MouseListener {
     private void initialize() {\r
         this.setSize(700, 400);\r
         this.setContentPane(getJContentPane());\r
-        this.setTitle("Create Framework Archive(FAR) - Step 2: Choose Packages and Platform");\r
+        this.setTitle(FarStringDefinition.CREATE_STEP_TWO_TITLE);\r
         this.centerWindow();\r
     }\r
 \r
index f861eeed064094c20634570fe8cbb0ae2b0a1696..c22097c7c7b9b628d7f9e25c6a8586c81a679412 100644 (file)
@@ -35,6 +35,7 @@ import org.tianocore.frameworkwizard.common.ui.IDialog;
 import org.tianocore.frameworkwizard.common.ui.IFrame;\r
 import org.tianocore.frameworkwizard.far.AggregationOperation;\r
 import org.tianocore.frameworkwizard.far.FarIdentification;\r
+import org.tianocore.frameworkwizard.far.FarStringDefinition;\r
 import org.tianocore.frameworkwizard.far.PackageQuery;\r
 import org.tianocore.frameworkwizard.far.PackageQueryInterface;\r
 import org.tianocore.frameworkwizard.packaging.PackageIdentification;\r
@@ -253,7 +254,7 @@ public class DeleteStepOne extends IDialog implements ListSelectionListener {
     private void initialize() {\r
         this.setSize(700, 400);\r
         this.setContentPane(getJContentPane());\r
-        this.setTitle("Delete Framework Archive(FAR) - Step 1: Choose FAR from framework database");\r
+        this.setTitle(FarStringDefinition.DELETE_STEP_ONE_TITLE);\r
         Dimension d = Toolkit.getDefaultToolkit().getScreenSize();\r
         this.setLocation((d.width - this.getSize().width) / 2, (d.height - this.getSize().height) / 2);\r
     }\r
index 012d23bb6c03fc4b664b0c9ccf3c88df325201d0..718fe18b1889d1396a0df2cea01f233959af0a0f 100644 (file)
@@ -33,6 +33,7 @@ import javax.swing.JRadioButton;
 import org.tianocore.frameworkwizard.common.DataType;\r
 import org.tianocore.frameworkwizard.common.ui.IDialog;\r
 import org.tianocore.frameworkwizard.far.FarIdentification;\r
+import org.tianocore.frameworkwizard.far.FarStringDefinition;\r
 import org.tianocore.frameworkwizard.packaging.PackageIdentification;\r
 import org.tianocore.frameworkwizard.platform.PlatformIdentification;\r
 import org.tianocore.frameworkwizard.workspace.WorkspaceTools;\r
@@ -174,7 +175,7 @@ public class DeleteStepTwo extends IDialog implements MouseListener {
     private void initialize() {\r
         this.setSize(700, 400);\r
         this.setContentPane(getJContentPane());\r
-        this.setTitle("Delete Framework Archive(FAR) - Step 2: Choose Delete Mode");\r
+        this.setTitle(FarStringDefinition.DELETE_STEP_TWO_TITLE);\r
         Dimension d = Toolkit.getDefaultToolkit().getScreenSize();\r
         this.setLocation((d.width - this.getSize().width) / 2, (d.height - this.getSize().height) / 2);\r
     }\r
index fabee7a8cd06664c9b436da0573d9cf98f098e5f..bfc84486a7124d8b0b78b8a4dfc8631678bb3a15 100644 (file)
@@ -38,6 +38,7 @@ import org.tianocore.frameworkwizard.common.ui.IDialog;
 import org.tianocore.frameworkwizard.common.ui.IFrame;\r
 import org.tianocore.frameworkwizard.far.DistributeRule;\r
 import org.tianocore.frameworkwizard.far.Far;\r
+import org.tianocore.frameworkwizard.far.FarStringDefinition;\r
 import org.tianocore.frameworkwizard.packaging.PackageIdentification;\r
 import org.tianocore.frameworkwizard.workspace.Workspace;\r
 \r
@@ -220,7 +221,7 @@ public class InstallStepOne extends IDialog implements MouseListener {
     private void initialize() {\r
         this.setSize(700, 400);\r
         this.setContentPane(getJContentPane());\r
-        this.setTitle("Install Framework Archive(FAR) - Step 1: Choose FAR file");\r
+        this.setTitle(FarStringDefinition.INSTALL_STEP_ONE_TITLE);\r
         Dimension d = Toolkit.getDefaultToolkit().getScreenSize();\r
         this.setLocation((d.width - this.getSize().width) / 2, (d.height - this.getSize().height) / 2);\r
     }\r
@@ -309,7 +310,7 @@ public class InstallStepOne extends IDialog implements MouseListener {
             fc.addChoosableFileFilter(new IFileFilter(DataType.FAR_SURFACE_AREA_EXT));\r
             fc.setCurrentDirectory(new File(Workspace.getCurrentWorkspace()));\r
 \r
-            int result = fc.showSaveDialog(new JPanel());\r
+            int result = fc.showOpenDialog(new JPanel());\r
             if (result == JFileChooser.APPROVE_OPTION) {\r
                 jLabelWarning.setVisible(false);\r
                 jTable.setVisible(false);\r
index 35793436a1926ed485a63d4d66269c39eeb8eb2b..7087634b52c6fc97676dac66e5a7c391484c4bfe 100644 (file)
@@ -41,6 +41,7 @@ import org.tianocore.frameworkwizard.common.Log;
 import org.tianocore.frameworkwizard.common.Tools;\r
 import org.tianocore.frameworkwizard.common.ui.IDialog;\r
 import org.tianocore.frameworkwizard.far.Far;\r
+import org.tianocore.frameworkwizard.far.FarStringDefinition;\r
 import org.tianocore.frameworkwizard.packaging.PackageIdentification;\r
 import org.tianocore.frameworkwizard.platform.PlatformIdentification;\r
 import org.tianocore.frameworkwizard.workspace.Workspace;\r
@@ -287,7 +288,7 @@ public class InstallStepTwo extends IDialog implements MouseListener {
     private void initialize() {\r
         this.setSize(700, 400);\r
         this.setContentPane(getJContentPane());\r
-        this.setTitle("Install Framework Archive(FAR) - Step 2: Set Path for Packages and Platforms");\r
+        this.setTitle(FarStringDefinition.INSTALL_STEP_TWO_TITLE);\r
         Dimension d = Toolkit.getDefaultToolkit().getScreenSize();\r
         this.setLocation((d.width - this.getSize().width) / 2, (d.height - this.getSize().height) / 2);\r
     }\r
index 47d3db52e49425ed4ee03b55a1660969f203c934..bea6f7c7a00b6d30f8c99dc3e610ef0b973517e8 100644 (file)
@@ -36,6 +36,7 @@ import org.tianocore.frameworkwizard.common.ui.IDialog;
 import org.tianocore.frameworkwizard.common.ui.IFrame;\r
 import org.tianocore.frameworkwizard.far.Far;\r
 import org.tianocore.frameworkwizard.far.FarIdentification;\r
+import org.tianocore.frameworkwizard.far.FarStringDefinition;\r
 import org.tianocore.frameworkwizard.workspace.Workspace;\r
 import org.tianocore.frameworkwizard.workspace.WorkspaceTools;\r
 \r
@@ -200,7 +201,7 @@ public class UpdateStepOne extends IDialog implements MouseListener {
     private void initialize() {\r
         this.setSize(700, 400);\r
         this.setContentPane(getJContentPane());\r
-        this.setTitle("Update Framework Archive(FAR) - Step 1: Choose FAR File");\r
+        this.setTitle(FarStringDefinition.UPDATE_STEP_ONE_TITLE);\r
         Dimension d = Toolkit.getDefaultToolkit().getScreenSize();\r
         this.setLocation((d.width - this.getSize().width) / 2, (d.height - this.getSize().height) / 2);\r
     }\r
@@ -276,7 +277,7 @@ public class UpdateStepOne extends IDialog implements MouseListener {
             fc.addChoosableFileFilter(new IFileFilter(DataType.FAR_SURFACE_AREA_EXT));\r
             fc.setCurrentDirectory(new File(Workspace.getCurrentWorkspace()));\r
 \r
-            int result = fc.showSaveDialog(new JPanel());\r
+            int result = fc.showOpenDialog(new JPanel());\r
             if (result == JFileChooser.APPROVE_OPTION) {\r
                 this.jTextFieldFarFile.setText(Tools.addPathExt(fc.getSelectedFile().getPath(),\r
                                                                 DataType.RETURN_TYPE_FAR_SURFACE_AREA));\r
index 45e6e979911aa12424fef3d60707e31e75d599c0..0ead2cf6dc3ef442137285cca119c3142279e274 100644 (file)
@@ -41,6 +41,7 @@ import org.tianocore.frameworkwizard.common.ui.IDialog;
 import org.tianocore.frameworkwizard.far.AggregationOperation;\r
 import org.tianocore.frameworkwizard.far.DistributeRule;\r
 import org.tianocore.frameworkwizard.far.Far;\r
+import org.tianocore.frameworkwizard.far.FarStringDefinition;\r
 import org.tianocore.frameworkwizard.packaging.PackageIdentification;\r
 import org.tianocore.frameworkwizard.platform.PlatformIdentification;\r
 import org.tianocore.frameworkwizard.workspace.Workspace;\r
@@ -220,7 +221,7 @@ public class UpdateStepTwo extends IDialog implements MouseListener {
     private void initialize() {\r
         this.setSize(700, 400);\r
         this.setContentPane(getJContentPane());\r
-        this.setTitle("Update Framework Archive(FAR) - Step 2: Summary");\r
+        this.setTitle(FarStringDefinition.UPDATE_STEP_TWO_TITLE);\r
         Dimension d = Toolkit.getDefaultToolkit().getScreenSize();\r
         this.setLocation((d.width - this.getSize().width) / 2, (d.height - this.getSize().height) / 2);\r
     }\r