mirror of https://github.com/acidanthera/audk.git
1. Fix displaying wrong file type bug.
2. Fix a typo bug in Tool Chain Config frame. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@819 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
73da4c040f
commit
8f4f211c8d
|
@ -293,6 +293,15 @@ public class FrameworkWizardUI extends IFrame implements MouseListener, TreeSele
|
||||||
//private JToolBar jToolBarEdit = null;
|
//private JToolBar jToolBarEdit = null;
|
||||||
|
|
||||||
//private JToolBar jToolBarWindow = null;
|
//private JToolBar jToolBarWindow = null;
|
||||||
|
|
||||||
|
private static FrameworkWizardUI fwui = null;
|
||||||
|
|
||||||
|
public static FrameworkWizardUI getInstance() {
|
||||||
|
if (fwui == null) {
|
||||||
|
fwui = new FrameworkWizardUI();
|
||||||
|
}
|
||||||
|
return fwui;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
This method initializes jMenuBar
|
This method initializes jMenuBar
|
||||||
|
@ -1648,7 +1657,7 @@ public class FrameworkWizardUI extends IFrame implements MouseListener, TreeSele
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
FrameworkWizardUI module = new FrameworkWizardUI();
|
FrameworkWizardUI module = FrameworkWizardUI.getInstance();
|
||||||
module.setVisible(true);
|
module.setVisible(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2885,12 +2894,8 @@ public class FrameworkWizardUI extends IFrame implements MouseListener, TreeSele
|
||||||
|
|
||||||
**/
|
**/
|
||||||
private void setupToolChainConfiguration() {
|
private void setupToolChainConfiguration() {
|
||||||
ToolChainConfig tcc = new ToolChainConfig(this, true);
|
ToolChainConfig tcc = ToolChainConfig.getInstance();
|
||||||
int result = tcc.showDialog();
|
tcc.showDialog();
|
||||||
|
|
||||||
if (result == DataType.RETURN_TYPE_CANCEL) {
|
|
||||||
tcc.dispose();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -134,7 +134,7 @@ public class NewFileChooser extends IDialog {
|
||||||
private JRadioButton getJRadioButtonPlatform() {
|
private JRadioButton getJRadioButtonPlatform() {
|
||||||
if (jRadioButtonPlatform == null) {
|
if (jRadioButtonPlatform == null) {
|
||||||
jRadioButtonPlatform = new JRadioButton();
|
jRadioButtonPlatform = new JRadioButton();
|
||||||
jRadioButtonPlatform.setText(DataType.PACKAGE_SURFACE_AREA);
|
jRadioButtonPlatform.setText(DataType.PLATFORM_SURFACE_AREA);
|
||||||
jRadioButtonPlatform.setBounds(new java.awt.Rectangle(20, 80, 240, 20));
|
jRadioButtonPlatform.setBounds(new java.awt.Rectangle(20, 80, 240, 20));
|
||||||
}
|
}
|
||||||
return jRadioButtonPlatform;
|
return jRadioButtonPlatform;
|
||||||
|
@ -171,7 +171,7 @@ public class NewFileChooser extends IDialog {
|
||||||
private void init() {
|
private void init() {
|
||||||
this.setSize(310, 220);
|
this.setSize(310, 220);
|
||||||
this.setContentPane(getJContentPane());
|
this.setContentPane(getJContentPane());
|
||||||
this.setTitle("New Framework File");
|
this.setTitle("Select New File Type");
|
||||||
this.centerWindow();
|
this.centerWindow();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -271,7 +271,7 @@ public class SelectModuleBelong extends IDialog {
|
||||||
private void init() {
|
private void init() {
|
||||||
this.setSize(500, 200);
|
this.setSize(500, 200);
|
||||||
this.setContentPane(getJContentPane());
|
this.setContentPane(getJContentPane());
|
||||||
this.setTitle("New Module");
|
this.setTitle("New");
|
||||||
this.centerWindow();
|
this.centerWindow();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -15,6 +15,7 @@
|
||||||
package org.tianocore.frameworkwizard;
|
package org.tianocore.frameworkwizard;
|
||||||
|
|
||||||
import java.awt.event.ActionEvent;
|
import java.awt.event.ActionEvent;
|
||||||
|
import java.awt.event.WindowEvent;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
||||||
|
@ -38,11 +39,10 @@ import org.tianocore.frameworkwizard.common.Log;
|
||||||
import org.tianocore.frameworkwizard.common.Tools;
|
import org.tianocore.frameworkwizard.common.Tools;
|
||||||
import org.tianocore.frameworkwizard.common.Identifications.ToolChainConfigId;
|
import org.tianocore.frameworkwizard.common.Identifications.ToolChainConfigId;
|
||||||
import org.tianocore.frameworkwizard.common.Identifications.ToolChainConfigVector;
|
import org.tianocore.frameworkwizard.common.Identifications.ToolChainConfigVector;
|
||||||
import org.tianocore.frameworkwizard.common.ui.IDialog;
|
|
||||||
import org.tianocore.frameworkwizard.common.ui.IFrame;
|
import org.tianocore.frameworkwizard.common.ui.IFrame;
|
||||||
import org.tianocore.frameworkwizard.workspace.Workspace;
|
import org.tianocore.frameworkwizard.workspace.Workspace;
|
||||||
|
|
||||||
public class ToolChainConfig extends IDialog implements ListSelectionListener, TableModelListener{
|
public class ToolChainConfig extends IFrame implements ListSelectionListener, TableModelListener{
|
||||||
|
|
||||||
///
|
///
|
||||||
/// Define Class Members
|
/// Define Class Members
|
||||||
|
@ -86,6 +86,10 @@ public class ToolChainConfig extends IDialog implements ListSelectionListener, T
|
||||||
|
|
||||||
private JButton jButtonHelp = null;
|
private JButton jButtonHelp = null;
|
||||||
|
|
||||||
|
private static ToolChainConfig tcc = null;
|
||||||
|
|
||||||
|
private ToolChainConfigHelp tcch = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
This method initializes jScrollPane
|
This method initializes jScrollPane
|
||||||
|
|
||||||
|
@ -260,12 +264,19 @@ public class ToolChainConfig extends IDialog implements ListSelectionListener, T
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static ToolChainConfig getInstance() {
|
||||||
|
if (tcc == null) {
|
||||||
|
tcc = new ToolChainConfig();
|
||||||
|
}
|
||||||
|
return tcc;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This is the default constructor
|
* This is the default constructor
|
||||||
*/
|
*/
|
||||||
public ToolChainConfig(IFrame parentFrame, boolean modal) {
|
public ToolChainConfig() {
|
||||||
super(parentFrame, modal);
|
super();
|
||||||
init();
|
init();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -337,8 +348,7 @@ public class ToolChainConfig extends IDialog implements ListSelectionListener, T
|
||||||
*/
|
*/
|
||||||
public void actionPerformed(ActionEvent arg0) {
|
public void actionPerformed(ActionEvent arg0) {
|
||||||
if (arg0.getSource() == jButtonClose) {
|
if (arg0.getSource() == jButtonClose) {
|
||||||
this.setVisible(false);
|
this.exit();
|
||||||
this.returnType = DataType.RETURN_TYPE_CANCEL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (arg0.getSource() == jButtonOpen) {
|
if (arg0.getSource() == jButtonOpen) {
|
||||||
|
@ -400,7 +410,7 @@ public class ToolChainConfig extends IDialog implements ListSelectionListener, T
|
||||||
}
|
}
|
||||||
|
|
||||||
if (arg0.getSource() == jButtonHelp) {
|
if (arg0.getSource() == jButtonHelp) {
|
||||||
ToolChainConfigHelp tcch = new ToolChainConfigHelp();
|
tcch = ToolChainConfigHelp.getInstance();
|
||||||
tcch.setVisible(true);
|
tcch.setVisible(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -477,4 +487,21 @@ public class ToolChainConfig extends IDialog implements ListSelectionListener, T
|
||||||
this.vtcc.getToolChainConfigs(row).setValue(m.getValueAt(row, 1).toString());
|
this.vtcc.getToolChainConfigs(row).setValue(m.getValueAt(row, 1).toString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see java.awt.event.WindowListener#windowClosing(java.awt.event.WindowEvent)
|
||||||
|
*
|
||||||
|
* Override windowClosing to popup warning message to confirm quit
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public void windowClosing(WindowEvent arg0) {
|
||||||
|
this.exit();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void exit() {
|
||||||
|
this.setVisible(false);
|
||||||
|
if (tcch != null) {
|
||||||
|
tcch.dispose();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,6 +25,8 @@ public class ToolChainConfigHelp extends JFrame implements ActionListener {
|
||||||
private JTextPane jTextPane = null;
|
private JTextPane jTextPane = null;
|
||||||
|
|
||||||
private JButton jButtonClose = null;
|
private JButton jButtonClose = null;
|
||||||
|
|
||||||
|
private static ToolChainConfigHelp tcch = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This method initializes jTextPane
|
* This method initializes jTextPane
|
||||||
|
@ -38,7 +40,7 @@ public class ToolChainConfigHelp extends JFrame implements ActionListener {
|
||||||
jTextPane.setBackground(new java.awt.Color(238,238,238));
|
jTextPane.setBackground(new java.awt.Color(238,238,238));
|
||||||
jTextPane.setEditable(false);
|
jTextPane.setEditable(false);
|
||||||
helpContent = helpContent
|
helpContent = helpContent
|
||||||
+ "The coding forthe Property is: TARGET_TAGNAME_ARCH_COMMAND_ATTR" + DataType.UNIX_LINE_SEPARATOR
|
+ "The coding for the Property is: TARGET_TAGNAME_ARCH_COMMAND_ATTR" + DataType.UNIX_LINE_SEPARATOR
|
||||||
+ "The Value, is either afull path, full path and filename or a reserved word." + DataType.UNIX_LINE_SEPARATOR
|
+ "The Value, is either afull path, full path and filename or a reserved word." + DataType.UNIX_LINE_SEPARATOR
|
||||||
+ DataType.UNIX_LINE_SEPARATOR
|
+ DataType.UNIX_LINE_SEPARATOR
|
||||||
+ DataType.UNIX_LINE_SEPARATOR
|
+ DataType.UNIX_LINE_SEPARATOR
|
||||||
|
@ -57,7 +59,6 @@ public class ToolChainConfigHelp extends JFrame implements ActionListener {
|
||||||
+ "NOTE: The \"*\" symbol may be used as a wildcard character in most of these fields, refer to the tools_def.txt and the \"EDK II Build and Packaging Architecture Specification\" for more details." + DataType.UNIX_LINE_SEPARATOR
|
+ "NOTE: The \"*\" symbol may be used as a wildcard character in most of these fields, refer to the tools_def.txt and the \"EDK II Build and Packaging Architecture Specification\" for more details." + DataType.UNIX_LINE_SEPARATOR
|
||||||
+ DataType.UNIX_LINE_SEPARATOR;
|
+ DataType.UNIX_LINE_SEPARATOR;
|
||||||
|
|
||||||
|
|
||||||
jTextPane.setText(helpContent);
|
jTextPane.setText(helpContent);
|
||||||
}
|
}
|
||||||
return jTextPane;
|
return jTextPane;
|
||||||
|
@ -78,6 +79,13 @@ public class ToolChainConfigHelp extends JFrame implements ActionListener {
|
||||||
return jButtonClose;
|
return jButtonClose;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static ToolChainConfigHelp getInstance() {
|
||||||
|
if (tcch == null) {
|
||||||
|
tcch = new ToolChainConfigHelp();
|
||||||
|
}
|
||||||
|
return tcch;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
||||||
@param args
|
@param args
|
||||||
|
@ -103,6 +111,7 @@ public class ToolChainConfigHelp extends JFrame implements ActionListener {
|
||||||
*/
|
*/
|
||||||
private void initialize() {
|
private void initialize() {
|
||||||
this.setSize(625, 520);
|
this.setSize(625, 520);
|
||||||
|
this.setResizable(false);
|
||||||
this.setTitle("How to Setup Tool Chain Configuration");
|
this.setTitle("How to Setup Tool Chain Configuration");
|
||||||
this.setContentPane(getJContentPane());
|
this.setContentPane(getJContentPane());
|
||||||
}
|
}
|
||||||
|
@ -126,7 +135,5 @@ public class ToolChainConfigHelp extends JFrame implements ActionListener {
|
||||||
if (arg0.getSource() == jButtonClose) {
|
if (arg0.getSource() == jButtonClose) {
|
||||||
this.dispose();
|
this.dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -48,7 +48,7 @@ public class IFrame extends JFrame implements ActionListener, WindowListener {
|
||||||
// 1 - Whne editing module
|
// 1 - Whne editing module
|
||||||
//
|
//
|
||||||
private int intExitType = 0;
|
private int intExitType = 0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Main class, used for test
|
Main class, used for test
|
||||||
|
|
||||||
|
@ -214,4 +214,28 @@ public class IFrame extends JFrame implements ActionListener, WindowListener {
|
||||||
public int showSaveDialog() {
|
public int showSaveDialog() {
|
||||||
return JOptionPane.showConfirmDialog(null, "Save all changed files?", "Save", JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.WARNING_MESSAGE);
|
return JOptionPane.showConfirmDialog(null, "Save all changed files?", "Save", JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.WARNING_MESSAGE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
Check the input data is empty or not
|
||||||
|
|
||||||
|
@param strValue The input data which need be checked
|
||||||
|
|
||||||
|
@retval true - The input data is empty
|
||||||
|
@retval fals - The input data is not empty
|
||||||
|
|
||||||
|
**/
|
||||||
|
public boolean isEmpty(String strValue) {
|
||||||
|
if (strValue.length() > 0) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
Display the dialog
|
||||||
|
|
||||||
|
**/
|
||||||
|
public void showDialog() {
|
||||||
|
this.setVisible(true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue