X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=Tools%2FSource%2FFrameworkWizard%2Fsrc%2Forg%2Ftianocore%2Fframeworkwizard%2Fmodule%2Fui%2Fdialog%2FBootModesDlg.java;h=41aec889df3aebbd130bcd6d9ba63a5a0381d023;hp=937b8b6361ee9fee1a09b93ce0851e57816fdf20;hb=e08433efeb382abec06fec875936586ee94d5e2a;hpb=3f62225f1e49da815a9cc4c6ed6f56d3753ca37b diff --git a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/dialog/BootModesDlg.java b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/dialog/BootModesDlg.java index 937b8b6361..41aec889df 100644 --- a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/dialog/BootModesDlg.java +++ b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/dialog/BootModesDlg.java @@ -39,13 +39,14 @@ import org.tianocore.frameworkwizard.common.ui.ArchCheckBox; 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.module.Identifications.ModuleIdentification; import org.tianocore.frameworkwizard.module.Identifications.BootModes.BootModesIdentification; +import org.tianocore.frameworkwizard.workspace.WorkspaceTools; /** - * The class is used to create, update BootModes of MSA/MBD file It extends - * IDialog - * - * + * The class is used to create, update BootModes of MSA/MBD file + * + * It extends IDialog * */ public class BootModesDlg extends IDialog { @@ -59,7 +60,7 @@ public class BootModesDlg extends IDialog { // Define class members // private JPanel jContentPane = null; -private JLabel jLabelTest = null; + private JLabel jLabelBootModeName = null; private JComboBox jComboBoxBootModeName = null; @@ -98,6 +99,8 @@ private JLabel jLabelTest = null; private BootModesIdentification id = null; private EnumerationData ed = new EnumerationData(); + + private WorkspaceTools wt = new WorkspaceTools(); /** * This method initializes jComboBoxBootModeName @@ -155,9 +158,10 @@ private JLabel jLabelTest = null; private JTextField getJTextFieldFeatureFlag() { if (jTextFieldFeatureFlag == null) { jTextFieldFeatureFlag = new JTextField(); - jTextFieldFeatureFlag.setBounds(new java.awt.Rectangle(168, 107, 320, 20)); + jTextFieldFeatureFlag.setBounds(new java.awt.Rectangle(168, 132, 320, 20)); jTextFieldFeatureFlag.setPreferredSize(new java.awt.Dimension(320, 20)); jTextFieldFeatureFlag.setToolTipText("Postfix expression that must evaluate to TRUE or FALSE"); + jTextFieldFeatureFlag.setEnabled(false); } return jTextFieldFeatureFlag; } @@ -263,10 +267,15 @@ private JLabel jLabelTest = null; * @param inBootModesId * */ - private void init(BootModesIdentification inBootModesId) { + private void init(BootModesIdentification inBootModesId, ModuleIdentification mid) { init(); this.id = inBootModesId; - + + // + // Init arch with module's arch + // + this.jArchCheckBox.setEnabledItems(wt.getModuleArch(mid)); + if (this.id != null) { this.jComboBoxBootModeName.setSelectedItem(id.getName()); this.jComboBoxUsage.setSelectedItem(id.getUsage()); @@ -283,9 +292,9 @@ private JLabel jLabelTest = null; * @param iFrame * */ - public BootModesDlg(BootModesIdentification inBootModesIdentification, IFrame iFrame) { + public BootModesDlg(BootModesIdentification inBootModesIdentification, IFrame iFrame, ModuleIdentification mid) { super(iFrame, true); - init(inBootModesIdentification); + init(inBootModesIdentification, mid); } /** @@ -324,13 +333,14 @@ private JLabel jLabelTest = null; jLabelHelpText.setBounds(new java.awt.Rectangle(12, 62, 155, 20)); jLabelHelpText.setText("Help Text"); jLabelFeatureFlag = new JLabel(); - jLabelFeatureFlag.setBounds(new java.awt.Rectangle(12, 107, 155, 20)); + jLabelFeatureFlag.setBounds(new java.awt.Rectangle(12, 132, 155, 20)); jLabelFeatureFlag.setText("Feature Flag Expression"); + jLabelFeatureFlag.setEnabled(false); jLabelArch = new JLabel(); - jLabelArch.setBounds(new java.awt.Rectangle(12, 132, 155, 20)); + jLabelArch.setBounds(new java.awt.Rectangle(12, 107, 155, 20)); jLabelArch.setText("Supported Archectures"); jArchCheckBox = new ArchCheckBox(); - jArchCheckBox.setBounds(new java.awt.Rectangle(168, 132, 320, 20)); + jArchCheckBox.setBounds(new java.awt.Rectangle(168, 107, 320, 20)); jArchCheckBox.setPreferredSize(new java.awt.Dimension(320, 20)); jContentPane = new JPanel();