]> git.proxmox.com Git - mirror_edk2.git/blobdiff - Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/ui/ArchCheckBox.java
Changed spelling to manifest
[mirror_edk2.git] / Tools / Source / FrameworkWizard / src / org / tianocore / frameworkwizard / common / ui / ArchCheckBox.java
index 76c29da157b25116a307eaace13d48af6cd6de2e..d02c1214330e0aca0858d499ff22241c46fd0e07 100644 (file)
@@ -40,7 +40,7 @@ public class ArchCheckBox extends JPanel {
     private JCheckBox jCheckBoxArm = null;\r
 \r
     private JCheckBox jCheckBoxPpc = null;\r
-    \r
+\r
     /**\r
      * This method initializes jCheckBoxIa32   \r
      *         \r
@@ -155,53 +155,53 @@ public class ArchCheckBox extends JPanel {
         this.add(getJCheckBoxPpc(), null);\r
         this.setToolTipText(DataType.SUP_ARCH_LIST_HELP_TEXT);\r
     }\r
-    \r
+\r
     public Vector<String> getSelectedItemsVector() {\r
         Vector<String> v = new Vector<String>();\r
-        if (this.jCheckBoxIa32.isSelected()) {\r
+        if (this.jCheckBoxIa32.isSelected() && this.jCheckBoxIa32.isEnabled()) {\r
             v.addElement(jCheckBoxIa32.getText());\r
         }\r
-        if (this.jCheckBoxX64.isSelected()) {\r
+        if (this.jCheckBoxX64.isSelected() && this.jCheckBoxX64.isEnabled()) {\r
             v.addElement(jCheckBoxX64.getText());\r
         }\r
-        if (this.jCheckBoxIpf.isSelected()) {\r
+        if (this.jCheckBoxIpf.isSelected() && this.jCheckBoxIpf.isEnabled()) {\r
             v.addElement(jCheckBoxIpf.getText());\r
         }\r
-        if (this.jCheckBoxEbc.isSelected()) {\r
+        if (this.jCheckBoxEbc.isSelected() && this.jCheckBoxEbc.isEnabled()) {\r
             v.addElement(jCheckBoxEbc.getText());\r
         }\r
-        if (this.jCheckBoxArm.isSelected()) {\r
+        if (this.jCheckBoxArm.isSelected() && this.jCheckBoxArm.isEnabled()) {\r
             v.addElement(jCheckBoxArm.getText());\r
         }\r
-        if (this.jCheckBoxPpc.isSelected()) {\r
+        if (this.jCheckBoxPpc.isSelected() && this.jCheckBoxPpc.isEnabled()) {\r
             v.addElement(jCheckBoxPpc.getText());\r
         }\r
         return v;\r
     }\r
-    \r
+\r
     public String getSelectedItemsString() {\r
         String s = "";\r
-        if (this.jCheckBoxIa32.isSelected()) {\r
+        if (this.jCheckBoxIa32.isSelected() && this.jCheckBoxIa32.isEnabled()) {\r
             s = s + jCheckBoxIa32.getText() + " ";\r
         }\r
-        if (this.jCheckBoxX64.isSelected()) {\r
+        if (this.jCheckBoxX64.isSelected() && this.jCheckBoxX64.isEnabled()) {\r
             s = s + jCheckBoxX64.getText() + " ";\r
         }\r
-        if (this.jCheckBoxIpf.isSelected()) {\r
+        if (this.jCheckBoxIpf.isSelected() && this.jCheckBoxIpf.isEnabled()) {\r
             s = s + jCheckBoxIpf.getText() + " ";\r
         }\r
-        if (this.jCheckBoxEbc.isSelected()) {\r
+        if (this.jCheckBoxEbc.isSelected() && this.jCheckBoxEbc.isEnabled()) {\r
             s = s + jCheckBoxEbc.getText() + " ";\r
         }\r
-        if (this.jCheckBoxArm.isSelected()) {\r
+        if (this.jCheckBoxArm.isSelected() && this.jCheckBoxArm.isEnabled()) {\r
             s = s + jCheckBoxArm.getText() + " ";\r
         }\r
-        if (this.jCheckBoxPpc.isSelected()) {\r
+        if (this.jCheckBoxPpc.isSelected() && this.jCheckBoxPpc.isEnabled()) {\r
             s = s + jCheckBoxPpc.getText() + " ";\r
         }\r
         return s.trim();\r
     }\r
-    \r
+\r
     public void setAllItemsSelected(boolean isSelected) {\r
         this.jCheckBoxIa32.setSelected(isSelected);\r
         this.jCheckBoxX64.setSelected(isSelected);\r
@@ -210,7 +210,7 @@ public class ArchCheckBox extends JPanel {
         this.jCheckBoxArm.setSelected(isSelected);\r
         this.jCheckBoxPpc.setSelected(isSelected);\r
     }\r
-    \r
+\r
     public void setSelectedItems(Vector<String> v) {\r
         setAllItemsSelected(false);\r
         if (v != null) {\r
@@ -242,4 +242,77 @@ public class ArchCheckBox extends JPanel {
             }\r
         }\r
     }\r
+\r
+    public void setAllItemsEnabled(boolean isEnabled) {\r
+        this.jCheckBoxIa32.setEnabled(isEnabled);\r
+        this.jCheckBoxX64.setEnabled(isEnabled);\r
+        this.jCheckBoxIpf.setEnabled(isEnabled);\r
+        this.jCheckBoxEbc.setEnabled(isEnabled);\r
+        this.jCheckBoxArm.setEnabled(isEnabled);\r
+        this.jCheckBoxPpc.setEnabled(isEnabled);\r
+    }\r
+\r
+    public void setEnabledItems(Vector<String> v) {\r
+        setAllItemsEnabled(false);\r
+        if (v != null) {\r
+            for (int index = 0; index < v.size(); index++) {\r
+                if (v.get(index).equals(this.jCheckBoxIa32.getText())) {\r
+                    this.jCheckBoxIa32.setEnabled(true);\r
+                    continue;\r
+                }\r
+                if (v.get(index).equals(this.jCheckBoxIpf.getText())) {\r
+                    this.jCheckBoxIpf.setEnabled(true);\r
+                    continue;\r
+                }\r
+                if (v.get(index).equals(this.jCheckBoxX64.getText())) {\r
+                    this.jCheckBoxX64.setEnabled(true);\r
+                    continue;\r
+                }\r
+                if (v.get(index).equals(this.jCheckBoxEbc.getText())) {\r
+                    this.jCheckBoxEbc.setEnabled(true);\r
+                    continue;\r
+                }\r
+                if (v.get(index).equals(this.jCheckBoxArm.getText())) {\r
+                    this.jCheckBoxArm.setEnabled(true);\r
+                    continue;\r
+                }\r
+                if (v.get(index).equals(this.jCheckBoxPpc.getText())) {\r
+                    this.jCheckBoxPpc.setEnabled(true);\r
+                    continue;\r
+                }\r
+            }\r
+        }\r
+    }\r
+\r
+    public void setDisabledItems(Vector<String> v) {\r
+        setAllItemsEnabled(true);\r
+        if (v != null) {\r
+            for (int index = 0; index < v.size(); index++) {\r
+                if (v.get(index).equals(this.jCheckBoxIa32.getText())) {\r
+                    this.jCheckBoxIa32.setEnabled(false);\r
+                    continue;\r
+                }\r
+                if (v.get(index).equals(this.jCheckBoxIpf.getText())) {\r
+                    this.jCheckBoxIpf.setEnabled(false);\r
+                    continue;\r
+                }\r
+                if (v.get(index).equals(this.jCheckBoxX64.getText())) {\r
+                    this.jCheckBoxX64.setEnabled(false);\r
+                    continue;\r
+                }\r
+                if (v.get(index).equals(this.jCheckBoxEbc.getText())) {\r
+                    this.jCheckBoxEbc.setEnabled(false);\r
+                    continue;\r
+                }\r
+                if (v.get(index).equals(this.jCheckBoxArm.getText())) {\r
+                    this.jCheckBoxArm.setEnabled(false);\r
+                    continue;\r
+                }\r
+                if (v.get(index).equals(this.jCheckBoxPpc.getText())) {\r
+                    this.jCheckBoxPpc.setEnabled(false);\r
+                    continue;\r
+                }\r
+            }\r
+        }\r
+    }\r
 }\r