]> git.proxmox.com Git - mirror_edk2.git/blobdiff - Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/packaging/ui/SpdPcdDefs.java
1. Move resize funtions from IInternalFrame.java to Tools.java.
[mirror_edk2.git] / Tools / Source / FrameworkWizard / src / org / tianocore / frameworkwizard / packaging / ui / SpdPcdDefs.java
index 76a4dea0499b891532359cde4a1befc6b5cfc0d0..ec0339269270f3b49a90d4ad90c9aa1a76d9e5c7 100644 (file)
@@ -39,6 +39,7 @@ import javax.swing.table.TableModel;
 import org.tianocore.PackageSurfaceAreaDocument;\r
 \r
 import org.tianocore.frameworkwizard.common.DataValidation;\r
+import org.tianocore.frameworkwizard.common.Tools;\r
 import org.tianocore.frameworkwizard.common.Identifications.OpeningPackageType;\r
 import org.tianocore.frameworkwizard.common.ui.IInternalFrame;\r
 import org.tianocore.frameworkwizard.common.ui.StarLabel;\r
@@ -606,14 +607,14 @@ public class SpdPcdDefs extends IInternalFrame implements TableModelListener{
     public void componentResized(ComponentEvent arg0) {\r
         int intPreferredWidth = 500;\r
         \r
-        resizeComponentWidth(this.jTextFieldC_Name, this.getWidth(), intPreferredWidth);\r
-        resizeComponentWidth(this.jTextFieldToken, this.getWidth(), intPreferredWidth);\r
-        resizeComponentWidth(this.jTextFieldTsGuid, this.getWidth(), intPreferredWidth);\r
-        resizeComponentWidth(this.jTextFieldDefaultValue, this.getWidth(), intPreferredWidth);\r
-        resizeComponentWidth(this.jTextFieldHelp, this.getWidth(), intPreferredWidth);\r
-        resizeComponentWidth(this.jScrollPane, this.getWidth(), intPreferredWidth);\r
+        Tools.resizeComponentWidth(this.jTextFieldC_Name, this.getWidth(), intPreferredWidth);\r
+        Tools.resizeComponentWidth(this.jTextFieldToken, this.getWidth(), intPreferredWidth);\r
+        Tools.resizeComponentWidth(this.jTextFieldTsGuid, this.getWidth(), intPreferredWidth);\r
+        Tools.resizeComponentWidth(this.jTextFieldDefaultValue, this.getWidth(), intPreferredWidth);\r
+        Tools.resizeComponentWidth(this.jTextFieldHelp, this.getWidth(), intPreferredWidth);\r
+        Tools.resizeComponentWidth(this.jScrollPane, this.getWidth(), intPreferredWidth);\r
         \r
-        resizeComponentWidth(this.jTextFieldDefaultValue, this.getWidth(), intPreferredWidth);\r
+        Tools.resizeComponentWidth(this.jTextFieldDefaultValue, this.getWidth(), intPreferredWidth);\r
 //        relocateComponentX(this.jButtonClearAll, this.getWidth(), DataType.SPACE_TO_RIGHT_FOR_GENERATE_BUTTON);\r
 //        relocateComponentX(this.jButtonRemove, this.getWidth(), DataType.SPACE_TO_RIGHT_FOR_GENERATE_BUTTON);\r
 //        relocateComponentX(this.jButtonAdd, this.getWidth(), DataType.SPACE_TO_RIGHT_FOR_GENERATE_BUTTON);\r
@@ -909,8 +910,8 @@ public class SpdPcdDefs extends IInternalFrame implements TableModelListener{
             JOptionPane.showMessageDialog(frame, "C_Name is NOT C_NameType.");\r
             return false;\r
         }\r
-        if (!DataValidation.isHexDoubleWordDataType(row[1].toString()) && \r
-                        !DataValidation.isInt(row[1].toString(), Integer.MIN_VALUE, Integer.MAX_VALUE)) {\r
+        if (!(DataValidation.isHexDoubleWordDataType(row[1].toString()) || \r
+                        DataValidation.isInt(row[1].toString(), 0, 0xffffffff))) {\r
             JOptionPane.showMessageDialog(frame, "Token is NOT correct.");\r
             return false;\r
         }\r