From: lhauch Date: Tue, 15 Aug 2006 23:59:55 +0000 (+0000) Subject: Added module type column to the FPD module table, and also removed AUTO_RESIZE_OFF... X-Git-Tag: edk2-stable201903~24587 X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=commitdiff_plain;h=4cd31580d8feafeddd78e3ba30095dc7374b1035 Added module type column to the FPD module table, and also removed AUTO_RESIZE_OFF, so that the columns fill the pane - only the Path column can be re-sized to any great extent, the other columns can be resized just enough to show the data. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1286 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 d64b00329f..0a15d3188a 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 @@ -106,9 +106,11 @@ public class FpdFrameworkModules extends IInternalFrame { private final int archColForFpdModTable = 3; - private final int pkgVerColForFpdModTable = 5; + private final int pkgVerColForFpdModTable = 6; - private final int modVerColForFpdModTable = 4; + private final int modVerColForFpdModTable = 5; + + private final int typeColForFpdModTable = 4; /** * FpdFileContents structure @@ -277,7 +279,7 @@ public class FpdFrameworkModules extends IInternalFrame { column.setMinWidth(pathMinWidth); jTableAllModules.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); - jTableAllModules.setAutoResizeMode(javax.swing.JTable.AUTO_RESIZE_OFF); + } return jTableAllModules; } @@ -339,6 +341,7 @@ public class FpdFrameworkModules extends IInternalFrame { String mv = mi.getVersion(); String pg = mi.getPackage().getGuid(); String pv = mi.getPackage().getVersion(); + String mType = mi.getModuleType(); ArrayList al = fpdMsa.get(mg + mv + pg + pv); if (al == null) { @@ -361,7 +364,7 @@ public class FpdFrameworkModules extends IInternalFrame { String arch = vArchs.get(i); al.add(arch); archsAdded += arch + " "; - String[] row = { "", "", "", "", "", "" }; + String[] row = { "", "", "", "", "", "", "" }; if (mi != null) { row[modNameColForFpdModTable] = mi.getName(); @@ -370,6 +373,7 @@ public class FpdFrameworkModules extends IInternalFrame { row[archColForFpdModTable] = arch; row[pkgVerColForFpdModTable] = pv; row[modVerColForFpdModTable] = mv; + row[typeColForFpdModTable] = mType; } modelFpdModules.addRow(row); @@ -379,7 +383,7 @@ public class FpdFrameworkModules extends IInternalFrame { //ToDo : specify archs need to add. ffc.addFrameworkModulesPcdBuildDefs(mi, arch, null); } catch (Exception exception) { - JOptionPane.showMessageDialog(frame, "Adding " + row[modNameColForFpdModTable] + " with SupArch " + arch + JOptionPane.showMessageDialog(frame, "Adding " + row[modNameColForFpdModTable] + " with Supporting Architectures: " + arch + ": " + exception.getMessage()); errorOccurred = true; } @@ -448,8 +452,10 @@ public class FpdFrameworkModules extends IInternalFrame { modelFpdModules.addColumn("Package
Name"); modelFpdModules.addColumn("Path"); modelFpdModules.addColumn("Supported
Architectures"); + modelFpdModules.addColumn("Module
Type"); modelFpdModules.addColumn("Module
Version"); modelFpdModules.addColumn("Package
Version"); + javax.swing.table.TableColumn column = null; column = jTableFpdModules.getColumnModel().getColumn(modNameColForFpdModTable); @@ -475,9 +481,13 @@ public class FpdFrameworkModules extends IInternalFrame { column = jTableFpdModules.getColumnModel().getColumn(pathColForFpdModTable); column.setPreferredWidth(pathPrefWidth); column.setMinWidth(pathMinWidth); + column = jTableFpdModules.getColumnModel().getColumn(typeColForFpdModTable); + column.setPreferredWidth(typePrefWidth); + column.setMaxWidth(typeMaxWidth); + column.setMinWidth(typeMinWidth); jTableFpdModules.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); - jTableFpdModules.setAutoResizeMode(javax.swing.JTable.AUTO_RESIZE_OFF); + } return jTableFpdModules; } @@ -585,7 +595,7 @@ public class FpdFrameworkModules extends IInternalFrame { * @param args */ public static void main(String[] args) { - // TODO Auto-generated method stub + // Set the pane visable new FpdFrameworkModules().setVisible(true); } @@ -631,10 +641,11 @@ public class FpdFrameworkModules extends IInternalFrame { for (int i = 0; i < saa.length; ++i) { ModuleIdentification mi = GlobalData.getModuleId(saa[i][ffcModGuid] + " " + saa[i][ffcModVer] + " " + saa[i][ffcPkgGuid] + " " + saa[i][ffcPkgVer]); - String[] row = { "", "", "", "", "", "" }; + String[] row = { "", "", "", "", "", "", "" }; if (mi != null) { row[modNameColForFpdModTable] = mi.getName(); row[modVerColForFpdModTable] = mi.getVersion(); + row[typeColForFpdModTable] = mi.getModuleType(); row[pkgNameColForFpdModTable] = mi.getPackage().getName(); row[pkgVerColForFpdModTable] = mi.getPackage().getVersion(); row[archColForFpdModTable] = saa[i][4];