From: lhauch Date: Tue, 15 Aug 2006 22:21:07 +0000 (+0000) Subject: Adjusted column sizes, made resizable, added Module Type column to All Module Table... X-Git-Tag: edk2-stable201903~24589 X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=commitdiff_plain;h=df4b9c3ecc06e787b975ae17cf3f5a352918b60f;hp=3c0192d429986cdd5701cdfb038fe703b04774a3 Adjusted column sizes, made resizable, added Module Type column to All Module Table, adjusted the Version columns to be module version, then pkg version. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1284 6f19259b-4bc3-4df7-8a09-765794883524 --- diff --git a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdFrameworkModules.java b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdFrameworkModules.java index 8ea5cc9a25..c8f9afc60c 100644 --- a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdFrameworkModules.java +++ b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdFrameworkModules.java @@ -32,7 +32,7 @@ import java.util.Vector; public class FpdFrameworkModules extends IInternalFrame { /** - * + * Initialize Globals */ private static final long serialVersionUID = 1L; @@ -79,17 +79,25 @@ public class FpdFrameworkModules extends IInternalFrame { private Map> fpdMsa = null; private ArrayList miList = null; - + + /** + * Column settings for displaying all modules in workspace + */ private final int modNameColForAllModTable = 0; private final int pkgNameColForAllModTable = 1; private final int pathColForAllModTable = 2; - private final int pkgVerColForAllModTable = 3; + private final int typeColForAllModTable = 3; + + private final int pkgVerColForAllModTable = 5; private final int modVerColForAllModTable = 4; + /** + * Column settings for display modules in the FPD file + */ private final int modNameColForFpdModTable = 0; private final int pkgNameColForFpdModTable = 1; @@ -98,10 +106,13 @@ public class FpdFrameworkModules extends IInternalFrame { private final int archColForFpdModTable = 3; - private final int pkgVerColForFpdModTable = 4; + private final int pkgVerColForFpdModTable = 5; - private final int modVerColForFpdModTable = 5; + private final int modVerColForFpdModTable = 4; + /** + * FpdFileContents structure + */ private final int ffcModGuid = 0; private final int ffcModVer = 1; @@ -111,22 +122,27 @@ public class FpdFrameworkModules extends IInternalFrame { private final int ffcPkgVer = 3; private final int ffcModArch = 4; - + + /** + * Set Column Widths, Only the PATH should not have a max width. + */ private final int modNameMinWidth = 168; private final int modNamePrefWidth = 200; + + private final int modNameMaxWidth = 350; private final int pkgNameMinWidth = 100; - private final int pkgNamePrefWidth = 110; + private final int pkgNamePrefWidth = 130; private final int pkgNameMaxWidth = 150; - private final int verMinWidth = 50; + private final int verMinWidth = 60; private final int verMaxWidth = 80; - private final int verPrefWidth = 60; + private final int verPrefWidth = 70; private final int pathPrefWidth = 320; @@ -138,10 +154,18 @@ public class FpdFrameworkModules extends IInternalFrame { private final int archMaxWidth = 100; + private final int typePrefWidth = 145; + + private final int typeMinWidth = 100; + + private final int typeMaxWidth = 155; + /** - * This method initializes jSplitPane + * This method initializes jSplitPane + * + * This is the main edit window * - * @return javax.swing.JSplitPane + * @return javax.swing.JSplitPane jSplitPane */ private JSplitPane getJSplitPane() { if (jSplitPane == null) { @@ -155,9 +179,11 @@ public class FpdFrameworkModules extends IInternalFrame { } /** - * This method initializes jPanel + * This method initializes jPanelTop + * + * This panel contains the All Modules Table * - * @return javax.swing.JPanel + * @return javax.swing.JPanel jPanelTop */ private JPanel getJPanelTop() { if (jPanelTop == null) { @@ -173,9 +199,11 @@ public class FpdFrameworkModules extends IInternalFrame { } /** - * This method initializes jPanel1 + * This method initializes jPanelBottom * - * @return javax.swing.JPanel + * This panel contains the FPD Modules Table + * + * @return javax.swing.JPanel jPanelBottom */ private JPanel getJPanelBottom() { if (jPanelBottom == null) { @@ -191,9 +219,9 @@ public class FpdFrameworkModules extends IInternalFrame { } /** - * This method initializes jScrollPane + * This method initializes jScrollPaneAllModules * - * @return javax.swing.JScrollPane + * @return javax.swing.JScrollPane jScrollPaneAllModules */ private JScrollPane getJScrollPaneAllModules() { if (jScrollPaneAllModules == null) { @@ -205,9 +233,9 @@ public class FpdFrameworkModules extends IInternalFrame { } /** - * This method initializes jTable + * This method initializes jTableAllModules * - * @return javax.swing.JTable + * @return javax.swing.JTable jTableAllModules */ private JTable getJTableAllModules() { if (jTableAllModules == null) { @@ -219,13 +247,15 @@ public class FpdFrameworkModules extends IInternalFrame { modelAllModules.addColumn("Module
Name"); modelAllModules.addColumn("Package
Name"); modelAllModules.addColumn("Path"); - modelAllModules.addColumn("Package
Version"); + modelAllModules.addColumn("Module
Type"); modelAllModules.addColumn("Module
Version"); + modelAllModules.addColumn("Package
Version"); javax.swing.table.TableColumn column = null; column = jTableAllModules.getColumnModel().getColumn(modNameColForAllModTable); column.setPreferredWidth(modNamePrefWidth); column.setMinWidth(modNameMinWidth); + column.setMaxWidth(modNameMaxWidth); column = jTableAllModules.getColumnModel().getColumn(modVerColForAllModTable); column.setPreferredWidth(verPrefWidth); column.setMaxWidth(verMaxWidth); @@ -238,20 +268,26 @@ public class FpdFrameworkModules extends IInternalFrame { column.setPreferredWidth(verPrefWidth); column.setMaxWidth(verMaxWidth); column.setMinWidth(verMinWidth); + column = jTableAllModules.getColumnModel().getColumn(typeColForAllModTable); + column.setPreferredWidth(typePrefWidth); + column.setMaxWidth(typeMaxWidth); + column.setMinWidth(typeMinWidth); column = jTableAllModules.getColumnModel().getColumn(pathColForAllModTable); column.setPreferredWidth(pathPrefWidth); column.setMinWidth(pathMinWidth); jTableAllModules.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); - jTableAllModules.setAutoResizeMode(javax.swing.JTable.AUTO_RESIZE_OFF); + // jTableAllModules.setAutoResizeMode(javax.swing.JTable.AUTO_RESIZE_OFF); } return jTableAllModules; } /** - * This method initializes jPanel2 - * - * @return javax.swing.JPanel + * This method initializes jPanelTopSouth + * + * This panel contains the ADD button + * + * @return javax.swing.JPanel jPanelTopSouth */ private JPanel getJPanelTopSouth() { if (jPanelTopSouth == null) { @@ -265,9 +301,9 @@ public class FpdFrameworkModules extends IInternalFrame { } /** - * This method initializes jButton + * This method initializes jButtonAddModule * - * @return javax.swing.JButton + * @return javax.swing.JButton jButtonAddModule */ private JButton getJButtonAddModule() { if (jButtonAddModule == null) { @@ -364,9 +400,11 @@ public class FpdFrameworkModules extends IInternalFrame { } /** - * This method initializes jPanel3 + * This method initializes jPanelBottomSouth + * + * This panel contains the Settings and Remove Buttons * - * @return javax.swing.JPanel + * @return javax.swing.JPanel jPanelBottomSouth */ private JPanel getJPanelBottomSouth() { if (jPanelBottomSouth == null) { @@ -381,9 +419,9 @@ public class FpdFrameworkModules extends IInternalFrame { } /** - * This method initializes jScrollPane1 + * This method initializes jScrollPaneFpdModules * - * @return javax.swing.JScrollPane + * @return javax.swing.JScrollPane jScrollPaneFpdModules */ private JScrollPane getJScrollPaneFpdModules() { if (jScrollPaneFpdModules == null) { @@ -395,9 +433,9 @@ public class FpdFrameworkModules extends IInternalFrame { } /** - * This method initializes jTable1 + * This method initializes jTableFpdModules * - * @return javax.swing.JTable + * @return javax.swing.JTable jTableFpdModules */ private JTable getJTableFpdModules() { if (jTableFpdModules == null) { @@ -410,13 +448,14 @@ public class FpdFrameworkModules extends IInternalFrame { modelFpdModules.addColumn("Package
Name"); modelFpdModules.addColumn("Path"); modelFpdModules.addColumn("Supported
Architectures"); - modelFpdModules.addColumn("Package
Version"); modelFpdModules.addColumn("Module
Version"); + modelFpdModules.addColumn("Package
Version"); javax.swing.table.TableColumn column = null; column = jTableFpdModules.getColumnModel().getColumn(modNameColForFpdModTable); column.setPreferredWidth(modNamePrefWidth); column.setMinWidth(modNameMinWidth); + column.setMaxWidth(modNameMaxWidth); column = jTableFpdModules.getColumnModel().getColumn(modVerColForFpdModTable); column.setPreferredWidth(verPrefWidth); column.setMaxWidth(verMaxWidth); @@ -438,15 +477,15 @@ public class FpdFrameworkModules extends IInternalFrame { column.setMinWidth(pathMinWidth); jTableFpdModules.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); - jTableFpdModules.setAutoResizeMode(javax.swing.JTable.AUTO_RESIZE_OFF); + // jTableFpdModules.setAutoResizeMode(javax.swing.JTable.AUTO_RESIZE_OFF); } return jTableFpdModules; } /** - * This method initializes jButton1 + * This method initializes jButtonSettings * - * @return javax.swing.JButton + * @return javax.swing.JButton jButtonSettings */ private JButton getJButtonSettings() { if (jButtonSettings == null) { @@ -492,9 +531,9 @@ public class FpdFrameworkModules extends IInternalFrame { } /** - * This method initializes jButton2 + * This method initializes jButtonRemoveModule * - * @return javax.swing.JButton + * @return javax.swing.JButton jButtonRemoveModule */ private JButton getJButtonRemoveModule() { if (jButtonRemoveModule == null) { @@ -542,6 +581,7 @@ public class FpdFrameworkModules extends IInternalFrame { } /** + * * @param args */ public static void main(String[] args) { @@ -632,7 +672,7 @@ public class FpdFrameworkModules extends IInternalFrame { while (ispi.hasNext()) { PackageIdentification pi = (PackageIdentification) ispi.next(); - String[] s = { "", "", "", "", "" }; + String[] s = { "", "", "", "", "", "" }; Set smi = GlobalData.getModules(pi); Iterator ismi = smi.iterator(); @@ -640,6 +680,7 @@ public class FpdFrameworkModules extends IInternalFrame { ModuleIdentification mi = (ModuleIdentification) ismi.next(); s[modNameColForAllModTable] = mi.getName(); s[modVerColForAllModTable] = mi.getVersion(); + s[typeColForAllModTable] = mi.getModuleType(); s[pkgNameColForAllModTable] = pi.getName(); s[pkgVerColForAllModTable] = pi.getVersion(); try {