git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@710 6f19259b...
authorjlin16 <jlin16@6f19259b-4bc3-4df7-8a09-765794883524>
Sat, 1 Jul 2006 11:43:16 +0000 (11:43 +0000)
committerjlin16 <jlin16@6f19259b-4bc3-4df7-8a09-765794883524>
Sat, 1 Jul 2006 11:43:16 +0000 (11:43 +0000)
Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/DynamicTree.java
Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdBuildOptions.java
Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdDynamicPcdBuildDefinitions.java
Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdFileContents.java
Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdFlash.java
Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdFrameworkModules.java
Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdHeader.java
Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdModuleSA.java
Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdPlatformDefs.java

index bd3d4feb52e003246d41dd4f01b827782ec15828..e54c7f0b6c21ff20a33118001d8a1bf0c0926ea2 100644 (file)
-/** @file\r
\r
- The file is used to create tree view sections\r
\r
- Copyright (c) 2006, Intel Corporation\r
- All rights reserved. This program and the accompanying materials\r
- are licensed and made available under the terms and conditions of the BSD License\r
- which accompanies this distribution.  The full text of the license may be found at\r
- http://opensource.org/licenses/bsd-license.php\r
\r
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
\r
- **/\r
-package org.tianocore.frameworkwizard.platform.ui;\r
-import java.awt.GridLayout;\r
-import java.awt.Toolkit;\r
-\r
-import javax.swing.ImageIcon;\r
-import javax.swing.JPanel;\r
-import javax.swing.JScrollPane;\r
-import javax.swing.JTree;\r
-import javax.swing.tree.DefaultMutableTreeNode;\r
-import javax.swing.tree.DefaultTreeCellRenderer;\r
-import javax.swing.tree.DefaultTreeModel;\r
-import javax.swing.tree.MutableTreeNode;\r
-import javax.swing.tree.TreePath;\r
-import javax.swing.tree.TreeSelectionModel;\r
-import javax.swing.event.TreeModelEvent;\r
-import javax.swing.event.TreeModelListener;\r
-\r
-\r
-public class DynamicTree extends JPanel {\r
-    protected DefaultMutableTreeNode rootNode;\r
-    protected DefaultTreeModel treeModel;\r
-    protected JTree tree;\r
-    private Toolkit toolkit = Toolkit.getDefaultToolkit();\r
-\r
-    public DynamicTree() {\r
-        super(new GridLayout(1,0));\r
-        \r
-        rootNode = new DefaultMutableTreeNode("Sections");\r
-        treeModel = new DefaultTreeModel(rootNode);\r
-        treeModel.addTreeModelListener(new MyTreeModelListener());\r
-\r
-        tree = new JTree(treeModel);\r
-        DefaultTreeCellRenderer renderer = (DefaultTreeCellRenderer) tree.getCellRenderer();\r
-        renderer.setOpenIcon(new ImageIcon("junk.gif"));\r
-        renderer.setClosedIcon(new ImageIcon("junk.gif"));\r
-        renderer.setLeafIcon(new ImageIcon("junk.gif"));\r
-        tree.setEditable(true);\r
-        tree.getSelectionModel().setSelectionMode\r
-                (TreeSelectionModel.SINGLE_TREE_SELECTION);\r
-        tree.setShowsRootHandles(true);\r
-\r
-        JScrollPane scrollPane = new JScrollPane(tree);\r
-        add(scrollPane);\r
-    }\r
-\r
-    /** Remove all nodes except the root node. */\r
-    public void clear() {\r
-        rootNode.removeAllChildren();\r
-        treeModel.reload();\r
-    }\r
-\r
-    public String getCurrentNodeText() {\r
-        DefaultMutableTreeNode currentNode = (DefaultMutableTreeNode)tree.getLastSelectedPathComponent();\r
-        if (currentNode != null){\r
-            return (String)currentNode.getUserObject();\r
-        }\r
-        return null;\r
-    }\r
-    /** Remove the currently selected node. */\r
-    public void removeCurrentNode() {\r
-        TreePath currentSelection = tree.getSelectionPath();\r
-        if (currentSelection != null) {\r
-            DefaultMutableTreeNode currentNode = (DefaultMutableTreeNode)\r
-                         (currentSelection.getLastPathComponent());\r
-            MutableTreeNode parent = (MutableTreeNode)(currentNode.getParent());\r
-            if (parent != null) {\r
-                treeModel.removeNodeFromParent(currentNode);\r
-                return;\r
-            }\r
-        } \r
-\r
-        // Either there was no selection, or the root was selected.\r
-        toolkit.beep();\r
-    }\r
-\r
-    /** Add child to the currently selected node. */\r
-    public DefaultMutableTreeNode addObject(Object child) {\r
-        DefaultMutableTreeNode parentNode = null;\r
-        TreePath parentPath = tree.getSelectionPath();\r
-\r
-        if (parentPath == null) {\r
-            parentNode = rootNode;\r
-        } else {\r
-            parentNode = (DefaultMutableTreeNode)\r
-                         (parentPath.getLastPathComponent());\r
-        }\r
-\r
-        return addObject(parentNode, child, true);\r
-    }\r
-\r
-    public DefaultMutableTreeNode addObject(DefaultMutableTreeNode parent,\r
-                                            Object child) {\r
-        return addObject(parent, child, false);\r
-    }\r
-\r
-    public DefaultMutableTreeNode addObject(DefaultMutableTreeNode parent,\r
-                                            Object child, \r
-                                            boolean shouldBeVisible) {\r
-        DefaultMutableTreeNode childNode = \r
-                new DefaultMutableTreeNode(child);\r
-\r
-        if (parent == null) {\r
-            parent = rootNode;\r
-        }\r
-\r
-        treeModel.insertNodeInto(childNode, parent, \r
-                                 parent.getChildCount());\r
-\r
-        //Make sure the user can see the lovely new node.\r
-        if (shouldBeVisible) {\r
-            tree.scrollPathToVisible(new TreePath(childNode.getPath()));\r
-        }\r
-        return childNode;\r
-    }\r
-\r
-    class MyTreeModelListener implements TreeModelListener {\r
-        public void treeNodesChanged(TreeModelEvent e) {\r
-            DefaultMutableTreeNode node;\r
-            node = (DefaultMutableTreeNode)\r
-                     (e.getTreePath().getLastPathComponent());\r
-\r
-            /*\r
-             * If the event lists children, then the changed\r
-             * node is the child of the node we've already\r
-             * gotten.  Otherwise, the changed node and the\r
-             * specified node are the same.\r
-             */\r
-            try {\r
-                int index = e.getChildIndices()[0];\r
-                node = (DefaultMutableTreeNode)\r
-                       (node.getChildAt(index));\r
-            } catch (NullPointerException exc) {}\r
-\r
-            System.out.println("The user has finished editing the node.");\r
-            System.out.println("New value: " + node.getUserObject());\r
-        }\r
-        public void treeNodesInserted(TreeModelEvent e) {\r
-        }\r
-        public void treeNodesRemoved(TreeModelEvent e) {\r
-        }\r
-        public void treeStructureChanged(TreeModelEvent e) {\r
-        }\r
-    }\r
-}\r
-\r
-\r
+/** @file
+ The file is used to create tree view sections
+ Copyright (c) 2006, Intel Corporation
+ All rights reserved. This program and the accompanying materials
+ are licensed and made available under the terms and conditions of the BSD License
+ which accompanies this distribution.  The full text of the license may be found at
+ http://opensource.org/licenses/bsd-license.php
+ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+ **/
+package org.tianocore.frameworkwizard.platform.ui;
+import java.awt.GridLayout;
+import java.awt.Toolkit;
+
+import javax.swing.ImageIcon;
+import javax.swing.JPanel;
+import javax.swing.JScrollPane;
+import javax.swing.JTree;
+import javax.swing.tree.DefaultMutableTreeNode;
+import javax.swing.tree.DefaultTreeCellRenderer;
+import javax.swing.tree.DefaultTreeModel;
+import javax.swing.tree.MutableTreeNode;
+import javax.swing.tree.TreePath;
+import javax.swing.tree.TreeSelectionModel;
+import javax.swing.event.TreeModelEvent;
+import javax.swing.event.TreeModelListener;
+
+
+public class DynamicTree extends JPanel {
+    /**
+     * 
+     */
+    private static final long serialVersionUID = 1L;
+    protected DefaultMutableTreeNode rootNode;
+    protected DefaultTreeModel treeModel;
+    protected JTree tree;
+    private Toolkit toolkit = Toolkit.getDefaultToolkit();
+
+    public DynamicTree() {
+        super(new GridLayout(1,0));
+        
+        rootNode = new DefaultMutableTreeNode("Sections");
+        treeModel = new DefaultTreeModel(rootNode);
+        treeModel.addTreeModelListener(new MyTreeModelListener());
+
+        tree = new JTree(treeModel);
+        DefaultTreeCellRenderer renderer = (DefaultTreeCellRenderer) tree.getCellRenderer();
+        renderer.setOpenIcon(new ImageIcon("junk.gif"));
+        renderer.setClosedIcon(new ImageIcon("junk.gif"));
+        renderer.setLeafIcon(new ImageIcon("junk.gif"));
+        tree.setEditable(true);
+        tree.getSelectionModel().setSelectionMode
+                (TreeSelectionModel.SINGLE_TREE_SELECTION);
+        tree.setShowsRootHandles(true);
+
+        JScrollPane scrollPane = new JScrollPane(tree);
+        add(scrollPane);
+    }
+
+    /** Remove all nodes except the root node. */
+    public void clear() {
+        rootNode.removeAllChildren();
+        treeModel.reload();
+    }
+
+    public String getCurrentNodeText() {
+        DefaultMutableTreeNode currentNode = (DefaultMutableTreeNode)tree.getLastSelectedPathComponent();
+        if (currentNode != null){
+            return (String)currentNode.getUserObject();
+        }
+        return null;
+    }
+    /** Remove the currently selected node. */
+    public void removeCurrentNode() {
+        TreePath currentSelection = tree.getSelectionPath();
+        if (currentSelection != null) {
+            DefaultMutableTreeNode currentNode = (DefaultMutableTreeNode)
+                         (currentSelection.getLastPathComponent());
+            MutableTreeNode parent = (MutableTreeNode)(currentNode.getParent());
+            if (parent != null) {
+                treeModel.removeNodeFromParent(currentNode);
+                return;
+            }
+        } 
+
+        // Either there was no selection, or the root was selected.
+        toolkit.beep();
+    }
+
+    /** Add child to the currently selected node. */
+    public DefaultMutableTreeNode addObject(Object child) {
+        DefaultMutableTreeNode parentNode = null;
+        TreePath parentPath = tree.getSelectionPath();
+
+        if (parentPath == null) {
+            parentNode = rootNode;
+        } else {
+            parentNode = (DefaultMutableTreeNode)
+                         (parentPath.getLastPathComponent());
+        }
+
+        return addObject(parentNode, child, true);
+    }
+
+    public DefaultMutableTreeNode addObject(DefaultMutableTreeNode parent,
+                                            Object child) {
+        return addObject(parent, child, false);
+    }
+
+    public DefaultMutableTreeNode addObject(DefaultMutableTreeNode parent,
+                                            Object child, 
+                                            boolean shouldBeVisible) {
+        DefaultMutableTreeNode childNode = 
+                new DefaultMutableTreeNode(child);
+
+        if (parent == null) {
+            parent = rootNode;
+        }
+
+        treeModel.insertNodeInto(childNode, parent, 
+                                 parent.getChildCount());
+
+        //Make sure the user can see the lovely new node.
+        if (shouldBeVisible) {
+            tree.scrollPathToVisible(new TreePath(childNode.getPath()));
+        }
+        return childNode;
+    }
+
+    class MyTreeModelListener implements TreeModelListener {
+        public void treeNodesChanged(TreeModelEvent e) {
+            DefaultMutableTreeNode node;
+            node = (DefaultMutableTreeNode)
+                     (e.getTreePath().getLastPathComponent());
+
+            /*
+             * If the event lists children, then the changed
+             * node is the child of the node we've already
+             * gotten.  Otherwise, the changed node and the
+             * specified node are the same.
+             */
+            try {
+                int index = e.getChildIndices()[0];
+                node = (DefaultMutableTreeNode)
+                       (node.getChildAt(index));
+            } catch (NullPointerException exc) {}
+
+            System.out.println("The user has finished editing the node.");
+            System.out.println("New value: " + node.getUserObject());
+        }
+        public void treeNodesInserted(TreeModelEvent e) {
+        }
+        public void treeNodesRemoved(TreeModelEvent e) {
+        }
+        public void treeStructureChanged(TreeModelEvent e) {
+        }
+    }
+}
+
+
index 6abccfe38e39603a3fddd95ce0b07d89dcd00c24..bfbf783168345f2a2642f8df5c0b07f808655f56 100644 (file)
@@ -39,6 +39,8 @@ import javax.swing.JTable;
 import javax.swing.JComboBox;\r
 import javax.swing.JRadioButton;\r
 import javax.swing.ListSelectionModel;\r
+import javax.swing.event.InternalFrameAdapter;\r
+import javax.swing.event.InternalFrameEvent;\r
 import javax.swing.event.ListSelectionEvent;\r
 import javax.swing.event.ListSelectionListener;\r
 import javax.swing.event.TableModelEvent;\r
@@ -46,12 +48,10 @@ import javax.swing.event.TableModelListener;
 import javax.swing.table.DefaultTableModel;\r
 import javax.swing.table.TableColumn;\r
 import javax.swing.table.TableModel;\r
-import javax.swing.JList;\r
 \r
 import org.tianocore.PlatformSurfaceAreaDocument;\r
 import org.tianocore.frameworkwizard.common.ui.IInternalFrame;\r
 import java.awt.CardLayout;\r
-import javax.swing.JTree;\r
 \r
 public class FpdBuildOptions extends IInternalFrame {\r
 \r
@@ -74,18 +74,14 @@ public class FpdBuildOptions extends IInternalFrame {
     private JTextField jTextField4 = null;\r
     private JScrollPane jScrollPane2 = null;\r
     private JTable jTable2 = null;\r
-    private DefaultTableModel fileNameTableModel = null;\r
+    private DefaultTableModel ffsTableModel = null;\r
     private DefaultTableModel imageEntryPointTableModel = null;\r
     private DefaultTableModel outputDirectoryTableModel = null;\r
     private DefaultTableModel antTaskTableModel = null;\r
     private DefaultTableModel ffsAttributesTableModel = null;\r
     private DefaultTableModel optionsTableModel = null;\r
     private JPanel jPanel13 = null;\r
-    private JPanel jPanel14 = null;\r
     private JPanel jPanel18 = null;\r
-    private JScrollPane jScrollPane4 = null;\r
-    private JLabel jLabel6 = null;\r
-    private JList jList = null;\r
     private JPanel jPanel15 = null;\r
     private JPanel jPanel16 = null;\r
     private JPanel jPanel17 = null;\r
@@ -127,8 +123,6 @@ public class FpdBuildOptions extends IInternalFrame {
     private JButton jButton15 = null;\r
     private JButton jButton16 = null;\r
     private DefaultListModel listModel = new DefaultListModel();\r
-    private JScrollPane jScrollPane7 = null;\r
-    private JTree jTree = null;\r
     private JButton jButton17 = null;\r
     private JButton jButton18 = null;\r
     private FpdFileContents ffc = null;\r
@@ -146,6 +140,8 @@ public class FpdBuildOptions extends IInternalFrame {
     private int selectedRow = -1;\r
     private JLabel jLabel = null;\r
     private JLabel jLabel1 = null;\r
+    private JScrollPane jScrollPane = null;\r
+    private JTable jTable = null;\r
     /**\r
      * This method initializes jPanel  \r
      *         \r
@@ -457,29 +453,12 @@ public class FpdBuildOptions extends IInternalFrame {
         if (jPanel13 == null) {\r
             jPanel13 = new JPanel();\r
             jPanel13.setLayout(new BorderLayout());\r
-            jPanel13.add(getJPanel14(), java.awt.BorderLayout.WEST);\r
             jPanel13.add(getJPanel18(), java.awt.BorderLayout.CENTER);\r
+            jPanel13.add(getJScrollPane(), java.awt.BorderLayout.WEST);\r
         }\r
         return jPanel13;\r
     }\r
 \r
-    /**\r
-     * This method initializes jPanel14        \r
-     *         \r
-     * @return javax.swing.JPanel      \r
-     */\r
-    private JPanel getJPanel14() {\r
-        if (jPanel14 == null) {\r
-            jLabel6 = new JLabel();\r
-            jLabel6.setText("FFS Types");\r
-            jPanel14 = new JPanel();\r
-            jPanel14.setPreferredSize(new java.awt.Dimension(120,300));\r
-            jPanel14.add(jLabel6, null);\r
-            jPanel14.add(getJScrollPane4(), null);\r
-        }\r
-        return jPanel14;\r
-    }\r
-\r
     /**\r
      * This method initializes jPanel18        \r
      *         \r
@@ -497,32 +476,6 @@ public class FpdBuildOptions extends IInternalFrame {
         return jPanel18;\r
     }\r
 \r
-    /**\r
-     * This method initializes jScrollPane4    \r
-     *         \r
-     * @return javax.swing.JScrollPane \r
-     */\r
-    private JScrollPane getJScrollPane4() {\r
-        if (jScrollPane4 == null) {\r
-            jScrollPane4 = new JScrollPane();\r
-            jScrollPane4.setPreferredSize(new java.awt.Dimension(120,330));\r
-            jScrollPane4.setViewportView(getJList());\r
-        }\r
-        return jScrollPane4;\r
-    }\r
-\r
-    /**\r
-     * This method initializes jList   \r
-     *         \r
-     * @return javax.swing.JList       \r
-     */\r
-    private JList getJList() {\r
-        if (jList == null) {\r
-            jList = new JList(listModel);\r
-        }\r
-        return jList;\r
-    }\r
-\r
     /**\r
      * This method initializes jPanel15        \r
      *         \r
@@ -573,7 +526,6 @@ public class FpdBuildOptions extends IInternalFrame {
     private JPanel getJPanel17() {\r
         if (jPanel17 == null) {\r
             jPanel17 = new JPanel();\r
-            jPanel17.add(getJScrollPane7(), null);\r
         }\r
         return jPanel17;\r
     }\r
@@ -602,6 +554,11 @@ public class FpdBuildOptions extends IInternalFrame {
             jButton8.setPreferredSize(new java.awt.Dimension(70,20));\r
             jButton8.setText("Add");\r
             jButton8.addActionListener(new AbstractAction() {\r
+                /**\r
+                 * \r
+                 */\r
+                private static final long serialVersionUID = -2923720717273384221L;\r
+\r
                 public void actionPerformed(java.awt.event.ActionEvent e) {\r
                     if (jTextField6.getText().length() > 0) {\r
                         listModel.addElement(jTextField6.getText());\r
@@ -623,8 +580,12 @@ public class FpdBuildOptions extends IInternalFrame {
             jButton9.setPreferredSize(new java.awt.Dimension(70,20));\r
             jButton9.setText("Delete");\r
             jButton9.addActionListener(new AbstractAction() {\r
+                /**\r
+                 * \r
+                 */\r
+                private static final long serialVersionUID = -4002678939178194476L;\r
+\r
                 public void actionPerformed(ActionEvent arg0){\r
-                    listModel.remove(jList.getSelectedIndex());\r
                 }\r
             });\r
         }\r
@@ -869,6 +830,11 @@ public class FpdBuildOptions extends IInternalFrame {
             jButton10.setText("Add");\r
             jButton10.setPreferredSize(new java.awt.Dimension(70,20));\r
             jButton10.addActionListener(new AbstractAction() {\r
+                /**\r
+                 * \r
+                 */\r
+                private static final long serialVersionUID = 1L;\r
+\r
                 public void actionPerformed(java.awt.event.ActionEvent e) {\r
                     boolean[] boolArray = {jCheckBox9.isSelected(),jCheckBox10.isSelected(),jCheckBox11.isSelected(),\r
                                            jCheckBox12.isSelected(),jCheckBox13.isSelected(),jCheckBox14.isSelected()};\r
@@ -918,6 +884,11 @@ public class FpdBuildOptions extends IInternalFrame {
             jButton11.setText("Delete");\r
             jButton11.setPreferredSize(new java.awt.Dimension(70,20));\r
             jButton11.addActionListener(new AbstractAction() {\r
+                /**\r
+                 * \r
+                 */\r
+                private static final long serialVersionUID = 1L;\r
+\r
                 public void actionPerformed(java.awt.event.ActionEvent e) {\r
                     if (selectedRow >= 0) {\r
                         optionsTableModel.removeRow(selectedRow);\r
@@ -964,6 +935,11 @@ public class FpdBuildOptions extends IInternalFrame {
             jButton12.setText("Add Sections");\r
             jButton12.setPreferredSize(new java.awt.Dimension(109,20));\r
             jButton12.addActionListener(new AbstractAction(){\r
+                /**\r
+                 * \r
+                 */\r
+                private static final long serialVersionUID = 1L;\r
+\r
                 public void actionPerformed(ActionEvent arg0){\r
                 }\r
             });\r
@@ -982,6 +958,11 @@ public class FpdBuildOptions extends IInternalFrame {
             jButton13.setText("Add Section");\r
             jButton13.setPreferredSize(new java.awt.Dimension(102,20));\r
             jButton13.addActionListener(new AbstractAction(){\r
+                /**\r
+                 * \r
+                 */\r
+                private static final long serialVersionUID = 1L;\r
+\r
                 public void actionPerformed(ActionEvent arg0){\r
                     CardLayout cl = (CardLayout)jPanel19.getLayout();\r
                     cl.last(jPanel19);\r
@@ -1152,6 +1133,11 @@ public class FpdBuildOptions extends IInternalFrame {
             jButton14.setText("Add");\r
             jButton14.setPreferredSize(new java.awt.Dimension(70,20));\r
             jButton14.addActionListener(new AbstractAction(){\r
+                /**\r
+                 * \r
+                 */\r
+                private static final long serialVersionUID = 1L;\r
+\r
                 public void actionPerformed(ActionEvent arg0){\r
                 }\r
             });\r
@@ -1187,32 +1173,6 @@ public class FpdBuildOptions extends IInternalFrame {
         return jButton16;\r
     }\r
 \r
-    /**\r
-     * This method initializes jScrollPane7    \r
-     *         \r
-     * @return javax.swing.JScrollPane \r
-     */\r
-    private JScrollPane getJScrollPane7() {\r
-        if (jScrollPane7 == null) {\r
-            jScrollPane7 = new JScrollPane();\r
-            jScrollPane7.setPreferredSize(new java.awt.Dimension(110,200));\r
-            jScrollPane7.setViewportView(getJTree());\r
-        }\r
-        return jScrollPane7;\r
-    }\r
-\r
-    /**\r
-     * This method initializes jTree   \r
-     *         \r
-     * @return javax.swing.JTree       \r
-     */\r
-    private JTree getJTree() {\r
-        if (jTree == null) {\r
-            jTree = new JTree();\r
-        }\r
-        return jTree;\r
-    }\r
-\r
     /**\r
      * This method initializes jButton17       \r
      *         \r
@@ -1224,6 +1184,11 @@ public class FpdBuildOptions extends IInternalFrame {
             jButton17.setPreferredSize(new java.awt.Dimension(70,20));\r
             jButton17.setText("Add");\r
             jButton17.addActionListener(new AbstractAction() {\r
+                /**\r
+                 * \r
+                 */\r
+                private static final long serialVersionUID = 1L;\r
+\r
                 public void actionPerformed(ActionEvent arg0){\r
                     Object[] o = {"", ""};\r
                     ffsAttributesTableModel.addRow(o);\r
@@ -1244,6 +1209,11 @@ public class FpdBuildOptions extends IInternalFrame {
             jButton18.setPreferredSize(new java.awt.Dimension(70,20));\r
             jButton18.setText("Delete");\r
             jButton18.addActionListener(new AbstractAction(){\r
+                /**\r
+                 * \r
+                 */\r
+                private static final long serialVersionUID = 1L;\r
+\r
                 public void actionPerformed(ActionEvent arg0){\r
                     if (jTable4.getSelectedRow() >= 0){\r
                         ffsAttributesTableModel.removeRow(jTable4.getSelectedRow());\r
@@ -1379,6 +1349,36 @@ public class FpdBuildOptions extends IInternalFrame {
         return jTextField13;\r
     }\r
 \r
+    /**\r
+     * This method initializes jScrollPane     \r
+     *         \r
+     * @return javax.swing.JScrollPane \r
+     */\r
+    private JScrollPane getJScrollPane() {\r
+        if (jScrollPane == null) {\r
+            jScrollPane = new JScrollPane();\r
+            jScrollPane.setPreferredSize(new java.awt.Dimension(150,419));\r
+            jScrollPane.setViewportView(getJTable());\r
+        }\r
+        return jScrollPane;\r
+    }\r
+\r
+    /**\r
+     * This method initializes jTable  \r
+     *         \r
+     * @return javax.swing.JTable      \r
+     */\r
+    private JTable getJTable() {\r
+        if (jTable == null) {\r
+            ffsTableModel = new DefaultTableModel();\r
+            ffsTableModel.addColumn("FFS Type");\r
+            jTable = new JTable(ffsTableModel);\r
+            jTable.setShowGrid(false);\r
+            jTable.setRowHeight(20);\r
+        }\r
+        return jTable;\r
+    }\r
+\r
     /**\r
      * @param args\r
      */\r
@@ -1405,6 +1405,28 @@ public class FpdBuildOptions extends IInternalFrame {
     private void init(FpdFileContents ffc) {\r
         initOptionTable();\r
         initAntTaskTable();\r
+        this.addInternalFrameListener(new InternalFrameAdapter(){\r
+            public void internalFrameDeactivated(InternalFrameEvent e){\r
+                if (jTable.isEditing()) {\r
+                    jTable.getCellEditor().stopCellEditing();\r
+                }\r
+//                if (jTable1.isEditing()) {\r
+//                    jTable1.getCellEditor().stopCellEditing();\r
+//                }\r
+                if (jTable2.isEditing()) {\r
+                    jTable2.getCellEditor().stopCellEditing();\r
+                }\r
+//                if (jTable3.isEditing()) {\r
+//                    jTable3.getCellEditor().stopCellEditing();\r
+//                }\r
+                if (jTable4.isEditing()) {\r
+                    jTable4.getCellEditor().stopCellEditing();\r
+                }\r
+                if (jTable5.isEditing()) {\r
+                    jTable5.getCellEditor().stopCellEditing();\r
+                }\r
+            }\r
+        });\r
     }\r
     \r
     private void initOptionTable() {\r
index 155f4f48d4e05d3dce13d817a9ef2b1001c6d6ed..5c1393de58968742c15d7c96c6340d19f8de6835 100644 (file)
@@ -4,7 +4,6 @@ import java.awt.BorderLayout;
 \r
 import javax.swing.ButtonGroup;\r
 import javax.swing.JPanel;\r
-import javax.swing.JDialog;\r
 import javax.swing.JScrollPane;\r
 import javax.swing.JTable;\r
 import javax.swing.ListSelectionModel;\r
@@ -23,6 +22,10 @@ import javax.swing.JTextField;
 \r
 public class FpdDynamicPcdBuildDefinitions extends IInternalFrame {\r
 \r
+    /**\r
+     * \r
+     */\r
+    private static final long serialVersionUID = 1L;\r
     private JPanel jContentPane = null;\r
     private JPanel jPanel = null;\r
     private JPanel jPanel1 = null;\r
@@ -465,7 +468,7 @@ public class FpdDynamicPcdBuildDefinitions extends IInternalFrame {
                     }\r
                     else{\r
                         int selected = lsm.getMinSelectionIndex();\r
-                        \r
+                        displaySkuInfoDetails(selected);\r
                     }\r
                 }\r
             });\r
@@ -662,6 +665,11 @@ public class FpdDynamicPcdBuildDefinitions extends IInternalFrame {
 }  //  @jve:decl-index=0:visual-constraint="10,10"\r
 \r
 class DynPcdTableModel extends DefaultTableModel {\r
+    /**\r
+     * \r
+     */\r
+    private static final long serialVersionUID = 1L;\r
+\r
     public boolean isCellEditable(int row, int col) {\r
         \r
         return false;\r
index 449578006e1d7b43af7429ab1a987d86b842185f..c9f4ccc98e8750258cf924d0ac5858ace96fb2c6 100644 (file)
@@ -33,10 +33,8 @@ import org.tianocore.AntTaskDocument;
 import org.tianocore.BuildOptionsDocument;\r
 import org.tianocore.DynamicPcdBuildDefinitionsDocument;\r
 import org.tianocore.FlashDefinitionFileDocument;\r
-import org.tianocore.FlashDeviceDefinitionsDocument;\r
 import org.tianocore.FlashDocument;\r
 import org.tianocore.FrameworkModulesDocument;\r
-import org.tianocore.FvRegionNameDocument;\r
 import org.tianocore.LibrariesDocument;\r
 import org.tianocore.ModuleSADocument;\r
 import org.tianocore.ModuleSurfaceAreaDocument;\r
@@ -1306,8 +1304,15 @@ public class FpdFileContents {
         Set<String> key = options.keySet();\r
         Iterator<String> i = key.iterator();\r
         while (i.hasNext()) {\r
+            \r
             FvImagesDocument.FvImages.FvImage.FvImageOptions.NameValue nv = fio.addNewNameValue();\r
             String k = (String)i.next();\r
+            if (k.equals("EFI_ALIGNMENT_CAP")) {\r
+                nv.setName(k);\r
+                nv.setValue("TRUE");\r
+                setFvImageOptionsAlign((String)options.get(k), fio);\r
+                continue;\r
+            }\r
             nv.setName(k);\r
             nv.setValue((String)options.get(k));\r
             \r
@@ -1315,6 +1320,195 @@ public class FpdFileContents {
         \r
     }\r
     \r
+    private void setFvImageOptionsAlign(String alignValue, FvImagesDocument.FvImages.FvImage.FvImageOptions fio) {\r
+        int numForm = -1;\r
+        if (alignValue.endsWith("K")) {\r
+            alignValue = alignValue.substring(0, alignValue.length()-1);\r
+            numForm = new Integer(alignValue).intValue() * 1024;\r
+        }\r
+        else {\r
+            numForm = new Integer(alignValue).intValue();\r
+        }\r
+        \r
+        FvImagesDocument.FvImages.FvImage.FvImageOptions.NameValue nv = null;\r
+        if (numForm / (64*1024) >= 1) {\r
+            nv = fio.addNewNameValue();\r
+            nv.setName("EFI_ALIGNMENT_64K");\r
+            nv.setValue("TRUE");\r
+        }\r
+        else {\r
+            nv = fio.addNewNameValue();\r
+            nv.setName("EFI_ALIGNMENT_64K");\r
+            nv.setValue("FALSE");\r
+        }\r
+        \r
+        if (numForm / (32*1024) >= 1) {\r
+            nv = fio.addNewNameValue();\r
+            nv.setName("EFI_ALIGNMENT_32K");\r
+            nv.setValue("TRUE");\r
+        }\r
+        else {\r
+            nv = fio.addNewNameValue();\r
+            nv.setName("EFI_ALIGNMENT_32K");\r
+            nv.setValue("FALSE");\r
+        }\r
+        \r
+        if (numForm / (16*1024) >= 1) {\r
+            nv = fio.addNewNameValue();\r
+            nv.setName("EFI_ALIGNMENT_16K");\r
+            nv.setValue("TRUE");\r
+        }\r
+        else {\r
+            nv = fio.addNewNameValue();\r
+            nv.setName("EFI_ALIGNMENT_16K");\r
+            nv.setValue("FALSE");\r
+        }\r
+        \r
+        if (numForm / (8*1024) >= 1) {\r
+            nv = fio.addNewNameValue();\r
+            nv.setName("EFI_ALIGNMENT_8K");\r
+            nv.setValue("TRUE");\r
+        }\r
+        else {\r
+            nv = fio.addNewNameValue();\r
+            nv.setName("EFI_ALIGNMENT_8K");\r
+            nv.setValue("FALSE");\r
+        }\r
+        \r
+        if (numForm / (4*1024) >= 1) {\r
+            nv = fio.addNewNameValue();\r
+            nv.setName("EFI_ALIGNMENT_4K");\r
+            nv.setValue("TRUE");\r
+        }\r
+        else {\r
+            nv = fio.addNewNameValue();\r
+            nv.setName("EFI_ALIGNMENT_4K");\r
+            nv.setValue("FALSE");\r
+        }\r
+        \r
+        if (numForm / (2*1024) >= 1) {\r
+            nv = fio.addNewNameValue();\r
+            nv.setName("EFI_ALIGNMENT_2K");\r
+            nv.setValue("TRUE");\r
+        }\r
+        else {\r
+            nv = fio.addNewNameValue();\r
+            nv.setName("EFI_ALIGNMENT_2K");\r
+            nv.setValue("FALSE");\r
+        }\r
+        \r
+        if (numForm / (1*1024) >= 1) {\r
+            nv = fio.addNewNameValue();\r
+            nv.setName("EFI_ALIGNMENT_1K");\r
+            nv.setValue("TRUE");\r
+        }\r
+        else {\r
+            nv = fio.addNewNameValue();\r
+            nv.setName("EFI_ALIGNMENT_1K");\r
+            nv.setValue("FALSE");\r
+        }\r
+        \r
+        if (numForm / (512) >= 1) {\r
+            nv = fio.addNewNameValue();\r
+            nv.setName("EFI_ALIGNMENT_512");\r
+            nv.setValue("TRUE");\r
+        }\r
+        else {\r
+            nv = fio.addNewNameValue();\r
+            nv.setName("EFI_ALIGNMENT_512");\r
+            nv.setValue("FALSE");\r
+        }\r
+        \r
+        if (numForm / (256) >= 1) {\r
+            nv = fio.addNewNameValue();\r
+            nv.setName("EFI_ALIGNMENT_256");\r
+            nv.setValue("TRUE");\r
+        }\r
+        else {\r
+            nv = fio.addNewNameValue();\r
+            nv.setName("EFI_ALIGNMENT_256");\r
+            nv.setValue("FALSE");\r
+        }\r
+        \r
+        if (numForm / (128) >= 1) {\r
+            nv = fio.addNewNameValue();\r
+            nv.setName("EFI_ALIGNMENT_128");\r
+            nv.setValue("TRUE");\r
+        }\r
+        else {\r
+            nv = fio.addNewNameValue();\r
+            nv.setName("EFI_ALIGNMENT_128");\r
+            nv.setValue("FALSE");\r
+        }\r
+        \r
+        if (numForm / (64) >= 1) {\r
+            nv = fio.addNewNameValue();\r
+            nv.setName("EFI_ALIGNMENT_64");\r
+            nv.setValue("TRUE");\r
+        }\r
+        else {\r
+            nv = fio.addNewNameValue();\r
+            nv.setName("EFI_ALIGNMENT_64");\r
+            nv.setValue("FALSE");\r
+        }\r
+        \r
+        if (numForm / (32) >= 1) {\r
+            nv = fio.addNewNameValue();\r
+            nv.setName("EFI_ALIGNMENT_32");\r
+            nv.setValue("TRUE");\r
+        }\r
+        else {\r
+            nv = fio.addNewNameValue();\r
+            nv.setName("EFI_ALIGNMENT_32");\r
+            nv.setValue("FALSE");\r
+        }\r
+        \r
+        if (numForm / (16) >= 1) {\r
+            nv = fio.addNewNameValue();\r
+            nv.setName("EFI_ALIGNMENT_16");\r
+            nv.setValue("TRUE");\r
+        }\r
+        else {\r
+            nv = fio.addNewNameValue();\r
+            nv.setName("EFI_ALIGNMENT_16");\r
+            nv.setValue("FALSE");\r
+        }\r
+        \r
+        if (numForm / (8) >= 1) {\r
+            nv = fio.addNewNameValue();\r
+            nv.setName("EFI_ALIGNMENT_8");\r
+            nv.setValue("TRUE");\r
+        }\r
+        else {\r
+            nv = fio.addNewNameValue();\r
+            nv.setName("EFI_ALIGNMENT_8");\r
+            nv.setValue("FALSE");\r
+        }\r
+        \r
+        if (numForm / (4) >= 1) {\r
+            nv = fio.addNewNameValue();\r
+            nv.setName("EFI_ALIGNMENT_4");\r
+            nv.setValue("TRUE");\r
+        }\r
+        else {\r
+            nv = fio.addNewNameValue();\r
+            nv.setName("EFI_ALIGNMENT_4");\r
+            nv.setValue("FALSE");\r
+        }\r
+        \r
+        if (numForm / (2) >= 1) {\r
+            nv = fio.addNewNameValue();\r
+            nv.setName("EFI_ALIGNMENT_2");\r
+            nv.setValue("TRUE");\r
+        }\r
+        else {\r
+            nv = fio.addNewNameValue();\r
+            nv.setName("EFI_ALIGNMENT_2");\r
+            nv.setValue("FALSE");\r
+        }\r
+            \r
+    }\r
+    \r
     public void removeFvImagesFvImage(int i) {\r
       \r
         XmlObject o = getfpdFlash().getFvImages();\r
index 992f65a2f3900f794c3678ed65a664bf797123e3..4e143108d5959c5c89a08849603610dafe83a2c4 100644 (file)
@@ -16,34 +16,24 @@ import java.awt.BorderLayout;
 import javax.swing.JPanel;\r
 \r
 import javax.swing.AbstractAction;\r
-import javax.swing.ButtonGroup;\r
 import javax.swing.DefaultCellEditor;\r
-import javax.swing.DefaultListModel;\r
-import javax.swing.JDialog;\r
 import javax.swing.JFileChooser;\r
 import javax.swing.JFrame;\r
-import javax.swing.JInternalFrame;\r
-import javax.swing.JOptionPane;\r
 import javax.swing.JTabbedPane;\r
 import javax.swing.JButton;\r
 import javax.swing.ListSelectionModel;\r
 \r
 import org.tianocore.PlatformSurfaceAreaDocument;\r
-import org.tianocore.frameworkwizard.common.Tools;\r
 import org.tianocore.frameworkwizard.common.ui.IInternalFrame;\r
 import org.tianocore.frameworkwizard.common.ui.StarLabel;\r
 \r
 \r
 import java.awt.FlowLayout;\r
 import java.awt.event.ActionEvent;\r
-import java.awt.event.ActionListener;\r
 import java.awt.event.ComponentAdapter;\r
 import java.awt.event.ComponentEvent;\r
-import java.awt.event.FocusAdapter;\r
-import java.awt.event.FocusEvent;\r
 import java.awt.event.ItemEvent;\r
 import java.awt.event.ItemListener;\r
-import java.awt.event.ActionEvent;\r
 import java.io.File;\r
 import java.util.ArrayList;\r
 import java.util.Iterator;\r
@@ -57,7 +47,8 @@ import java.awt.GridLayout;
 import javax.swing.JLabel;\r
 import javax.swing.JScrollPane;\r
 import javax.swing.JTable;\r
-import javax.swing.JList;\r
+import javax.swing.event.InternalFrameAdapter;\r
+import javax.swing.event.InternalFrameEvent;\r
 import javax.swing.event.ListSelectionEvent;\r
 import javax.swing.event.ListSelectionListener;\r
 import javax.swing.event.TableModelEvent;\r
@@ -67,12 +58,13 @@ import javax.swing.table.TableColumn;
 import javax.swing.table.TableModel;\r
 import javax.swing.JComboBox;\r
 import java.awt.Dimension;\r
-import javax.swing.JRadioButton;\r
-import javax.swing.JTextArea;\r
-import java.awt.CardLayout;\r
 \r
 public class FpdFlash extends IInternalFrame {\r
 \r
+    /**\r
+     * \r
+     */\r
+    private static final long serialVersionUID = 1L;\r
     static JFrame frame;\r
     private JPanel jContentPane = null;\r
     private JPanel jPanel = null;\r
@@ -84,7 +76,6 @@ public class FpdFlash extends IInternalFrame {
     private JButton jButtonOk = null;\r
     private JButton jButtonCancel = null;\r
     private JPanel jPanelFvImageN = null;\r
-    private JPanel jPanelFvImageW = null;\r
     private JPanel jPanelFvImageS = null;\r
     private JCheckBox jCheckBox1 = null;\r
     private JLabel jLabel = null;\r
@@ -92,7 +83,6 @@ public class FpdFlash extends IInternalFrame {
     private JLabel jLabel1 = null;\r
     private JTextField jTextField1 = null;\r
     private JButton jButton = null;\r
-    private JScrollPane jScrollPane = null;\r
     private JScrollPane jScrollPane1 = null;\r
     private JTable jTable = null;\r
     private JPanel jPanel4 = null;\r
@@ -130,19 +120,14 @@ public class FpdFlash extends IInternalFrame {
     private JCheckBox jCheckBox12 = null;\r
     private JCheckBox jCheckBox13 = null;\r
     private JPanel jPanel6 = null;\r
-    private DefaultTableModel fdfImageDefTableModel = null;\r
-    private DefaultTableModel fdfBlocksTableModel = null;\r
-    private DefaultTableModel fdfRegionsTableModel = null;\r
-    private DefaultTableModel fdfSubRegionsTableModel = null;\r
     \r
-    private JLabel jLabel17 = null;\r
-    private DefaultListModel listModel = new DefaultListModel();\r
     private FpdFileContents ffc = null;\r
     private JPanel jPanel7 = null;\r
     private JCheckBox jCheckBox = null;\r
     private JTextField jTextField3 = null;\r
     private JButton jButton5 = null;\r
-    \r
+    private JLabel jLabel6 = null;\r
+    private JComboBox jComboBox2 = null;\r
     public FpdFlash() {\r
         super();\r
         // TODO Auto-generated constructor stub\r
@@ -309,21 +294,6 @@ public class FpdFlash extends IInternalFrame {
         return jPanelFvImageN;\r
     }\r
 \r
-\r
-    /**\r
-     * This method initializes jPanelFvImageW  \r
-     *         \r
-     * @return javax.swing.JPanel      \r
-     */\r
-    private JPanel getJPanelFvImageW() {\r
-        if (jPanelFvImageW == null) {\r
-            jPanelFvImageW = new JPanel();\r
-            jPanelFvImageW.setPreferredSize(new java.awt.Dimension(10,2));\r
-        }\r
-        return jPanelFvImageW;\r
-    }\r
-\r
-\r
     /**\r
      * This method initializes jPanelFvImageS  \r
      *         \r
@@ -334,7 +304,7 @@ public class FpdFlash extends IInternalFrame {
             GridLayout gridLayout2 = new GridLayout();\r
             gridLayout2.setRows(1);\r
             jPanelFvImageS = new JPanel();\r
-            jPanelFvImageS.setPreferredSize(new java.awt.Dimension(480,200));\r
+            jPanelFvImageS.setPreferredSize(new java.awt.Dimension(480,190));\r
             jPanelFvImageS.setLayout(gridLayout2);\r
             jPanelFvImageS.add(getJScrollPane3(), null);\r
         }\r
@@ -416,6 +386,11 @@ public class FpdFlash extends IInternalFrame {
             jButton.setEnabled(false);\r
             jButton.setText("Add");\r
             jButton.addActionListener(new AbstractAction() {\r
+                /**\r
+                 * \r
+                 */\r
+                private static final long serialVersionUID = 1L;\r
+\r
                 public void actionPerformed(ActionEvent e) {\r
                     if (jTextField.getText().length() > 0 && jTextField1.getText().length() > 0){\r
                         String[] row = {jTextField.getText(), jTextField1.getText()};                        \r
@@ -522,6 +497,11 @@ public class FpdFlash extends IInternalFrame {
             jButton1.setEnabled(false);\r
             jButton1.setText("Delete");\r
             jButton1.addActionListener(new AbstractAction() {\r
+                /**\r
+                 * \r
+                 */\r
+                private static final long serialVersionUID = 1L;\r
+\r
                 public void actionPerformed(ActionEvent e) {\r
                     if (jTable.getSelectedRow() >= 0){\r
                         fvPropertyTableModel.removeRow(jTable.getSelectedRow());\r
@@ -656,6 +636,11 @@ public class FpdFlash extends IInternalFrame {
             jButton2.setEnabled(false);\r
             jButton2.setText("Add");\r
             jButton2.addActionListener(new AbstractAction() {\r
+                /**\r
+                 * \r
+                 */\r
+                private static final long serialVersionUID = 1L;\r
+\r
                 public void actionPerformed(java.awt.event.ActionEvent e) {\r
                     if (jTextField2.getText().length() > 0){\r
                         String[] row = {jTextField2.getText()};                        \r
@@ -711,6 +696,11 @@ public class FpdFlash extends IInternalFrame {
             jButton3.setEnabled(false);\r
             jButton3.setText("Delete");\r
             jButton3.addActionListener(new AbstractAction() {\r
+                /**\r
+                 * \r
+                 */\r
+                private static final long serialVersionUID = 1L;\r
+\r
                 public void actionPerformed(java.awt.event.ActionEvent e) {\r
                     if (jTable1.getSelectedRow() >= 0){\r
                                    \r
@@ -730,11 +720,14 @@ public class FpdFlash extends IInternalFrame {
 \r
  if (jPanel5 == null) {\r
      //ToDo add ButtonGroup for RadioButtons\r
+            jLabel6 = new JLabel();\r
+            jLabel6.setText("EFI Alignment CAP");\r
+            jLabel6.setEnabled(false);\r
             jPanel5 = new JPanel();\r
-            jPanel5.setPreferredSize(new java.awt.Dimension(480,120));\r
+            jPanel5.setPreferredSize(new java.awt.Dimension(480,150));\r
             \r
             GridLayout gridLayout = new GridLayout();\r
-            gridLayout.setRows(5);\r
+            gridLayout.setRows(6);\r
             gridLayout.setColumns(3);\r
             jPanel5.setLayout(gridLayout);\r
             jPanel5.add(getJCheckBox3(), null);\r
@@ -754,8 +747,10 @@ public class FpdFlash extends IInternalFrame {
                        jPanel5.add(getJCheckBox11(), null);\r
                        jPanel5.add(getJCheckBox12(), null);\r
                        jPanel5.add(getJCheckBox13(), null);\r
-            jPanel5.add(getJButton4(), null);\r
                        jPanel5.setBorder(javax.swing.BorderFactory.createEtchedBorder(javax.swing.border.EtchedBorder.LOWERED));\r
+                       jPanel5.add(jLabel6, null);\r
+                       jPanel5.add(getJComboBox2(), null);\r
+                       jPanel5.add(getJButton4(), null);\r
                        jPanel5.add(getJButton6(), null);\r
             \r
             \r
@@ -779,6 +774,11 @@ public class FpdFlash extends IInternalFrame {
 //            jButton4.setEnabled(false);\r
             jButton4.setText("Add FV Image");\r
             jButton4.addActionListener(new AbstractAction() {\r
+                /**\r
+                 * \r
+                 */\r
+                private static final long serialVersionUID = 1L;\r
+\r
                 public void actionPerformed(java.awt.event.ActionEvent e) {\r
                     if (jTable1.getRowCount()== 0){\r
                         return;\r
@@ -795,13 +795,16 @@ public class FpdFlash extends IInternalFrame {
                       \r
                     }\r
                     \r
-                    LinkedHashMap<String, String> m = new LinkedHashMap<String, String>();\r
-                    boolean[] boolArray = {jComboBox1.getSelectedIndex()==0 ? true: false, jCheckBox6.isSelected(), jCheckBox9.isSelected(),\r
+                    LinkedHashMap<String, String> m = null;\r
+                    if (jCheckBox3.isSelected()) {\r
+                        m = new LinkedHashMap<String, String>();\r
+                        boolean[] boolArray = {jComboBox1.getSelectedIndex()==0 ? true: false, jCheckBox6.isSelected(), jCheckBox9.isSelected(),\r
                                                                             jCheckBox11.isSelected(), jCheckBox12.isSelected(),\r
                                                                             jCheckBox13.isSelected(),jCheckBox4.isSelected(),\r
                                                                             jCheckBox5.isSelected(), jCheckBox7.isSelected(),\r
                                                                             jCheckBox8.isSelected(),jCheckBox10.isSelected()};\r
-                    booleanToNameValue(boolArray, m);\r
+                        booleanToNameValue(boolArray, m);\r
+                    }\r
                     ffc.genFvImagesFvImage(imageName.split(" "), jComboBox.getSelectedItem()+"", m);\r
                     \r
                     Object[] o = {imageName, jComboBox.getSelectedItem(), jComboBox1.getSelectedIndex()==0 ? true: false, \r
@@ -856,6 +859,7 @@ public class FpdFlash extends IInternalFrame {
             fvImageParaTableModel.addColumn("WriteDisableCap");\r
             fvImageParaTableModel.addColumn("WriteEnableCap");\r
             fvImageParaTableModel.addColumn("LockCap");\r
+            fvImageParaTableModel.addColumn("Alignment");\r
             \r
             TableColumn typeCol = jTable2.getColumnModel().getColumn(1);\r
             JComboBox cb = new JComboBox();\r
@@ -865,11 +869,26 @@ public class FpdFlash extends IInternalFrame {
             cb.addItem("Components");\r
             typeCol.setCellEditor(new DefaultCellEditor(cb));\r
             \r
-//            TableColumn epCol = jTable2.getColumnModel().getColumn(2);\r
-//            JComboBox cb1 = new JComboBox();\r
-//            cb1.addItem("1");\r
-//            cb1.addItem("0");\r
-//            epCol.setCellEditor(new DefaultCellEditor(cb1));\r
+            TableColumn alignCol = jTable2.getColumnModel().getColumn(13);\r
+            JComboBox cb1 = new JComboBox();\r
+            cb1.addItem("64K");\r
+            cb1.addItem("32K");\r
+            cb1.addItem("16K");\r
+            cb1.addItem("8K");\r
+            cb1.addItem("4K");\r
+            cb1.addItem("2K");\r
+            cb1.addItem("1K");\r
+            cb1.addItem("512");\r
+            cb1.addItem("256");\r
+            cb1.addItem("128");\r
+            cb1.addItem("64");\r
+            cb1.addItem("32");\r
+            cb1.addItem("16");\r
+            cb1.addItem("8");\r
+            cb1.addItem("4");\r
+            cb1.addItem("2");\r
+            alignCol.setCellEditor(new DefaultCellEditor(cb1));\r
+            \r
             jTable2.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);\r
             jTable2.getSelectionModel().addListSelectionListener(new ListSelectionListener(){\r
                 public void valueChanged(ListSelectionEvent e) {\r
@@ -901,6 +920,7 @@ public class FpdFlash extends IInternalFrame {
                         }\r
                         LinkedHashMap<String, String> lhm = new LinkedHashMap<String, String>();\r
                         booleanToNameValue(boolArray, lhm);\r
+                        lhm.put("EFI_ALIGNMENT_CAP", m.getValueAt(row, 13)+"");\r
 \r
                         ffc.updateFvImagesFvImage(row, name.split(" "), type, lhm);\r
                     }\r
@@ -923,6 +943,10 @@ public class FpdFlash extends IInternalFrame {
 //            jButton6.setEnabled(false);\r
             jButton6.setText("Delete Row");\r
             jButton6.addActionListener(new AbstractAction() {\r
+                /**\r
+                 * \r
+                 */\r
+                private static final long serialVersionUID = 1L;\r
 \r
                 public void actionPerformed(ActionEvent arg0) {\r
                     // TODO Auto-generated method stub\r
@@ -970,6 +994,8 @@ public class FpdFlash extends IInternalFrame {
                         jCheckBox11.setEnabled(seleted);\r
                         jCheckBox12.setEnabled(seleted);\r
                         jCheckBox13.setEnabled(seleted);\r
+                        jLabel6.setEnabled(seleted);\r
+                        jComboBox2.setEnabled(seleted);\r
 //                        jButton4.setEnabled(seleted);\r
 //                        jButton6.setEnabled(seleted);\r
                 }\r
@@ -1258,6 +1284,11 @@ public class FpdFlash extends IInternalFrame {
             jButton5.setText("Browse");\r
             jButton5.setPreferredSize(new Dimension(78, 20));\r
             jButton5.addActionListener(new AbstractAction(){\r
+                /**\r
+                 * \r
+                 */\r
+                private static final long serialVersionUID = 1L;\r
+\r
                 public void actionPerformed(ActionEvent e) {\r
                     // TODO Auto-generated method stub\r
                     JFileChooser chooser = new JFileChooser();\r
@@ -1276,6 +1307,36 @@ public class FpdFlash extends IInternalFrame {
         return jButton5;\r
     }\r
 \r
+    /**\r
+     * This method initializes jComboBox2      \r
+     *         \r
+     * @return javax.swing.JComboBox   \r
+     */\r
+    private JComboBox getJComboBox2() {\r
+        if (jComboBox2 == null) {\r
+            jComboBox2 = new JComboBox();\r
+            jComboBox2.setEnabled(false);\r
+            jComboBox2.addItem("64K");\r
+            jComboBox2.addItem("32K");\r
+            jComboBox2.addItem("16K");\r
+            jComboBox2.addItem("8K");\r
+            jComboBox2.addItem("4K");\r
+            jComboBox2.addItem("2K");\r
+            jComboBox2.addItem("1K");\r
+            jComboBox2.addItem("512");\r
+            jComboBox2.addItem("256");\r
+            jComboBox2.addItem("128");\r
+            jComboBox2.addItem("64");\r
+            jComboBox2.addItem("32");\r
+            jComboBox2.addItem("16");\r
+            jComboBox2.addItem("8");\r
+            jComboBox2.addItem("4");\r
+            jComboBox2.addItem("2");\r
+            jComboBox2.setSelectedIndex(0);\r
+        }\r
+        return jComboBox2;\r
+    }\r
+\r
     /**\r
      * @param args\r
      */\r
@@ -1294,6 +1355,19 @@ public class FpdFlash extends IInternalFrame {
         this.setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\r
         this.setContentPane(getJContentPane());\r
         this.setTitle("FPD Flash Definitions");\r
+        this.addInternalFrameListener(new InternalFrameAdapter(){\r
+            public void internalFrameDeactivated(InternalFrameEvent e){\r
+                if (jTable.isEditing()) {\r
+                    jTable.getCellEditor().stopCellEditing();\r
+                }\r
+                if (jTable1.isEditing()) {\r
+                    jTable1.getCellEditor().stopCellEditing();\r
+                }\r
+                if (jTable2.isEditing()) {\r
+                    jTable2.getCellEditor().stopCellEditing();\r
+                }\r
+            }\r
+        });\r
     }\r
 \r
     private void init(FpdFileContents ffc) {\r
@@ -1308,7 +1382,7 @@ public class FpdFlash extends IInternalFrame {
         }\r
         ffc.getFvImagesFvImages(saa, options);\r
         \r
-        Object[] rowData = new Object[13];\r
+        Object[] rowData = new Object[14];\r
         int i = 0;\r
         Boolean f = new Boolean("false");\r
         while (i < saa.length) {\r
@@ -1327,11 +1401,113 @@ public class FpdFlash extends IInternalFrame {
             for (k = 2; k < 13; ++k) {\r
                 rowData[k] = boolArray[k-2];\r
             }\r
+            rowData[13] = getAlign(options.get(i));\r
             fvImageParaTableModel.addRow(rowData);\r
             ++i;\r
         }\r
     }\r
     \r
+    private String getAlign(Map<String, String> m){\r
+        String s = "64K";\r
+        if (m.get("EFI_ALIGNMENT_64K") != null) {\r
+            if (m.get("EFI_ALIGNMENT_64K").equals("TRUE")) {\r
+                s = "64K";\r
+                return s;\r
+            }\r
+        }\r
+        if (m.get("EFI_ALIGNMENT_32K") != null) {\r
+            if (m.get("EFI_ALIGNMENT_32K").equals("TRUE")) {\r
+                s = "32K";\r
+                return s;\r
+            }\r
+        }\r
+        if (m.get("EFI_ALIGNMENT_16K") != null) {\r
+            if (m.get("EFI_ALIGNMENT_16K").equals("TRUE")) {\r
+                s = "16K";\r
+                return s;\r
+            }\r
+        }\r
+        if (m.get("EFI_ALIGNMENT_8K") != null) {\r
+            if (m.get("EFI_ALIGNMENT_8K").equals("TRUE")) {\r
+                s = "8K";\r
+                return s;\r
+            }\r
+        }\r
+        if (m.get("EFI_ALIGNMENT_4K") != null) {\r
+            if (m.get("EFI_ALIGNMENT_4K").equals("TRUE")) {\r
+                s = "4K";\r
+                return s;\r
+            }\r
+        }\r
+        if (m.get("EFI_ALIGNMENT_2K") != null) {\r
+            if (m.get("EFI_ALIGNMENT_2K").equals("TRUE")) {\r
+                s = "2K";\r
+                return s;\r
+            }\r
+        }\r
+        if (m.get("EFI_ALIGNMENT_1K") != null) {\r
+            if (m.get("EFI_ALIGNMENT_1K").equals("TRUE")) {\r
+                s = "1K";\r
+                return s;\r
+            }\r
+        }\r
+        if (m.get("EFI_ALIGNMENT_512") != null) {\r
+            if (m.get("EFI_ALIGNMENT_512").equals("TRUE")) {\r
+                s = "512";\r
+                return s;\r
+            }\r
+        }\r
+        if (m.get("EFI_ALIGNMENT_256") != null) {\r
+            if (m.get("EFI_ALIGNMENT_256").equals("TRUE")) {\r
+                s = "256";\r
+                return s;\r
+            }\r
+        }\r
+        if (m.get("EFI_ALIGNMENT_128") != null) {\r
+            if (m.get("EFI_ALIGNMENT_128").equals("TRUE")) {\r
+                s = "128";\r
+                return s;\r
+            }\r
+        }\r
+        if (m.get("EFI_ALIGNMENT_64") != null) {\r
+            if (m.get("EFI_ALIGNMENT_64").equals("TRUE")) {\r
+                s = "64";\r
+                return s;\r
+            }\r
+        }\r
+        if (m.get("EFI_ALIGNMENT_32") != null) {\r
+            if (m.get("EFI_ALIGNMENT_32").equals("TRUE")) {\r
+                s = "32";\r
+                return s;\r
+            }\r
+        }\r
+        if (m.get("EFI_ALIGNMENT_16") != null) {\r
+            if (m.get("EFI_ALIGNMENT_16").equals("TRUE")) {\r
+                s = "16";\r
+                return s;\r
+            }\r
+        }\r
+        if (m.get("EFI_ALIGNMENT_8") != null) {\r
+            if (m.get("EFI_ALIGNMENT_8").equals("TRUE")) {\r
+                s = "8";\r
+                return s;\r
+            }\r
+        }\r
+        if (m.get("EFI_ALIGNMENT_4") != null) {\r
+            if (m.get("EFI_ALIGNMENT_4").equals("TRUE")) {\r
+                s = "4";\r
+                return s;\r
+            }\r
+        }\r
+        if (m.get("EFI_ALIGNMENT_2") != null) {\r
+            if (m.get("EFI_ALIGNMENT_2").equals("TRUE")) {\r
+                s = "2";\r
+                return s;\r
+            }\r
+        }\r
+        return s;\r
+    }\r
+    \r
     private void namevalueToBoolean(Map<String, String> m, Boolean[] boolArray){\r
         Set<String> key = m.keySet();\r
         Iterator<String> ki= key.iterator();\r
@@ -1464,7 +1640,22 @@ public class FpdFlash extends IInternalFrame {
 \r
 class ImageParaTableModel extends DefaultTableModel {\r
 \r
-    public Class getColumnClass (int c) {\r
-        return getValueAt(0, c).getClass();\r
+    /**\r
+     * \r
+     */\r
+    private static final long serialVersionUID = 1L;\r
+\r
+    public Class<?> getColumnClass (int c) {\r
+        if (getValueAt(0, c) != null) {\r
+            return getValueAt(0, c).getClass();\r
+        }\r
+        return String.class;\r
+    }\r
+    \r
+   public boolean isCellEditable(int row, int col) {\r
+        if (getValueAt(row, 1).equals("ImageName") && col >=1) {\r
+            return false;\r
+        }\r
+        return true;\r
     }\r
 }\r
index f9abe9d01794a36e00af9aab61a2ba8a081038a4..929e1647e0bb9cbb803d6abf542a9b7494ff3d9f 100644 (file)
@@ -5,7 +5,6 @@ import java.awt.BorderLayout;
 import javax.swing.JFrame;\r
 import javax.swing.JOptionPane;\r
 import javax.swing.JPanel;\r
-import javax.swing.JDialog;\r
 import javax.swing.JSplitPane;\r
 import javax.swing.JLabel;\r
 import javax.swing.JScrollPane;\r
@@ -30,6 +29,10 @@ import java.util.Set;
 \r
 public class FpdFrameworkModules extends IInternalFrame {\r
 \r
+    /**\r
+     * \r
+     */\r
+    private static final long serialVersionUID = 1L;\r
     static JFrame frame;\r
     private JSplitPane jSplitPane = null;\r
     private JPanel jPanel = null;\r
@@ -432,6 +435,11 @@ public class FpdFrameworkModules extends IInternalFrame {
 }  //  @jve:decl-index=0:visual-constraint="10,10"\r
 \r
 class NonEditableTableModel extends DefaultTableModel {\r
+    /**\r
+     * \r
+     */\r
+    private static final long serialVersionUID = 1L;\r
+\r
     public boolean isCellEditable(int row, int col) {\r
         return false;\r
     }\r
index dae88584a487f31478fb85a1faa96593e2108a65..d897959aeaf9474daf9f691ef7baa8e814e52e76 100644 (file)
 package org.tianocore.frameworkwizard.platform.ui;\r
 \r
 import java.awt.Dimension;\r
-import java.awt.Rectangle;\r
 import java.awt.event.ActionEvent;\r
 import java.awt.event.ComponentEvent;\r
 import java.awt.event.FocusAdapter;\r
 import java.awt.event.FocusEvent;\r
 \r
 import javax.swing.JButton;\r
-import javax.swing.JComboBox;\r
 import javax.swing.JLabel;\r
 import javax.swing.JPanel;\r
 import javax.swing.JScrollPane;\r
@@ -31,12 +29,9 @@ import javax.swing.JTextArea;
 import javax.swing.JTextField;\r
 \r
 \r
-import org.tianocore.LicenseDocument;\r
 \r
 import org.tianocore.PlatformSurfaceAreaDocument;\r
-import org.tianocore.PlatformHeaderDocument;\r
 \r
-import org.tianocore.frameworkwizard.common.DataType;\r
 import org.tianocore.frameworkwizard.common.DataValidation;\r
 import org.tianocore.frameworkwizard.common.Log;\r
 import org.tianocore.frameworkwizard.common.Tools;\r
@@ -453,6 +448,9 @@ public class FpdHeader extends IInternalFrame {
         if (ffc.getFpdHdrLicense() != null) {\r
             jTextAreaLicense.setText(ffc.getFpdHdrLicense());\r
         }\r
+        if (ffc.getFpdHdrAbs() != null) {\r
+            jTextFieldAbstract.setText(ffc.getFpdHdrAbs());\r
+        }\r
         if (ffc.getFpdHdrUrl() != null) {\r
             jTextField.setText(ffc.getFpdHdrUrl());\r
         }\r
index 5cf0c6dbeada91755661ff018375e74060c515e0..e5a4e885744fb5d10a5346ddfe90d80c783ced9a 100644 (file)
@@ -2,8 +2,6 @@ package org.tianocore.frameworkwizard.platform.ui;
 \r
 import java.awt.BorderLayout;\r
 \r
-import javax.swing.DefaultCellEditor;\r
-import javax.swing.JComboBox;\r
 import javax.swing.JFrame;\r
 import javax.swing.JOptionPane;\r
 import javax.swing.JPanel;\r
@@ -12,7 +10,6 @@ import javax.swing.JTabbedPane;
 import javax.swing.JLabel;\r
 import javax.swing.JScrollPane;\r
 import javax.swing.JTable;\r
-import javax.swing.JTextPane;\r
 import javax.swing.JTextArea;\r
 import javax.swing.JSplitPane;\r
 import javax.swing.JButton;\r
@@ -22,7 +19,6 @@ import javax.swing.event.ListSelectionListener;
 import javax.swing.event.TableModelEvent;\r
 import javax.swing.event.TableModelListener;\r
 import javax.swing.table.DefaultTableModel;\r
-import javax.swing.table.TableColumn;\r
 import javax.swing.table.TableModel;\r
 \r
 import org.apache.xmlbeans.XmlObject;\r
@@ -43,6 +39,10 @@ import java.util.Set;
 \r
 public class FpdModuleSA extends JDialog implements ActionListener {\r
 \r
+    /**\r
+     * \r
+     */\r
+    private static final long serialVersionUID = 1L;\r
     static JFrame frame;\r
     private JPanel jContentPane = null;\r
     private JTabbedPane jTabbedPane = null;\r
@@ -83,11 +83,8 @@ public class FpdModuleSA extends JDialog implements ActionListener {
     private LibraryTableModel model3 = null;\r
     private FpdFileContents ffc = null;\r
     private String moduleKey = null;\r
-//    private int selectedRow = -1;\r
-    private HashMap<String, String> instancePreferMap = null;\r
     private HashMap<String, ArrayList<String>> classInstanceMap = null;\r
     private ArrayList<String> classProduced = null;\r
-//    private ArrayList<String> classConsumed = null;\r
     private HashMap<String, ArrayList<String>> classConsumed = null;\r
     /**\r
      * This is the default constructor\r
@@ -481,7 +478,7 @@ public class FpdModuleSA extends JDialog implements ActionListener {
             jTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);\r
             jTable.getSelectionModel().addListSelectionListener(new ListSelectionListener(){\r
                 public void valueChanged(ListSelectionEvent e) {\r
-                    int selectedRow = -1;\r
+                    \r
                     if (e.getValueIsAdjusting()){\r
                         return;\r
                     }\r
@@ -490,7 +487,7 @@ public class FpdModuleSA extends JDialog implements ActionListener {
                         return;\r
                     }\r
                     else{\r
-                        selectedRow = lsm.getMinSelectionIndex();\r
+//                        int selectedRow = lsm.getMinSelectionIndex();\r
                         \r
                         \r
                     }\r
@@ -970,6 +967,11 @@ public class FpdModuleSA extends JDialog implements ActionListener {
 }  //  @jve:decl-index=0:visual-constraint="10,10"\r
 \r
 class PartialEditableTableModel extends DefaultTableModel {\r
+    /**\r
+     * \r
+     */\r
+    private static final long serialVersionUID = 1L;\r
+\r
     public boolean isCellEditable(int row, int col) {\r
         switch (col){\r
         case 2:\r
@@ -982,6 +984,11 @@ class PartialEditableTableModel extends DefaultTableModel {
 }\r
 \r
 class LibraryTableModel extends DefaultTableModel {\r
+    /**\r
+     * \r
+     */\r
+    private static final long serialVersionUID = 1L;\r
+\r
     public boolean isCellEditable(int row, int col) {\r
         return false;\r
     }\r
index 526caf7da7b3d5c16b9b9c003be50bae26222e27..2133e05464e04f4c6bb151ade443e1acae7d821f 100644 (file)
@@ -15,50 +15,26 @@ package org.tianocore.frameworkwizard.platform.ui;
 import java.awt.BorderLayout;\r
 import javax.swing.JPanel;\r
 \r
-import javax.swing.AbstractAction;\r
-import javax.swing.ButtonGroup;\r
 import javax.swing.DefaultCellEditor;\r
 import javax.swing.DefaultListModel;\r
-import javax.swing.JDialog;\r
-import javax.swing.JFileChooser;\r
 import javax.swing.JFrame;\r
-import javax.swing.JInternalFrame;\r
-import javax.swing.JOptionPane;\r
 import javax.swing.JTabbedPane;\r
 import javax.swing.JButton;\r
-import javax.swing.ListSelectionModel;\r
 \r
 import org.tianocore.PlatformSurfaceAreaDocument;\r
-import org.tianocore.frameworkwizard.common.Tools;\r
 import org.tianocore.frameworkwizard.common.ui.IInternalFrame;\r
-import org.tianocore.frameworkwizard.common.ui.StarLabel;\r
 \r
 \r
 import java.awt.FlowLayout;\r
-import java.awt.event.ActionEvent;\r
-import java.awt.event.ActionListener;\r
-import java.awt.event.ComponentAdapter;\r
-import java.awt.event.ComponentEvent;\r
-import java.awt.event.FocusAdapter;\r
-import java.awt.event.FocusEvent;\r
-import java.awt.event.FocusListener;\r
-import java.awt.event.ItemEvent;\r
-import java.awt.event.ItemListener;\r
-import java.awt.event.ActionEvent;\r
-import java.io.File;\r
-import java.util.ArrayList;\r
-import java.util.Iterator;\r
-import java.util.LinkedHashMap;\r
-import java.util.Map;\r
-import java.util.Set;\r
+\r
 \r
 import javax.swing.JCheckBox;\r
 import javax.swing.JTextField;\r
-import java.awt.GridLayout;\r
 import javax.swing.JLabel;\r
 import javax.swing.JScrollPane;\r
 import javax.swing.JTable;\r
-import javax.swing.JList;\r
+import javax.swing.event.InternalFrameAdapter;\r
+import javax.swing.event.InternalFrameEvent;\r
 import javax.swing.event.ListSelectionEvent;\r
 import javax.swing.event.ListSelectionListener;\r
 import javax.swing.event.TableModelEvent;\r
@@ -74,6 +50,10 @@ import java.awt.CardLayout;
 \r
 public class FpdPlatformDefs extends IInternalFrame {\r
 \r
+    /**\r
+     * \r
+     */\r
+    private static final long serialVersionUID = 1L;\r
     static JFrame frame;\r
     private JPanel jContentPane = null;\r
     private JPanel jPanel = null;\r
@@ -265,6 +245,17 @@ public class FpdPlatformDefs extends IInternalFrame {
         this.setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\r
         this.setContentPane(getJContentPane());\r
         this.setTitle("FPD Platform Definitions");\r
+        this.addInternalFrameListener(new InternalFrameAdapter(){\r
+            public void internalFrameDeactivated(InternalFrameEvent e){\r
+                if (jTable.isEditing()) {\r
+                    jTable.getCellEditor().stopCellEditing();\r
+                }\r
+                if (jTable2.isEditing()) {\r
+                    jTable2.getCellEditor().stopCellEditing();\r
+                }\r
+               \r
+            }\r
+        });\r
     }\r
 \r
     private void init(FpdFileContents ffc) {\r