--- /dev/null
+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
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
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
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
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
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
// 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
\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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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