mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-26 23:24:03 +02:00
Fixed Absolute position of fields, Added ToolTipText and made HelpText a Scrolling Text Area
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1132 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
5101eff919
commit
ccb063b1f2
@ -348,7 +348,7 @@ public class EventsDlg extends IDialog {
|
|||||||
jStarLabel1 = new StarLabel();
|
jStarLabel1 = new StarLabel();
|
||||||
jStarLabel1.setLocation(new java.awt.Point(2, 10));
|
jStarLabel1.setLocation(new java.awt.Point(2, 10));
|
||||||
jLabelEventType = new JLabel();
|
jLabelEventType = new JLabel();
|
||||||
jLabelEventType.setText("Type");
|
jLabelEventType.setText("Select Event Type");
|
||||||
jLabelEventType.setBounds(new java.awt.Rectangle(15, 10, 145, 20));
|
jLabelEventType.setBounds(new java.awt.Rectangle(15, 10, 145, 20));
|
||||||
|
|
||||||
jStarLabel2 = new StarLabel();
|
jStarLabel2 = new StarLabel();
|
||||||
@ -360,7 +360,7 @@ public class EventsDlg extends IDialog {
|
|||||||
jStarLabel3 = new StarLabel();
|
jStarLabel3 = new StarLabel();
|
||||||
jStarLabel3.setLocation(new java.awt.Point(2, 60));
|
jStarLabel3.setLocation(new java.awt.Point(2, 60));
|
||||||
jLabelGroup = new JLabel();
|
jLabelGroup = new JLabel();
|
||||||
jLabelGroup.setText("Event Type");
|
jLabelGroup.setText("Event Group Type");
|
||||||
jLabelGroup.setBounds(new java.awt.Rectangle(15, 60, 145, 20));
|
jLabelGroup.setBounds(new java.awt.Rectangle(15, 60, 145, 20));
|
||||||
|
|
||||||
jStarLabel4 = new StarLabel();
|
jStarLabel4 = new StarLabel();
|
||||||
@ -375,11 +375,11 @@ public class EventsDlg extends IDialog {
|
|||||||
|
|
||||||
jLabelFeatureFlag = new JLabel();
|
jLabelFeatureFlag = new JLabel();
|
||||||
jLabelFeatureFlag.setBounds(new java.awt.Rectangle(15, 155, 145, 20));
|
jLabelFeatureFlag.setBounds(new java.awt.Rectangle(15, 155, 145, 20));
|
||||||
jLabelFeatureFlag.setText("Feature Flag");
|
jLabelFeatureFlag.setText("Feature Flag Expression");
|
||||||
|
|
||||||
jLabelArch = new JLabel();
|
jLabelArch = new JLabel();
|
||||||
jLabelArch.setBounds(new java.awt.Rectangle(15, 180, 145, 20));
|
jLabelArch.setBounds(new java.awt.Rectangle(15, 180, 145, 20));
|
||||||
jLabelArch.setText("Arch");
|
jLabelArch.setText("Supported Architectures");
|
||||||
jArchCheckBox = new ArchCheckBox();
|
jArchCheckBox = new ArchCheckBox();
|
||||||
jArchCheckBox.setBounds(new java.awt.Rectangle(160, 180, 320, 20));
|
jArchCheckBox.setBounds(new java.awt.Rectangle(160, 180, 320, 20));
|
||||||
jArchCheckBox.setPreferredSize(new java.awt.Dimension(320, 20));
|
jArchCheckBox.setPreferredSize(new java.awt.Dimension(320, 20));
|
||||||
|
@ -257,16 +257,16 @@ public class ExternsDlg extends IDialog implements ItemListener {
|
|||||||
jArchCheckBox.setPreferredSize(new java.awt.Dimension(320, 20));
|
jArchCheckBox.setPreferredSize(new java.awt.Dimension(320, 20));
|
||||||
jLabelC_Name = new JLabel();
|
jLabelC_Name = new JLabel();
|
||||||
jLabelC_Name.setBounds(new java.awt.Rectangle(15, 35, 140, 20));
|
jLabelC_Name.setBounds(new java.awt.Rectangle(15, 35, 140, 20));
|
||||||
jLabelC_Name.setText("Value");
|
jLabelC_Name.setText("Enter Value");
|
||||||
jLabelName = new JLabel();
|
jLabelName = new JLabel();
|
||||||
jLabelName.setText("Choose Type");
|
jLabelName.setText("Choose Extern Type");
|
||||||
jLabelName.setBounds(new java.awt.Rectangle(15, 10, 140, 20));
|
jLabelName.setBounds(new java.awt.Rectangle(15, 10, 140, 20));
|
||||||
jLabelArch = new JLabel();
|
jLabelArch = new JLabel();
|
||||||
jLabelArch.setBounds(new java.awt.Rectangle(15, 85, 140, 20));
|
jLabelArch.setBounds(new java.awt.Rectangle(15, 85, 140, 20));
|
||||||
jLabelArch.setText("Arch");
|
jLabelArch.setText("Supported Architectures");
|
||||||
jLabelFeatureFlag = new JLabel();
|
jLabelFeatureFlag = new JLabel();
|
||||||
jLabelFeatureFlag.setBounds(new java.awt.Rectangle(15, 60, 140, 20));
|
jLabelFeatureFlag.setBounds(new java.awt.Rectangle(15, 60, 140, 20));
|
||||||
jLabelFeatureFlag.setText("Feature Flag");
|
jLabelFeatureFlag.setText("Feature Flag Expression");
|
||||||
|
|
||||||
jContentPane = new JPanel();
|
jContentPane = new JPanel();
|
||||||
jContentPane.setLayout(null);
|
jContentPane.setLayout(null);
|
||||||
|
@ -362,14 +362,14 @@ public class LibraryClassDefsDlg extends IDialog {
|
|||||||
jArchCheckBox.setBounds(new java.awt.Rectangle(160, 110, 320, 20));
|
jArchCheckBox.setBounds(new java.awt.Rectangle(160, 110, 320, 20));
|
||||||
jArchCheckBox.setPreferredSize(new java.awt.Dimension(320, 20));
|
jArchCheckBox.setPreferredSize(new java.awt.Dimension(320, 20));
|
||||||
jLabelHelpText = new JLabel();
|
jLabelHelpText = new JLabel();
|
||||||
jLabelHelpText.setBounds(new java.awt.Rectangle(14, 60, 140, 20));
|
jLabelHelpText.setBounds(new java.awt.Rectangle(15, 60, 140, 20));
|
||||||
jLabelHelpText.setText("Help Text");
|
jLabelHelpText.setText("Help Text");
|
||||||
jLabelModuleList = new JLabel();
|
jLabelModuleList = new JLabel();
|
||||||
jLabelModuleList.setBounds(new java.awt.Rectangle(15, 135, 140, 20));
|
jLabelModuleList.setBounds(new java.awt.Rectangle(15, 135, 140, 20));
|
||||||
jLabelModuleList.setText("Sup Module List");
|
jLabelModuleList.setText("Supported Module Types");
|
||||||
jLabelArch = new JLabel();
|
jLabelArch = new JLabel();
|
||||||
jLabelArch.setBounds(new java.awt.Rectangle(15, 110, 140, 20));
|
jLabelArch.setBounds(new java.awt.Rectangle(15, 110, 140, 20));
|
||||||
jLabelArch.setText("Sup Arch List");
|
jLabelArch.setText("Supported Architectures");
|
||||||
jLabelFeatureFlag = new JLabel();
|
jLabelFeatureFlag = new JLabel();
|
||||||
jLabelFeatureFlag.setBounds(new java.awt.Rectangle(15, 85, 140, 20));
|
jLabelFeatureFlag.setBounds(new java.awt.Rectangle(15, 85, 140, 20));
|
||||||
jLabelFeatureFlag.setText("Feature Flag");
|
jLabelFeatureFlag.setText("Feature Flag");
|
||||||
@ -404,9 +404,9 @@ public class LibraryClassDefsDlg extends IDialog {
|
|||||||
jContentPane.add(getJTextFieldFeatureFlag(), null);
|
jContentPane.add(getJTextFieldFeatureFlag(), null);
|
||||||
jContentPane.add(jLabelArch, null);
|
jContentPane.add(jLabelArch, null);
|
||||||
jStarLabel1 = new StarLabel();
|
jStarLabel1 = new StarLabel();
|
||||||
jStarLabel1.setLocation(new java.awt.Point(0, 10));
|
jStarLabel1.setLocation(new java.awt.Point(2, 10));
|
||||||
jStarLabel2 = new StarLabel();
|
jStarLabel2 = new StarLabel();
|
||||||
jStarLabel2.setLocation(new java.awt.Point(0, 35));
|
jStarLabel2.setLocation(new java.awt.Point(2, 35));
|
||||||
|
|
||||||
jContentPane.add(jStarLabel1, null);
|
jContentPane.add(jStarLabel1, null);
|
||||||
jContentPane.add(jStarLabel2, null);
|
jContentPane.add(jStarLabel2, null);
|
||||||
|
@ -38,14 +38,13 @@ import org.tianocore.frameworkwizard.packaging.PackageIdentification;
|
|||||||
import org.tianocore.frameworkwizard.workspace.WorkspaceTools;
|
import org.tianocore.frameworkwizard.workspace.WorkspaceTools;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
The class is used to create, update Include of MSA/MBD file
|
* The class is used to create, update Include of MSA/MBD file It extends
|
||||||
It extends IInternalFrame
|
* IInternalFrame
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*
|
||||||
**/
|
*/
|
||||||
public class PackageDepDlg extends IDialog implements ItemListener {
|
public class PackageDepDlg extends IDialog implements ItemListener {
|
||||||
|
|
||||||
// /
|
// /
|
||||||
// / Define class Serial Version UID
|
// / Define class Serial Version UID
|
||||||
// /
|
// /
|
||||||
@ -175,9 +174,9 @@ public class PackageDepDlg extends IDialog implements ItemListener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
This method initializes jScrollPane
|
* This method initializes jScrollPane
|
||||||
|
*
|
||||||
@return javax.swing.JScrollPane
|
* @return javax.swing.JScrollPane
|
||||||
*/
|
*/
|
||||||
private JScrollPane getJScrollPane() {
|
private JScrollPane getJScrollPane() {
|
||||||
if (jScrollPane == null) {
|
if (jScrollPane == null) {
|
||||||
@ -188,11 +187,11 @@ public class PackageDepDlg extends IDialog implements ItemListener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
This method initializes jButtonOk
|
* This method initializes jButtonOk
|
||||||
|
*
|
||||||
@return javax.swing.JButton
|
* @return javax.swing.JButton
|
||||||
|
*
|
||||||
**/
|
*/
|
||||||
private JButton getJButtonOk() {
|
private JButton getJButtonOk() {
|
||||||
if (jButtonOk == null) {
|
if (jButtonOk == null) {
|
||||||
jButtonOk = new JButton();
|
jButtonOk = new JButton();
|
||||||
@ -204,11 +203,11 @@ public class PackageDepDlg extends IDialog implements ItemListener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
This method initializes jButtonCancel
|
* This method initializes jButtonCancel
|
||||||
|
*
|
||||||
@return javax.swing.JButton
|
* @return javax.swing.JButton
|
||||||
|
*
|
||||||
**/
|
*/
|
||||||
private JButton getJButtonCancel() {
|
private JButton getJButtonCancel() {
|
||||||
if (jButtonCancel == null) {
|
if (jButtonCancel == null) {
|
||||||
jButtonCancel = new JButton();
|
jButtonCancel = new JButton();
|
||||||
@ -224,9 +223,9 @@ public class PackageDepDlg extends IDialog implements ItemListener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
This method initializes this
|
* This method initializes this
|
||||||
|
*
|
||||||
**/
|
*/
|
||||||
private void init() {
|
private void init() {
|
||||||
this.setSize(508, 188);
|
this.setSize(508, 188);
|
||||||
this.setContentPane(getJScrollPane());
|
this.setContentPane(getJScrollPane());
|
||||||
@ -237,9 +236,9 @@ public class PackageDepDlg extends IDialog implements ItemListener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
This method initializes this
|
* This method initializes this
|
||||||
|
*
|
||||||
**/
|
*/
|
||||||
private void init(PackageDependenciesIdentification inPackageDependenciesIdentification) {
|
private void init(PackageDependenciesIdentification inPackageDependenciesIdentification) {
|
||||||
init();
|
init();
|
||||||
this.pdid = inPackageDependenciesIdentification;
|
this.pdid = inPackageDependenciesIdentification;
|
||||||
@ -253,20 +252,21 @@ public class PackageDepDlg extends IDialog implements ItemListener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
This is the default constructor
|
* This is the default constructor
|
||||||
|
*
|
||||||
**/
|
*/
|
||||||
public PackageDepDlg(PackageDependenciesIdentification inPackageDependenciesIdentification, IFrame iFrame) {
|
public PackageDepDlg(PackageDependenciesIdentification inPackageDependenciesIdentification, IFrame iFrame) {
|
||||||
super(iFrame, true);
|
super(iFrame, true);
|
||||||
init(inPackageDependenciesIdentification);
|
init(inPackageDependenciesIdentification);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Disable all components when the mode is view
|
* Disable all components when the mode is view
|
||||||
|
*
|
||||||
@param isView true - The view mode; false - The non-view mode
|
* @param isView
|
||||||
|
* true - The view mode; false - The non-view mode
|
||||||
**/
|
*
|
||||||
|
*/
|
||||||
public void setViewMode(boolean isView) {
|
public void setViewMode(boolean isView) {
|
||||||
if (isView) {
|
if (isView) {
|
||||||
this.jComboBoxPackageName.setEnabled(!isView);
|
this.jComboBoxPackageName.setEnabled(!isView);
|
||||||
@ -274,52 +274,54 @@ public class PackageDepDlg extends IDialog implements ItemListener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
This method initializes jContentPane
|
* This method initializes jContentPane
|
||||||
|
*
|
||||||
@return javax.swing.JPanel jContentPane
|
* @return javax.swing.JPanel jContentPane
|
||||||
|
*
|
||||||
**/
|
*/
|
||||||
private JPanel getJContentPane() {
|
private JPanel getJContentPane() {
|
||||||
if (jContentPane == null) {
|
if (jContentPane == null) {
|
||||||
|
jStarLabel1 = new StarLabel();
|
||||||
|
jStarLabel1.setLocation(new java.awt.Point(2, 10));
|
||||||
|
jLabelPackageName = new JLabel();
|
||||||
|
jLabelPackageName.setBounds(new java.awt.Rectangle(15, 10, 145, 20));
|
||||||
|
jLabelPackageName.setText("Package Name");
|
||||||
|
|
||||||
|
jLabelPackageVersion = new JLabel();
|
||||||
|
jLabelPackageVersion.setBounds(new java.awt.Rectangle(15, 35, 145, 20));
|
||||||
|
jLabelPackageVersion.setText("Package Version");
|
||||||
|
|
||||||
|
jLabelPackageGuid = new JLabel();
|
||||||
|
jLabelPackageGuid.setBounds(new java.awt.Rectangle(15, 35, 145, 20));
|
||||||
|
jLabelPackageGuid.setText("Package Guid");
|
||||||
|
jLabelPackageGuid.setVisible(false);
|
||||||
|
|
||||||
|
jLabelFeatureFlag = new JLabel();
|
||||||
|
jLabelFeatureFlag.setBounds(new java.awt.Rectangle(15, 60, 145, 20));
|
||||||
|
jLabelFeatureFlag.setText("Feature Flag Expression");
|
||||||
|
|
||||||
|
jLabelArch = new JLabel();
|
||||||
|
jLabelArch.setBounds(new java.awt.Rectangle(15, 85, 145, 20));
|
||||||
|
jLabelArch.setText("Supported Architectures");
|
||||||
jArchCheckBox = new ArchCheckBox();
|
jArchCheckBox = new ArchCheckBox();
|
||||||
jArchCheckBox.setBounds(new java.awt.Rectangle(160, 85, 320, 20));
|
jArchCheckBox.setBounds(new java.awt.Rectangle(160, 85, 320, 20));
|
||||||
jArchCheckBox.setPreferredSize(new java.awt.Dimension(320, 20));
|
jArchCheckBox.setPreferredSize(new java.awt.Dimension(320, 20));
|
||||||
jLabelArch = new JLabel();
|
|
||||||
jLabelArch.setBounds(new java.awt.Rectangle(15, 85, 140, 20));
|
|
||||||
jLabelArch.setText("Sup Arch List");
|
|
||||||
jLabelPackageVersion = new JLabel();
|
|
||||||
jLabelPackageVersion.setBounds(new java.awt.Rectangle(15, 35, 140, 20));
|
|
||||||
jLabelPackageVersion.setText("Package Version");
|
|
||||||
jLabelPackageGuid = new JLabel();
|
|
||||||
jLabelPackageGuid.setBounds(new java.awt.Rectangle(15, 35, 140, 20));
|
|
||||||
jLabelPackageGuid.setText("Package Guid");
|
|
||||||
jLabelPackageGuid.setVisible(false);
|
|
||||||
jLabelPackageName = new JLabel();
|
|
||||||
jLabelPackageName.setBounds(new java.awt.Rectangle(15, 10, 140, 20));
|
|
||||||
jLabelPackageName.setText("Package Name");
|
|
||||||
|
|
||||||
jContentPane = new JPanel();
|
jContentPane = new JPanel();
|
||||||
jContentPane.setLayout(null);
|
jContentPane.setLayout(null);
|
||||||
jContentPane.setPreferredSize(new java.awt.Dimension(490, 140));
|
jContentPane.setPreferredSize(new java.awt.Dimension(485, 145));
|
||||||
|
|
||||||
jContentPane.add(jLabelPackageName, null);
|
|
||||||
jStarLabel1 = new StarLabel();
|
|
||||||
jStarLabel1.setLocation(new java.awt.Point(0, 10));
|
|
||||||
|
|
||||||
jContentPane.add(jStarLabel1, null);
|
jContentPane.add(jStarLabel1, null);
|
||||||
|
jContentPane.add(jLabelPackageName, null);
|
||||||
jContentPane.add(getJComboBoxPackageName(), null);
|
jContentPane.add(getJComboBoxPackageName(), null);
|
||||||
jContentPane.add(jLabelPackageGuid, null);
|
jContentPane.add(jLabelPackageGuid, null);
|
||||||
jContentPane.add(getJTextFieldPackageGuid(), null);
|
jContentPane.add(getJTextFieldPackageGuid(), null);
|
||||||
jContentPane.add(getJButtonGenerateGuid(), null);
|
|
||||||
jContentPane.add(jLabelPackageVersion, null);
|
jContentPane.add(jLabelPackageVersion, null);
|
||||||
jContentPane.add(getJTextFieldPackageVersion(), null);
|
jContentPane.add(getJTextFieldPackageVersion(), null);
|
||||||
|
// LAH Not Used here
|
||||||
jLabelFeatureFlag = new JLabel();
|
// jContentPane.add(getJButtonGenerateGuid(), null);
|
||||||
jLabelFeatureFlag.setBounds(new java.awt.Rectangle(15, 60, 140, 20));
|
|
||||||
jLabelFeatureFlag.setText("Feature Flag");
|
|
||||||
jContentPane.add(jLabelFeatureFlag, null);
|
jContentPane.add(jLabelFeatureFlag, null);
|
||||||
jContentPane.add(getJTextFieldFeatureFlag(), null);
|
jContentPane.add(getJTextFieldFeatureFlag(), null);
|
||||||
|
|
||||||
jContentPane.add(jLabelArch, null);
|
jContentPane.add(jLabelArch, null);
|
||||||
jContentPane.add(jArchCheckBox, null);
|
jContentPane.add(jArchCheckBox, null);
|
||||||
jContentPane.add(getJButtonOk(), null);
|
jContentPane.add(getJButtonOk(), null);
|
||||||
@ -328,7 +330,9 @@ public class PackageDepDlg extends IDialog implements ItemListener {
|
|||||||
return jContentPane;
|
return jContentPane;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/*
|
||||||
|
* (non-Javadoc)
|
||||||
|
*
|
||||||
* @see java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent)
|
* @see java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent)
|
||||||
*
|
*
|
||||||
* Override actionPerformed to listen all actions
|
* Override actionPerformed to listen all actions
|
||||||
@ -350,9 +354,9 @@ public class PackageDepDlg extends IDialog implements ItemListener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
This method initializes Usage type, Package type and Arch type
|
* This method initializes Usage type, Package type and Arch type
|
||||||
|
*
|
||||||
**/
|
*/
|
||||||
private void initFrame() {
|
private void initFrame() {
|
||||||
for (int index = 0; index < vPackage.size(); index++) {
|
for (int index = 0; index < vPackage.size(); index++) {
|
||||||
jComboBoxPackageName.addItem(vPackage.elementAt(index).getName());
|
jComboBoxPackageName.addItem(vPackage.elementAt(index).getName());
|
||||||
@ -360,12 +364,12 @@ public class PackageDepDlg extends IDialog implements ItemListener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Data validation for all fields before add current item to Vector
|
* Data validation for all fields before add current item to Vector
|
||||||
|
*
|
||||||
@retval true - All datas are valid
|
* @retval true - All datas are valid
|
||||||
@retval false - At least one data is invalid
|
* @retval false - At least one data is invalid
|
||||||
|
*
|
||||||
**/
|
*/
|
||||||
public boolean checkAdd() {
|
public boolean checkAdd() {
|
||||||
//
|
//
|
||||||
// Check if all fields have correct data types
|
// Check if all fields have correct data types
|
||||||
@ -416,7 +420,9 @@ public class PackageDepDlg extends IDialog implements ItemListener {
|
|||||||
return pdid;
|
return pdid;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/*
|
||||||
|
* (non-Javadoc)
|
||||||
|
*
|
||||||
* @see java.awt.event.ItemListener#itemStateChanged(java.awt.event.ItemEvent)
|
* @see java.awt.event.ItemListener#itemStateChanged(java.awt.event.ItemEvent)
|
||||||
*
|
*
|
||||||
* Reflesh the frame when selected item changed
|
* Reflesh the frame when selected item changed
|
||||||
|
@ -309,7 +309,7 @@ public class PpisDlg extends IDialog implements ItemListener {
|
|||||||
jStarLabel1.setLocation(new java.awt.Point(2, 10));
|
jStarLabel1.setLocation(new java.awt.Point(2, 10));
|
||||||
jLabelPpiType = new JLabel();
|
jLabelPpiType = new JLabel();
|
||||||
jLabelPpiType.setBounds(new java.awt.Rectangle(15, 10, 145, 20));
|
jLabelPpiType.setBounds(new java.awt.Rectangle(15, 10, 145, 20));
|
||||||
jLabelPpiType.setText("Ppi Type");
|
jLabelPpiType.setText("Select Ppi Type");
|
||||||
|
|
||||||
jStarLabel2 = new StarLabel();
|
jStarLabel2 = new StarLabel();
|
||||||
jStarLabel2.setLocation(new java.awt.Point(2, 35));
|
jStarLabel2.setLocation(new java.awt.Point(2, 35));
|
||||||
@ -328,12 +328,12 @@ public class PpisDlg extends IDialog implements ItemListener {
|
|||||||
jLabelHelpText.setText("Help Text");
|
jLabelHelpText.setText("Help Text");
|
||||||
|
|
||||||
jLabelFeatureFlag = new JLabel();
|
jLabelFeatureFlag = new JLabel();
|
||||||
jLabelFeatureFlag.setText("Feature Flag");
|
jLabelFeatureFlag.setText("Feature Flag Expression");
|
||||||
jLabelFeatureFlag.setBounds(new java.awt.Rectangle(15, 130, 145, 20));
|
jLabelFeatureFlag.setBounds(new java.awt.Rectangle(15, 130, 145, 20));
|
||||||
|
|
||||||
jLabelArch = new JLabel();
|
jLabelArch = new JLabel();
|
||||||
jLabelArch.setBounds(new java.awt.Rectangle(15, 155, 145, 20));
|
jLabelArch.setBounds(new java.awt.Rectangle(15, 155, 145, 20));
|
||||||
jLabelArch.setText("Arch");
|
jLabelArch.setText("Supported Architectures");
|
||||||
jArchCheckBox = new ArchCheckBox();
|
jArchCheckBox = new ArchCheckBox();
|
||||||
jArchCheckBox.setBounds(new java.awt.Rectangle(160, 155, 320, 20));
|
jArchCheckBox.setBounds(new java.awt.Rectangle(160, 155, 320, 20));
|
||||||
jArchCheckBox.setPreferredSize(new java.awt.Dimension(320, 20));
|
jArchCheckBox.setPreferredSize(new java.awt.Dimension(320, 20));
|
||||||
|
@ -41,8 +41,9 @@ import org.tianocore.frameworkwizard.module.Identifications.Protocols.ProtocolsI
|
|||||||
import org.tianocore.frameworkwizard.workspace.WorkspaceTools;
|
import org.tianocore.frameworkwizard.workspace.WorkspaceTools;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The class is used to create, update Protocol of MSA/MBD file
|
* The class is used to create, update Protocol of MSA file
|
||||||
* It extends JDialog
|
*
|
||||||
|
* It extends IDialog
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class ProtocolsDlg extends IDialog implements ItemListener {
|
public class ProtocolsDlg extends IDialog implements ItemListener {
|
||||||
@ -134,7 +135,15 @@ public class ProtocolsDlg extends IDialog implements ItemListener {
|
|||||||
jComboBoxUsage.setBounds(new java.awt.Rectangle(160, 60, 320, 20));
|
jComboBoxUsage.setBounds(new java.awt.Rectangle(160, 60, 320, 20));
|
||||||
jComboBoxUsage.setPreferredSize(new java.awt.Dimension(320, 20));
|
jComboBoxUsage.setPreferredSize(new java.awt.Dimension(320, 20));
|
||||||
jComboBoxUsage
|
jComboBoxUsage
|
||||||
.setToolTipText("<html><table><tr><td colspan=2>Protocol</td></tr><tr><td>ALWAYS_CONSUMED</td><td>Module always consumes the protocol</td></tr><tr><td>SOMETIMES_CONSUMES</td><td>Module sometimes consumes the protocol</td></tr><tr><td>ALWAYS_PRODUCED</td><td>Module always produces the protocol</td></tr><tr><td>SOMETIMES_PRODUCED</td><td>Module sometimes produces the protocol</td></tr><tr><td>TO_START</td><td>The protocol is consumed by a Driver Binding protocol <b>Start</b><br>function. The protocol is used in EFI 1.10 driver model</td></tr><tr><td>BY_START</td><td>Protocol is produced by a Driver Binding protocol <b>Start</b><br>function. The protocol is used in EFI 1.10 driver model</td></tr><tr><td colspan=2>Protocol Notify</td></tr><tr><td>SOMETIMES_CONSUMED</td><td>Module will consume the protocol if it is produced.<br>Consumption is defined by executing the protocol notify<br>function.</td></tr></table></html>");
|
.setToolTipText("<html><table><tr><td colspan=2 align=center><b>Protocol</b></td></tr>"
|
||||||
|
+ "<tr><td>ALWAYS_CONSUMED</td><td>Module always consumes the protocol</td></tr>"
|
||||||
|
+ "<tr><td>SOMETIMES_CONSUMES</td><td>Module sometimes consumes the protocol</td></tr>"
|
||||||
|
+ "<tr><td>ALWAYS_PRODUCED</td><td>Module always produces the protocol</td></tr>"
|
||||||
|
+ "<tr><td>SOMETIMES_PRODUCED</td><td>Module sometimes produces the protocol</td></tr>"
|
||||||
|
+ "<tr><td>TO_START</td><td>The protocol is consumed by a Driver Binding protocol <b>Start</b><br>function. The protocol is used in EFI 1.10 driver model</td></tr>"
|
||||||
|
+ "<tr><td>BY_START</td><td>Protocol is produced by a Driver Binding protocol <b>Start</b><br>function. The protocol is used in EFI 1.10 driver model</td></tr>"
|
||||||
|
+ "<tr><td colspan=2 align=center><b>Protocol Notify</b></td></tr>"
|
||||||
|
+ "<tr><td>SOMETIMES_CONSUMED</td><td>Module will consume the protocol if it is produced.<br>Consumption is defined by executing the protocol notify<br>function.</td></tr></table></html>");
|
||||||
}
|
}
|
||||||
return jComboBoxUsage;
|
return jComboBoxUsage;
|
||||||
}
|
}
|
||||||
|
@ -307,7 +307,7 @@ public class SourceFilesDlg extends IDialog {
|
|||||||
jArchCheckBox.setPreferredSize(new java.awt.Dimension(340, 20));
|
jArchCheckBox.setPreferredSize(new java.awt.Dimension(340, 20));
|
||||||
jLabelFeatureFlag = new JLabel();
|
jLabelFeatureFlag = new JLabel();
|
||||||
jLabelFeatureFlag.setBounds(new java.awt.Rectangle(15, 110, 120, 20));
|
jLabelFeatureFlag.setBounds(new java.awt.Rectangle(15, 110, 120, 20));
|
||||||
jLabelFeatureFlag.setText("Feature Flag");
|
jLabelFeatureFlag.setText("Feature Flag Expression");
|
||||||
jLabelToolCode = new JLabel();
|
jLabelToolCode = new JLabel();
|
||||||
jLabelToolCode.setBounds(new java.awt.Rectangle(15, 60, 120, 20));
|
jLabelToolCode.setBounds(new java.awt.Rectangle(15, 60, 120, 20));
|
||||||
jLabelToolCode.setText("Tool Code");
|
jLabelToolCode.setText("Tool Code");
|
||||||
@ -316,7 +316,7 @@ public class SourceFilesDlg extends IDialog {
|
|||||||
jLabelTagName.setText("Tag Name");
|
jLabelTagName.setText("Tag Name");
|
||||||
jLabelArch = new JLabel();
|
jLabelArch = new JLabel();
|
||||||
jLabelArch.setBounds(new java.awt.Rectangle(15, 135, 120, 20));
|
jLabelArch.setBounds(new java.awt.Rectangle(15, 135, 120, 20));
|
||||||
jLabelArch.setText("Sup Arch List");
|
jLabelArch.setText("Supported Architectures");
|
||||||
jLabelToolChainFamily = new JLabel();
|
jLabelToolChainFamily = new JLabel();
|
||||||
jLabelToolChainFamily.setBounds(new java.awt.Rectangle(15, 85, 120, 20));
|
jLabelToolChainFamily.setBounds(new java.awt.Rectangle(15, 85, 120, 20));
|
||||||
jLabelToolChainFamily.setText("Tool Chain Family");
|
jLabelToolChainFamily.setText("Tool Chain Family");
|
||||||
|
@ -24,6 +24,7 @@ import javax.swing.JLabel;
|
|||||||
import javax.swing.JPanel;
|
import javax.swing.JPanel;
|
||||||
import javax.swing.JScrollPane;
|
import javax.swing.JScrollPane;
|
||||||
import javax.swing.JTextField;
|
import javax.swing.JTextField;
|
||||||
|
import javax.swing.JTextArea;
|
||||||
|
|
||||||
import org.tianocore.frameworkwizard.common.DataType;
|
import org.tianocore.frameworkwizard.common.DataType;
|
||||||
import org.tianocore.frameworkwizard.common.DataValidation;
|
import org.tianocore.frameworkwizard.common.DataValidation;
|
||||||
@ -38,10 +39,10 @@ import org.tianocore.frameworkwizard.module.Identifications.Variables.VariablesI
|
|||||||
import org.tianocore.frameworkwizard.workspace.WorkspaceTools;
|
import org.tianocore.frameworkwizard.workspace.WorkspaceTools;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
The class is used to create, update Variable of MSA/MBD file
|
* The class is used to create, update Variable of MSA/MBD file It extends
|
||||||
It extends IInternalFrame
|
* IDialog
|
||||||
|
*
|
||||||
**/
|
*/
|
||||||
public class VariablesDlg extends IDialog {
|
public class VariablesDlg extends IDialog {
|
||||||
|
|
||||||
// /
|
// /
|
||||||
@ -66,6 +67,8 @@ public class VariablesDlg extends IDialog {
|
|||||||
|
|
||||||
private StarLabel jStarLabel2 = null;
|
private StarLabel jStarLabel2 = null;
|
||||||
|
|
||||||
|
private StarLabel jStarLabel3 = null;
|
||||||
|
|
||||||
private JScrollPane jScrollPane = null;
|
private JScrollPane jScrollPane = null;
|
||||||
|
|
||||||
private JLabel jLabelGuidCName = null;
|
private JLabel jLabelGuidCName = null;
|
||||||
@ -80,7 +83,9 @@ public class VariablesDlg extends IDialog {
|
|||||||
|
|
||||||
private JLabel jLabelHelpText = null;
|
private JLabel jLabelHelpText = null;
|
||||||
|
|
||||||
private JTextField jTextFieldHelpText = null;
|
private JTextArea jTextAreaHelpText = null;
|
||||||
|
|
||||||
|
private JScrollPane jScrollPaneHelpText = null;
|
||||||
|
|
||||||
private ArchCheckBox jArchCheckBox = null;
|
private ArchCheckBox jArchCheckBox = null;
|
||||||
|
|
||||||
@ -98,11 +103,11 @@ public class VariablesDlg extends IDialog {
|
|||||||
private WorkspaceTools wt = new WorkspaceTools();
|
private WorkspaceTools wt = new WorkspaceTools();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
This method initializes jTextFieldString
|
* This method initializes jTextFieldString
|
||||||
|
*
|
||||||
@return javax.swing.JTextField jTextFieldString
|
* @return javax.swing.JTextField jTextFieldString
|
||||||
|
*
|
||||||
**/
|
*/
|
||||||
private JTextField getJTextFieldString() {
|
private JTextField getJTextFieldString() {
|
||||||
if (jTextFieldVariableName == null) {
|
if (jTextFieldVariableName == null) {
|
||||||
jTextFieldVariableName = new JTextField();
|
jTextFieldVariableName = new JTextField();
|
||||||
@ -116,24 +121,29 @@ public class VariablesDlg extends IDialog {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
This method initializes jComboBoxUsage
|
* This method initializes jComboBoxUsage
|
||||||
|
*
|
||||||
@return javax.swing.JComboBox jComboBoxUsage
|
* @return javax.swing.JComboBox jComboBoxUsage
|
||||||
|
*
|
||||||
**/
|
*/
|
||||||
private JComboBox getJComboBoxUsage() {
|
private JComboBox getJComboBoxUsage() {
|
||||||
if (jComboBoxUsage == null) {
|
if (jComboBoxUsage == null) {
|
||||||
jComboBoxUsage = new JComboBox();
|
jComboBoxUsage = new JComboBox();
|
||||||
jComboBoxUsage.setBounds(new java.awt.Rectangle(160, 60, 320, 20));
|
jComboBoxUsage.setBounds(new java.awt.Rectangle(160, 60, 320, 20));
|
||||||
jComboBoxUsage.setPreferredSize(new java.awt.Dimension(320, 20));
|
jComboBoxUsage.setPreferredSize(new java.awt.Dimension(320, 20));
|
||||||
|
jComboBoxUsage
|
||||||
|
.setToolTipText("<html><table><tr><td>ALWAYS_CONSUMED</td><td>The module requires the variable entry to be set</td></tr>"
|
||||||
|
+ "<tr><td>SOMETIMES_CONSUMED</td><td>The module will use the variable entry if it’s set.</td></tr>"
|
||||||
|
+ "<tr><td>ALWAYS_PRODUCED</td><td>The module will always write the variable.</td></tr>"
|
||||||
|
+ "<tr><td>SOMETIMES_PRODUCED</td><td>The module will sometimes write the variable.</td></tr></table></html>");
|
||||||
}
|
}
|
||||||
return jComboBoxUsage;
|
return jComboBoxUsage;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
This method initializes jScrollPane
|
* This method initializes jScrollPane
|
||||||
|
*
|
||||||
@return javax.swing.JScrollPane
|
* @return javax.swing.JScrollPane
|
||||||
*/
|
*/
|
||||||
private JScrollPane getJScrollPane() {
|
private JScrollPane getJScrollPane() {
|
||||||
if (jScrollPane == null) {
|
if (jScrollPane == null) {
|
||||||
@ -144,62 +154,78 @@ public class VariablesDlg extends IDialog {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
This method initializes jTextFieldFeatureFlag
|
* This method initializes jTextFieldFeatureFlag
|
||||||
|
*
|
||||||
@return javax.swing.JTextField jTextFieldFeatureFlag
|
* @return javax.swing.JTextField jTextFieldFeatureFlag
|
||||||
|
*
|
||||||
**/
|
*/
|
||||||
private JTextField getJTextFieldFeatureFlag() {
|
private JTextField getJTextFieldFeatureFlag() {
|
||||||
if (jTextFieldFeatureFlag == null) {
|
if (jTextFieldFeatureFlag == null) {
|
||||||
jTextFieldFeatureFlag = new JTextField();
|
jTextFieldFeatureFlag = new JTextField();
|
||||||
jTextFieldFeatureFlag.setBounds(new java.awt.Rectangle(160, 110, 320, 20));
|
jTextFieldFeatureFlag
|
||||||
|
.setBounds(new java.awt.Rectangle(160, 130, 320, 20));
|
||||||
jTextFieldFeatureFlag.setPreferredSize(new java.awt.Dimension(320, 20));
|
jTextFieldFeatureFlag.setPreferredSize(new java.awt.Dimension(320, 20));
|
||||||
|
jTextFieldFeatureFlag.setToolTipText("Postfix expression that must evaluate to TRUE or FALSE");
|
||||||
}
|
}
|
||||||
return jTextFieldFeatureFlag;
|
return jTextFieldFeatureFlag;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
This method initializes jTextFieldHelpText
|
* This method initializes jTextFieldHelpText
|
||||||
|
*
|
||||||
@return javax.swing.JTextField
|
* @return javax.swing.JTextField
|
||||||
|
*
|
||||||
**/
|
*/
|
||||||
private JTextField getJTextFieldHelpText() {
|
private JTextArea getJTextAreaHelpText() {
|
||||||
if (jTextFieldHelpText == null) {
|
if (jTextAreaHelpText == null) {
|
||||||
jTextFieldHelpText = new JTextField();
|
jTextAreaHelpText = new JTextArea();
|
||||||
jTextFieldHelpText.setBounds(new java.awt.Rectangle(160, 85, 320, 20));
|
jTextAreaHelpText.setLineWrap(true);
|
||||||
jTextFieldHelpText.setPreferredSize(new java.awt.Dimension(320, 20));
|
jTextAreaHelpText.setWrapStyleWord(true);
|
||||||
jTextFieldHelpText.setToolTipText("Enter information on how to use this Variable.");
|
jTextAreaHelpText
|
||||||
|
.setToolTipText("Enter information on how to use this Variable.");
|
||||||
}
|
}
|
||||||
return jTextFieldHelpText;
|
return jTextAreaHelpText;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private JScrollPane getJScrollPaneHelpText() {
|
||||||
|
if (jScrollPaneHelpText == null) {
|
||||||
|
jScrollPaneHelpText = new JScrollPane();
|
||||||
|
jScrollPaneHelpText.setHorizontalScrollBarPolicy(javax.swing.JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
|
||||||
|
jScrollPaneHelpText.setSize(new java.awt.Dimension(320,40));
|
||||||
|
jScrollPaneHelpText.setPreferredSize(new java.awt.Dimension(320,40));
|
||||||
|
jScrollPaneHelpText.setLocation(new java.awt.Point(160,85));
|
||||||
|
jScrollPaneHelpText.setViewportView(getJTextAreaHelpText());
|
||||||
|
}
|
||||||
|
return jScrollPaneHelpText;
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
This method initializes jTextField
|
* This method initializes jComboBoxGuidC_Name
|
||||||
|
*
|
||||||
@return javax.swing.JTextField jTextFieldC_Name
|
* @return javax.swing.JComboBox jComboBoxGuidC_Name
|
||||||
|
*
|
||||||
**/
|
*/
|
||||||
private JComboBox getJComboBoxGuidC_Name() {
|
private JComboBox getJComboBoxGuidC_Name() {
|
||||||
if (jComboBoxGuidC_Name == null) {
|
if (jComboBoxGuidC_Name == null) {
|
||||||
jComboBoxGuidC_Name = new JComboBox();
|
jComboBoxGuidC_Name = new JComboBox();
|
||||||
jComboBoxGuidC_Name.setBounds(new java.awt.Rectangle(160, 35, 320, 20));
|
jComboBoxGuidC_Name.setBounds(new java.awt.Rectangle(160, 35, 320, 20));
|
||||||
jComboBoxGuidC_Name.setPreferredSize(new java.awt.Dimension(320, 20));
|
jComboBoxGuidC_Name.setPreferredSize(new java.awt.Dimension(320, 20));
|
||||||
jComboBoxGuidC_Name.setToolTipText("Select the GUID C Name of the Variable.");
|
jComboBoxGuidC_Name
|
||||||
|
.setToolTipText("Select the GUID C Name of the Variable.");
|
||||||
}
|
}
|
||||||
return jComboBoxGuidC_Name;
|
return jComboBoxGuidC_Name;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
This method initializes jButtonOk
|
* This method initializes jButtonOk
|
||||||
|
*
|
||||||
@return javax.swing.JButton
|
* @return javax.swing.JButton
|
||||||
|
*
|
||||||
**/
|
*/
|
||||||
private JButton getJButtonOk() {
|
private JButton getJButtonOk() {
|
||||||
if (jButtonOk == null) {
|
if (jButtonOk == null) {
|
||||||
jButtonOk = new JButton();
|
jButtonOk = new JButton();
|
||||||
jButtonOk.setBounds(new java.awt.Rectangle(290, 165, 90, 20));
|
jButtonOk.setBounds(new java.awt.Rectangle(290, 182, 90, 20));
|
||||||
jButtonOk.setText("Ok");
|
jButtonOk.setText("Ok");
|
||||||
jButtonOk.addActionListener(this);
|
jButtonOk.addActionListener(this);
|
||||||
}
|
}
|
||||||
@ -207,15 +233,15 @@ public class VariablesDlg extends IDialog {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
This method initializes jButtonCancel
|
* This method initializes jButtonCancel
|
||||||
|
*
|
||||||
@return javax.swing.JButton
|
* @return javax.swing.JButton
|
||||||
|
*
|
||||||
**/
|
*/
|
||||||
private JButton getJButtonCancel() {
|
private JButton getJButtonCancel() {
|
||||||
if (jButtonCancel == null) {
|
if (jButtonCancel == null) {
|
||||||
jButtonCancel = new JButton();
|
jButtonCancel = new JButton();
|
||||||
jButtonCancel.setBounds(new java.awt.Rectangle(390, 165, 90, 20));
|
jButtonCancel.setBounds(new java.awt.Rectangle(390, 182, 90, 20));
|
||||||
jButtonCancel.setText("Cancel");
|
jButtonCancel.setText("Cancel");
|
||||||
jButtonCancel.addActionListener(this);
|
jButtonCancel.addActionListener(this);
|
||||||
}
|
}
|
||||||
@ -227,11 +253,11 @@ public class VariablesDlg extends IDialog {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
This method initializes this
|
* This method initializes this
|
||||||
|
*
|
||||||
**/
|
*/
|
||||||
private void init() {
|
private void init() {
|
||||||
this.setSize(510, 240);
|
this.setSize(500, 255);
|
||||||
this.setContentPane(getJScrollPane());
|
this.setContentPane(getJScrollPane());
|
||||||
this.setTitle("Variables");
|
this.setTitle("Variables");
|
||||||
initFrame();
|
initFrame();
|
||||||
@ -240,12 +266,12 @@ public class VariablesDlg extends IDialog {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
This method initializes this
|
* This method initializes this Fill values to all fields if these values are
|
||||||
Fill values to all fields if these values are not empty
|
* not empty
|
||||||
|
*
|
||||||
@param inVariablesId
|
* @param inVariablesId
|
||||||
|
*
|
||||||
**/
|
*/
|
||||||
private void init(VariablesIdentification inVariablesId) {
|
private void init(VariablesIdentification inVariablesId) {
|
||||||
init();
|
init();
|
||||||
this.id = inVariablesId;
|
this.id = inVariablesId;
|
||||||
@ -254,30 +280,32 @@ public class VariablesDlg extends IDialog {
|
|||||||
this.jTextFieldVariableName.setText(id.getName());
|
this.jTextFieldVariableName.setText(id.getName());
|
||||||
this.jComboBoxGuidC_Name.setSelectedItem(id.getGuid());
|
this.jComboBoxGuidC_Name.setSelectedItem(id.getGuid());
|
||||||
this.jComboBoxUsage.setSelectedItem(id.getUsage());
|
this.jComboBoxUsage.setSelectedItem(id.getUsage());
|
||||||
this.jTextFieldHelpText.setText(id.getHelp());
|
this.jTextAreaHelpText.setText(id.getHelp());
|
||||||
this.jTextFieldFeatureFlag.setText(id.getFeatureFlag());
|
this.jTextFieldFeatureFlag.setText(id.getFeatureFlag());
|
||||||
this.jArchCheckBox.setSelectedItems(id.getSupArchList());
|
this.jArchCheckBox.setSelectedItems(id.getSupArchList());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
This is the override edit constructor
|
* This is the override edit constructor
|
||||||
|
*
|
||||||
@param inVariablesIdentification
|
* @param inVariablesIdentification
|
||||||
@param iFrame
|
* @param iFrame
|
||||||
|
*
|
||||||
**/
|
*/
|
||||||
public VariablesDlg(VariablesIdentification inVariablesIdentification, IFrame iFrame) {
|
public VariablesDlg(VariablesIdentification inVariablesIdentification,
|
||||||
|
IFrame iFrame) {
|
||||||
super(iFrame, true);
|
super(iFrame, true);
|
||||||
init(inVariablesIdentification);
|
init(inVariablesIdentification);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Disable all components when the mode is view
|
* Disable all components when the mode is view
|
||||||
|
*
|
||||||
@param isView true - The view mode; false - The non-view mode
|
* @param isView
|
||||||
|
* true - The view mode; false - The non-view mode
|
||||||
**/
|
*
|
||||||
|
*/
|
||||||
public void setViewMode(boolean isView) {
|
public void setViewMode(boolean isView) {
|
||||||
if (isView) {
|
if (isView) {
|
||||||
this.jTextFieldVariableName.setEnabled(!isView);
|
this.jTextFieldVariableName.setEnabled(!isView);
|
||||||
@ -286,59 +314,64 @@ public class VariablesDlg extends IDialog {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
This method initializes jContentPane
|
* This method initializes jContentPane
|
||||||
|
*
|
||||||
@return javax.swing.JPanel jContentPane
|
* @return javax.swing.JPanel jContentPane
|
||||||
|
*
|
||||||
**/
|
*/
|
||||||
private JPanel getJContentPane() {
|
private JPanel getJContentPane() {
|
||||||
if (jContentPane == null) {
|
if (jContentPane == null) {
|
||||||
jArchCheckBox = new ArchCheckBox();
|
jStarLabel1 = new StarLabel();
|
||||||
jArchCheckBox.setBounds(new java.awt.Rectangle(160, 135, 320, 20));
|
jStarLabel1.setLocation(new java.awt.Point(2, 10));
|
||||||
jArchCheckBox.setPreferredSize(new java.awt.Dimension(320, 20));
|
|
||||||
jLabelGuidCName = new JLabel();
|
|
||||||
jLabelGuidCName.setBounds(new java.awt.Rectangle(15, 35, 140, 20));
|
|
||||||
jLabelGuidCName.setText("Guid C Name");
|
|
||||||
jLabelUsage = new JLabel();
|
|
||||||
jLabelUsage.setText("Usage");
|
|
||||||
jLabelUsage.setBounds(new java.awt.Rectangle(15, 60, 140, 20));
|
|
||||||
jLabelVariableName = new JLabel();
|
jLabelVariableName = new JLabel();
|
||||||
jLabelVariableName.setText("Variable Name");
|
jLabelVariableName.setText("Variable Name");
|
||||||
jLabelVariableName.setLocation(new java.awt.Point(15, 10));
|
jLabelVariableName.setBounds(new java.awt.Rectangle(15, 10, 145, 20));
|
||||||
jLabelVariableName.setSize(new java.awt.Dimension(140, 20));
|
|
||||||
jLabelArch = new JLabel();
|
jStarLabel2 = new StarLabel();
|
||||||
jLabelArch.setBounds(new java.awt.Rectangle(15, 135, 140, 20));
|
jStarLabel2.setLocation(new java.awt.Point(2, 35));
|
||||||
jLabelArch.setText("Arch");
|
jLabelGuidCName = new JLabel();
|
||||||
|
jLabelGuidCName.setBounds(new java.awt.Rectangle(15, 35, 145, 20));
|
||||||
|
jLabelGuidCName.setText("Variable Guid C Name");
|
||||||
|
|
||||||
|
jStarLabel3 = new StarLabel();
|
||||||
|
jStarLabel3.setLocation(new java.awt.Point(2, 60));
|
||||||
|
jLabelUsage = new JLabel();
|
||||||
|
jLabelUsage.setText("Usage");
|
||||||
|
jLabelUsage.setBounds(new java.awt.Rectangle(15, 60, 145, 20));
|
||||||
|
|
||||||
|
jLabelHelpText = new JLabel();
|
||||||
|
jLabelHelpText.setBounds(new java.awt.Rectangle(14, 85, 145, 20));
|
||||||
|
jLabelHelpText.setText("Help Text");
|
||||||
|
|
||||||
jLabelFeatureFlag = new JLabel();
|
jLabelFeatureFlag = new JLabel();
|
||||||
jLabelFeatureFlag.setText("Feature Flag");
|
jLabelFeatureFlag.setText("Feature Flag Expression");
|
||||||
jLabelFeatureFlag.setBounds(new java.awt.Rectangle(15, 110, 140, 20));
|
jLabelFeatureFlag.setBounds(new java.awt.Rectangle(15, 130, 145, 20));
|
||||||
|
|
||||||
|
jLabelArch = new JLabel();
|
||||||
|
jLabelArch.setBounds(new java.awt.Rectangle(15, 155, 145, 20));
|
||||||
|
jLabelArch.setText("Supported Architectures");
|
||||||
|
jArchCheckBox = new ArchCheckBox();
|
||||||
|
jArchCheckBox.setBounds(new java.awt.Rectangle(160, 155, 320, 20));
|
||||||
|
jArchCheckBox.setPreferredSize(new java.awt.Dimension(320, 20));
|
||||||
|
|
||||||
jContentPane = new JPanel();
|
jContentPane = new JPanel();
|
||||||
jContentPane.setLayout(null);
|
jContentPane.setLayout(null);
|
||||||
jContentPane.setPreferredSize(new java.awt.Dimension(490, 190));
|
jContentPane.setPreferredSize(new java.awt.Dimension(485, 210));
|
||||||
|
|
||||||
jContentPane.add(jLabelVariableName, null);
|
|
||||||
jContentPane.add(jLabelGuidCName, null);
|
|
||||||
jContentPane.add(getJComboBoxGuidC_Name(), null);
|
|
||||||
jContentPane.add(getJTextFieldString(), null);
|
|
||||||
jContentPane.add(jLabelUsage, null);
|
|
||||||
jContentPane.add(getJComboBoxUsage(), null);
|
|
||||||
jStarLabel1 = new StarLabel();
|
|
||||||
jStarLabel1.setLocation(new java.awt.Point(0, 10));
|
|
||||||
jStarLabel2 = new StarLabel();
|
|
||||||
jStarLabel2.setLocation(new java.awt.Point(0, 35));
|
|
||||||
jLabelHelpText = new JLabel();
|
|
||||||
jLabelHelpText.setBounds(new java.awt.Rectangle(14, 85, 140, 20));
|
|
||||||
jLabelHelpText.setText("Help Text");
|
|
||||||
|
|
||||||
jContentPane.add(jStarLabel1, null);
|
jContentPane.add(jStarLabel1, null);
|
||||||
|
jContentPane.add(jLabelVariableName, null);
|
||||||
|
jContentPane.add(getJTextFieldString(), null);
|
||||||
jContentPane.add(jStarLabel2, null);
|
jContentPane.add(jStarLabel2, null);
|
||||||
|
jContentPane.add(jLabelGuidCName, null);
|
||||||
jContentPane.add(jLabelArch, null);
|
jContentPane.add(getJComboBoxGuidC_Name(), null);
|
||||||
|
jContentPane.add(jStarLabel3, null);
|
||||||
|
jContentPane.add(jLabelUsage, null);
|
||||||
|
jContentPane.add(getJComboBoxUsage(), null);
|
||||||
|
jContentPane.add(jLabelHelpText, null);
|
||||||
|
jContentPane.add(getJScrollPaneHelpText(), null);
|
||||||
jContentPane.add(jLabelFeatureFlag, null);
|
jContentPane.add(jLabelFeatureFlag, null);
|
||||||
jContentPane.add(getJTextFieldFeatureFlag(), null);
|
jContentPane.add(getJTextFieldFeatureFlag(), null);
|
||||||
jContentPane.add(jLabelHelpText, null);
|
jContentPane.add(jLabelArch, null);
|
||||||
jContentPane.add(getJTextFieldHelpText(), null);
|
|
||||||
jContentPane.add(jArchCheckBox, null);
|
jContentPane.add(jArchCheckBox, null);
|
||||||
jContentPane.add(getJButtonOk(), null);
|
jContentPane.add(getJButtonOk(), null);
|
||||||
jContentPane.add(getJButtonCancel(), null);
|
jContentPane.add(getJButtonCancel(), null);
|
||||||
@ -346,7 +379,9 @@ public class VariablesDlg extends IDialog {
|
|||||||
return jContentPane;
|
return jContentPane;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/*
|
||||||
|
* (non-Javadoc)
|
||||||
|
*
|
||||||
* @see java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent)
|
* @see java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent)
|
||||||
*
|
*
|
||||||
* Override actionPerformed to listen all actions
|
* Override actionPerformed to listen all actions
|
||||||
@ -368,21 +403,22 @@ public class VariablesDlg extends IDialog {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
This method initializes Usage type
|
* This method initializes Usage type
|
||||||
|
*
|
||||||
**/
|
*/
|
||||||
private void initFrame() {
|
private void initFrame() {
|
||||||
Tools.generateComboBoxByVector(jComboBoxUsage, ed.getVPpiUsage());
|
Tools.generateComboBoxByVector(jComboBoxUsage, ed.getVPpiUsage());
|
||||||
Tools.generateComboBoxByVector(jComboBoxGuidC_Name, wt.getAllGuidDeclarationsFromWorkspace());
|
Tools.generateComboBoxByVector(jComboBoxGuidC_Name, wt
|
||||||
|
.getAllGuidDeclarationsFromWorkspace());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Data validation for all fields
|
* Data validation for all fields
|
||||||
|
*
|
||||||
@retval true - All datas are valid
|
* @retval true - All datas are valid
|
||||||
@retval false - At least one data is invalid
|
* @retval false - At least one data is invalid
|
||||||
|
*
|
||||||
**/
|
*/
|
||||||
public boolean checkAdd() {
|
public boolean checkAdd() {
|
||||||
//
|
//
|
||||||
// Check if all fields have correct data types
|
// Check if all fields have correct data types
|
||||||
@ -392,12 +428,13 @@ public class VariablesDlg extends IDialog {
|
|||||||
// Check VariableName
|
// Check VariableName
|
||||||
//
|
//
|
||||||
if (isEmpty(this.jTextFieldVariableName.getText())) {
|
if (isEmpty(this.jTextFieldVariableName.getText())) {
|
||||||
Log.wrn("Update Variables", "Variable Name couldn't be empty");
|
Log.wrn("Update Variables", "Variable Name must not be empty");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!isEmpty(this.jTextFieldVariableName.getText())) {
|
if (!isEmpty(this.jTextFieldVariableName.getText())) {
|
||||||
if (!DataValidation.isHexWordArrayType(this.jTextFieldVariableName.getText())) {
|
if (!DataValidation.isHexWordArrayType(this.jTextFieldVariableName
|
||||||
|
.getText())) {
|
||||||
Log.wrn("Update Variables", "Incorrect data type for Variable Name");
|
Log.wrn("Update Variables", "Incorrect data type for Variable Name");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -423,7 +460,7 @@ public class VariablesDlg extends IDialog {
|
|||||||
|
|
||||||
String arg3 = this.jTextFieldFeatureFlag.getText();
|
String arg3 = this.jTextFieldFeatureFlag.getText();
|
||||||
Vector<String> arg4 = this.jArchCheckBox.getSelectedItemsVector();
|
Vector<String> arg4 = this.jArchCheckBox.getSelectedItemsVector();
|
||||||
String arg5 = this.jTextFieldHelpText.getText();
|
String arg5 = this.jTextAreaHelpText.getText();
|
||||||
|
|
||||||
id = new VariablesIdentification(arg0, arg1, arg2, arg3, arg4, arg5);
|
id = new VariablesIdentification(arg0, arg1, arg2, arg3, arg4, arg5);
|
||||||
return id;
|
return id;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user