]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Adjusted column sizes, made resizable, added Module Type column to All Module Table...
authorlhauch <lhauch@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 15 Aug 2006 22:21:07 +0000 (22:21 +0000)
committerlhauch <lhauch@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 15 Aug 2006 22:21:07 +0000 (22:21 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1284 6f19259b-4bc3-4df7-8a09-765794883524

Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdFrameworkModules.java

index 8ea5cc9a25d353abd49e85172f5142ed74eb55a8..c8f9afc60c72b522a71226437afa194aa3e42866 100644 (file)
@@ -32,7 +32,7 @@ import java.util.Vector;
 public class FpdFrameworkModules extends IInternalFrame {\r
 \r
     /**\r
-     * \r
+     * Initialize Globals\r
      */\r
     private static final long serialVersionUID = 1L;\r
 \r
@@ -79,17 +79,25 @@ public class FpdFrameworkModules extends IInternalFrame {
     private Map<String, ArrayList<String>> fpdMsa = null;\r
 \r
     private ArrayList<ModuleIdentification> miList = null;\r
-\r
+    \r
+    /**\r
+     * Column settings for displaying all modules in workspace\r
+     */\r
     private final int modNameColForAllModTable = 0;\r
     \r
     private final int pkgNameColForAllModTable = 1;\r
     \r
     private final int pathColForAllModTable = 2;\r
     \r
-    private final int pkgVerColForAllModTable = 3;\r
+    private final int typeColForAllModTable = 3;\r
+    \r
+    private final int pkgVerColForAllModTable = 5;\r
     \r
     private final int modVerColForAllModTable = 4;\r
     \r
+    /**\r
+     * Column settings for display modules in the FPD file\r
+     */\r
     private final int modNameColForFpdModTable = 0;\r
     \r
     private final int pkgNameColForFpdModTable = 1;\r
@@ -98,10 +106,13 @@ public class FpdFrameworkModules extends IInternalFrame {
     \r
     private final int archColForFpdModTable = 3;\r
     \r
-    private final int pkgVerColForFpdModTable = 4;\r
+    private final int pkgVerColForFpdModTable = 5;\r
 \r
-    private final int modVerColForFpdModTable = 5;\r
+    private final int modVerColForFpdModTable = 4;\r
     \r
+    /**\r
+     * FpdFileContents structure\r
+     */\r
     private final int ffcModGuid = 0;\r
     \r
     private final int ffcModVer = 1;\r
@@ -111,22 +122,27 @@ public class FpdFrameworkModules extends IInternalFrame {
     private final int ffcPkgVer = 3;\r
     \r
     private final int ffcModArch = 4;\r
-\r
+    \r
+    /**\r
+     * Set Column Widths, Only the PATH should not have a max width.\r
+     */\r
     private final int modNameMinWidth = 168;\r
     \r
     private final int modNamePrefWidth = 200;\r
+    \r
+    private final int modNameMaxWidth = 350;\r
 \r
     private final int pkgNameMinWidth = 100;\r
     \r
-    private final int pkgNamePrefWidth = 110;\r
+    private final int pkgNamePrefWidth = 130;\r
     \r
     private final int pkgNameMaxWidth = 150;\r
     \r
-    private final int verMinWidth = 50;\r
+    private final int verMinWidth = 60;\r
     \r
     private final int verMaxWidth = 80;\r
     \r
-    private final int verPrefWidth = 60;\r
+    private final int verPrefWidth = 70;\r
     \r
     private final int pathPrefWidth = 320;\r
     \r
@@ -138,10 +154,18 @@ public class FpdFrameworkModules extends IInternalFrame {
     \r
     private final int archMaxWidth = 100;\r
     \r
+    private final int typePrefWidth = 145;\r
+    \r
+    private final int typeMinWidth = 100;\r
+    \r
+    private final int typeMaxWidth = 155;\r
+    \r
     /**\r
-     * This method initializes jSplitPane      \r
+     * This method initializes jSplitPane\r
+     * \r
+     * This is the main edit window\r
      *         \r
-     * @return javax.swing.JSplitPane  \r
+     * @return javax.swing.JSplitPane jSplitPane       \r
      */\r
     private JSplitPane getJSplitPane() {\r
         if (jSplitPane == null) {\r
@@ -155,9 +179,11 @@ public class FpdFrameworkModules extends IInternalFrame {
     }\r
 \r
     /**\r
-     * This method initializes jPanel  \r
+     * This method initializes jPanelTop\r
+     * \r
+     * This panel contains the All Modules Table       \r
      *         \r
-     * @return javax.swing.JPanel      \r
+     * @return javax.swing.JPanel      jPanelTop\r
      */\r
     private JPanel getJPanelTop() {\r
         if (jPanelTop == null) {\r
@@ -173,9 +199,11 @@ public class FpdFrameworkModules extends IInternalFrame {
     }\r
 \r
     /**\r
-     * This method initializes jPanel\r
+     * This method initializes jPanelBottom\r
      *         \r
-     * @return javax.swing.JPanel      \r
+     * This panel contains the FPD Modules Table\r
+     * \r
+     * @return javax.swing.JPanel      jPanelBottom\r
      */\r
     private JPanel getJPanelBottom() {\r
         if (jPanelBottom == null) {\r
@@ -191,9 +219,9 @@ public class FpdFrameworkModules extends IInternalFrame {
     }\r
 \r
     /**\r
-     * This method initializes jScrollPane     \r
+     * This method initializes jScrollPaneAllModules   \r
      *         \r
-     * @return javax.swing.JScrollPane \r
+     * @return javax.swing.JScrollPane jScrollPaneAllModules\r
      */\r
     private JScrollPane getJScrollPaneAllModules() {\r
         if (jScrollPaneAllModules == null) {\r
@@ -205,9 +233,9 @@ public class FpdFrameworkModules extends IInternalFrame {
     }\r
 \r
     /**\r
-     * This method initializes jTable  \r
+     * This method initializes jTableAllModules\r
      *         \r
-     * @return javax.swing.JTable      \r
+     * @return javax.swing.JTable      jTableAllModules\r
      */\r
     private JTable getJTableAllModules() {\r
         if (jTableAllModules == null) {\r
@@ -219,13 +247,15 @@ public class FpdFrameworkModules extends IInternalFrame {
             modelAllModules.addColumn("<html>Module<br>Name</html>");\r
             modelAllModules.addColumn("<html>Package<br>Name</html>");\r
             modelAllModules.addColumn("Path");\r
-            modelAllModules.addColumn("<html>Package<br>Version</html>");\r
+            modelAllModules.addColumn("<html>Module<br>Type</html>");\r
             modelAllModules.addColumn("<html>Module<br>Version</html>");\r
+            modelAllModules.addColumn("<html>Package<br>Version</html>");\r
             \r
             javax.swing.table.TableColumn column = null;\r
             column = jTableAllModules.getColumnModel().getColumn(modNameColForAllModTable);\r
             column.setPreferredWidth(modNamePrefWidth);\r
             column.setMinWidth(modNameMinWidth);\r
+            column.setMaxWidth(modNameMaxWidth);\r
             column = jTableAllModules.getColumnModel().getColumn(modVerColForAllModTable);\r
             column.setPreferredWidth(verPrefWidth);\r
             column.setMaxWidth(verMaxWidth);\r
@@ -238,20 +268,26 @@ public class FpdFrameworkModules extends IInternalFrame {
             column.setPreferredWidth(verPrefWidth);\r
             column.setMaxWidth(verMaxWidth);\r
             column.setMinWidth(verMinWidth);\r
+            column = jTableAllModules.getColumnModel().getColumn(typeColForAllModTable);\r
+            column.setPreferredWidth(typePrefWidth);\r
+            column.setMaxWidth(typeMaxWidth);\r
+            column.setMinWidth(typeMinWidth);\r
             column = jTableAllModules.getColumnModel().getColumn(pathColForAllModTable);\r
             column.setPreferredWidth(pathPrefWidth);\r
             column.setMinWidth(pathMinWidth);\r
 \r
             jTableAllModules.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);\r
-                       jTableAllModules.setAutoResizeMode(javax.swing.JTable.AUTO_RESIZE_OFF);\r
+                       // jTableAllModules.setAutoResizeMode(javax.swing.JTable.AUTO_RESIZE_OFF);\r
         }\r
         return jTableAllModules;\r
     }\r
 \r
     /**\r
-     * This method initializes jPanel2 \r
-     *         \r
-     * @return javax.swing.JPanel      \r
+     * This method initializes jPanelTopSouth\r
+     * \r
+     * This panel contains the ADD button\r
+     * \r
+     * @return javax.swing.JPanel   jPanelTopSouth\r
      */\r
     private JPanel getJPanelTopSouth() {\r
         if (jPanelTopSouth == null) {\r
@@ -265,9 +301,9 @@ public class FpdFrameworkModules extends IInternalFrame {
     }\r
 \r
     /**\r
-     * This method initializes jButton \r
+     * This method initializes jButtonAddModule        \r
      *         \r
-     * @return javax.swing.JButton     \r
+     * @return javax.swing.JButton     jButtonAddModule\r
      */\r
     private JButton getJButtonAddModule() {\r
         if (jButtonAddModule == null) {\r
@@ -364,9 +400,11 @@ public class FpdFrameworkModules extends IInternalFrame {
     }\r
 \r
     /**\r
-     * This method initializes jPanel3 \r
+     * This method initializes jPanelBottomSouth\r
+     * \r
+     * This panel contains the Settings and Remove Buttons\r
      *         \r
-     * @return javax.swing.JPanel      \r
+     * @return javax.swing.JPanel      jPanelBottomSouth\r
      */\r
     private JPanel getJPanelBottomSouth() {\r
         if (jPanelBottomSouth == null) {\r
@@ -381,9 +419,9 @@ public class FpdFrameworkModules extends IInternalFrame {
     }\r
 \r
     /**\r
-     * This method initializes jScrollPane1    \r
+     * This method initializes jScrollPaneFpdModules\r
      *         \r
-     * @return javax.swing.JScrollPane \r
+     * @return javax.swing.JScrollPane jScrollPaneFpdModules\r
      */\r
     private JScrollPane getJScrollPaneFpdModules() {\r
         if (jScrollPaneFpdModules == null) {\r
@@ -395,9 +433,9 @@ public class FpdFrameworkModules extends IInternalFrame {
     }\r
 \r
     /**\r
-     * This method initializes jTable\r
+     * This method initializes jTableFpdModules\r
      *         \r
-     * @return javax.swing.JTable      \r
+     * @return javax.swing.JTable      jTableFpdModules\r
      */\r
     private JTable getJTableFpdModules() {\r
         if (jTableFpdModules == null) {\r
@@ -410,13 +448,14 @@ public class FpdFrameworkModules extends IInternalFrame {
             modelFpdModules.addColumn("<html>Package<br>Name</html>");\r
             modelFpdModules.addColumn("Path");\r
             modelFpdModules.addColumn("<html>Supported<br>Architectures</html>");\r
-            modelFpdModules.addColumn("<html>Package<br>Version</html>");\r
             modelFpdModules.addColumn("<html>Module<br>Version</html>");\r
+            modelFpdModules.addColumn("<html>Package<br>Version</html>");\r
             \r
             javax.swing.table.TableColumn column = null;\r
             column = jTableFpdModules.getColumnModel().getColumn(modNameColForFpdModTable);\r
             column.setPreferredWidth(modNamePrefWidth);\r
             column.setMinWidth(modNameMinWidth);\r
+            column.setMaxWidth(modNameMaxWidth);\r
             column = jTableFpdModules.getColumnModel().getColumn(modVerColForFpdModTable);\r
             column.setPreferredWidth(verPrefWidth);\r
             column.setMaxWidth(verMaxWidth);\r
@@ -438,15 +477,15 @@ public class FpdFrameworkModules extends IInternalFrame {
             column.setMinWidth(pathMinWidth);\r
 \r
             jTableFpdModules.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);\r
-                       jTableFpdModules.setAutoResizeMode(javax.swing.JTable.AUTO_RESIZE_OFF);\r
+                       // jTableFpdModules.setAutoResizeMode(javax.swing.JTable.AUTO_RESIZE_OFF);\r
         }\r
         return jTableFpdModules;\r
     }\r
 \r
     /**\r
-     * This method initializes jButton1        \r
+     * This method initializes jButtonSettings\r
      *         \r
-     * @return javax.swing.JButton     \r
+     * @return javax.swing.JButton     jButtonSettings\r
      */\r
     private JButton getJButtonSettings() {\r
         if (jButtonSettings == null) {\r
@@ -492,9 +531,9 @@ public class FpdFrameworkModules extends IInternalFrame {
     }\r
 \r
     /**\r
-     * This method initializes jButton2        \r
+     * This method initializes jButtonRemoveModule\r
      *         \r
-     * @return javax.swing.JButton     \r
+     * @return javax.swing.JButton     jButtonRemoveModule\r
      */\r
     private JButton getJButtonRemoveModule() {\r
         if (jButtonRemoveModule == null) {\r
@@ -542,6 +581,7 @@ public class FpdFrameworkModules extends IInternalFrame {
     }\r
 \r
     /**\r
+     * \r
      * @param args\r
      */\r
     public static void main(String[] args) {\r
@@ -632,7 +672,7 @@ public class FpdFrameworkModules extends IInternalFrame {
 \r
         while (ispi.hasNext()) {\r
             PackageIdentification pi = (PackageIdentification) ispi.next();\r
-            String[] s = { "", "", "", "", "" };\r
+            String[] s = { "", "", "", "", "", "" };\r
 \r
             Set<ModuleIdentification> smi = GlobalData.getModules(pi);\r
             Iterator ismi = smi.iterator();\r
@@ -640,6 +680,7 @@ public class FpdFrameworkModules extends IInternalFrame {
                 ModuleIdentification mi = (ModuleIdentification) ismi.next();\r
                 s[modNameColForAllModTable] = mi.getName();\r
                 s[modVerColForAllModTable] = mi.getVersion();\r
+                s[typeColForAllModTable] = mi.getModuleType();\r
                 s[pkgNameColForAllModTable] = pi.getName();\r
                 s[pkgVerColForAllModTable] = pi.getVersion();\r
                 try {\r