draft UI implementation of module orders in FV.
[mirror_edk2.git] / Tools / Source / FrameworkWizard / src / org / tianocore / frameworkwizard / platform / ui / FpdFlash.java
index a326f5e2caf62b959c4fad211a61c2c7ac445f58..3b07c696b265588866a7a38cb3f11ca029a550bd 100644 (file)
@@ -17,7 +17,6 @@ import javax.swing.JPanel;
 \r
 import javax.swing.AbstractAction;\r
 import javax.swing.DefaultCellEditor;\r
-import javax.swing.JComponent;\r
 import javax.swing.JFileChooser;\r
 import javax.swing.JFrame;\r
 import javax.swing.JOptionPane;\r
@@ -26,15 +25,16 @@ import javax.swing.JButton;
 import javax.swing.ListSelectionModel;\r
 \r
 import org.tianocore.PlatformSurfaceAreaDocument;\r
+import org.tianocore.frameworkwizard.common.GlobalData;\r
 import org.tianocore.frameworkwizard.common.Identifications.OpeningPlatformType;\r
 import org.tianocore.frameworkwizard.common.ui.IInternalFrame;\r
 import org.tianocore.frameworkwizard.common.ui.StarLabel;\r
-\r
+import org.tianocore.frameworkwizard.module.Identifications.ModuleIdentification;\r
+import org.tianocore.frameworkwizard.platform.ui.FpdFrameworkModules;\r
+import org.tianocore.frameworkwizard.platform.ui.global.WorkspaceProfile;\r
 \r
 import java.awt.FlowLayout;\r
 import java.awt.event.ActionEvent;\r
-import java.awt.event.ComponentAdapter;\r
-import java.awt.event.ComponentEvent;\r
 import java.awt.event.ItemEvent;\r
 import java.awt.event.ItemListener;\r
 import java.io.BufferedReader;\r
@@ -129,7 +129,6 @@ public class FpdFlash extends IInternalFrame {
     private JScrollPane jScrollPane = null;\r
     private JTable jTableFvImageOpts = null;\r
     private JButton jButtonUpdateFvImage = null;\r
-    private JButton jButtonTest = null;\r
     private JPanel jPanelFdfN = null;\r
     private JPanel jPanelFdfS = null;\r
     private JSplitPane jSplitPaneFdfC = null;\r
@@ -153,259 +152,6 @@ public class FpdFlash extends IInternalFrame {
     private JButton jButtonDelFv = null;\r
     private JButton jButtonAddFvOptions = null;\r
     \r
-    private NonEditableTableModel nonEditableTableModel = null;  //  @jve:decl-index=0:visual-constraint=""\r
-    \r
-    private JPanel jPanelModOrder = null;\r
-    private JPanel jPanelModOrderN = null;\r
-    private JPanel jPanelModOrderS = null;\r
-    private JPanel jPanelModOrderC = null;\r
-    private JScrollPane jScrollPaneModInFv = null;\r
-    private JTable jTableModInFv = null;\r
-    private JPanel jPanelController = null;\r
-    private JScrollPane jScrollPaneFpdModules = null;\r
-    private JTable jTableFpdModules = null;\r
-    private JButton jButtonUp = null;\r
-    private JButton jButtonInsert = null;\r
-    private JButton jButtonRemove = null;\r
-    private JButton jButtonDown = null;\r
-    private JButton jButtonOk = null;\r
-    private JButton jButtonCancel = null;\r
-    \r
-    /**\r
-     * This method initializes jPanelModOrder   \r
-     *  \r
-     * @return javax.swing.JPanel   \r
-     */\r
-    private JPanel getJPanelModOrder() {\r
-//        if (jPanelModOrder == null) {\r
-            jPanelModOrder = new JPanel();\r
-            jPanelModOrder.setLayout(new BorderLayout());\r
-            jPanelModOrder.add(getJPanelModOrderN(), java.awt.BorderLayout.NORTH);\r
-            jPanelModOrder.add(getJPanelModOrderS(), java.awt.BorderLayout.SOUTH);\r
-            jPanelModOrder.add(getJPanelModOrderC(), java.awt.BorderLayout.CENTER);\r
-            jPanelModOrder.addComponentListener(new java.awt.event.ComponentAdapter() {\r
-                public void componentShown(java.awt.event.ComponentEvent e) {\r
-                    System.out.println("componentShown()" + jTabbedPane.getTitleAt(jTabbedPane.getSelectedIndex())); // TODO Auto-generated Event stub componentShown()\r
-                }\r
-            });\r
-//        }\r
-        return jPanelModOrder;\r
-    }\r
-\r
-    /**\r
-     * This method initializes jPanelModOrderN  \r
-     *  \r
-     * @return javax.swing.JPanel   \r
-     */\r
-    private JPanel getJPanelModOrderN() {\r
-//        if (jPanelModOrderN == null) {\r
-            jPanelModOrderN = new JPanel();\r
-//        }\r
-        return jPanelModOrderN;\r
-    }\r
-\r
-    /**\r
-     * This method initializes jPanelModOrderS  \r
-     *  \r
-     * @return javax.swing.JPanel   \r
-     */\r
-    private JPanel getJPanelModOrderS() {\r
-//        if (jPanelModOrderS == null) {\r
-            FlowLayout flowLayout6 = new FlowLayout();\r
-            flowLayout6.setAlignment(java.awt.FlowLayout.RIGHT);\r
-            jPanelModOrderS = new JPanel();\r
-            jPanelModOrderS.setLayout(flowLayout6);\r
-            jPanelModOrderS.add(getJButtonOk(), null);\r
-            jPanelModOrderS.add(getJButtonCancel(), null);\r
-//        }\r
-        return jPanelModOrderS;\r
-    }\r
-\r
-    /**\r
-     * This method initializes jPanelModOrderC  \r
-     *  \r
-     * @return javax.swing.JPanel   \r
-     */\r
-    private JPanel getJPanelModOrderC() {\r
-//        if (jPanelModOrderC == null) {\r
-            jPanelModOrderC = new JPanel();\r
-            jPanelModOrderC.add(getJScrollPaneModInFv(), null);\r
-            jPanelModOrderC.add(getJPanelController(), null);\r
-            jPanelModOrderC.add(getJScrollPaneFpdModules(), null);\r
-//        }\r
-        return jPanelModOrderC;\r
-    }\r
-\r
-    /**\r
-     * This method initializes jScrollPaneModInFv   \r
-     *  \r
-     * @return javax.swing.JScrollPane  \r
-     */\r
-    private JScrollPane getJScrollPaneModInFv() {\r
-//        if (jScrollPaneModInFv == null) {\r
-            jScrollPaneModInFv = new JScrollPane();\r
-            jScrollPaneModInFv.setPreferredSize(new java.awt.Dimension(150,500));\r
-            jScrollPaneModInFv.setViewportView(getJTableModInFv());\r
-//        }\r
-        return jScrollPaneModInFv;\r
-    }\r
-\r
-    /**\r
-     * This method initializes jTableModInFv    \r
-     *  \r
-     * @return javax.swing.JTable   \r
-     */\r
-    private JTable getJTableModInFv() {\r
-//        if (jTableModInFv == null) {\r
-            NonEditableTableModel modInFvTableModel = new NonEditableTableModel();\r
-            modInFvTableModel.addColumn("Module Orders in FV");\r
-            jTableModInFv = new JTable(modInFvTableModel);\r
-            jTableModInFv.setRowHeight(20);\r
-//        }\r
-        return jTableModInFv;\r
-    }\r
-\r
-    /**\r
-     * This method initializes jPanelController \r
-     *  \r
-     * @return javax.swing.JPanel   \r
-     */\r
-    private JPanel getJPanelController() {\r
-//        if (jPanelController == null) {\r
-            FlowLayout flowLayout5 = new FlowLayout();\r
-            flowLayout5.setVgap(50);\r
-            flowLayout5.setHgap(50);\r
-            jPanelController = new JPanel();\r
-            jPanelController.setLayout(flowLayout5);\r
-            jPanelController.setPreferredSize(new java.awt.Dimension(150,500));\r
-            jPanelController.add(getJButtonUp(), null);\r
-            jPanelController.add(getJButtonInsert(), null);\r
-            jPanelController.add(getJButtonRemove(), null);\r
-            jPanelController.add(getJButtonDown(), null);\r
-//        }\r
-        return jPanelController;\r
-    }\r
-\r
-    /**\r
-     * This method initializes jScrollPaneFpdModules    \r
-     *  \r
-     * @return javax.swing.JScrollPane  \r
-     */\r
-    private JScrollPane getJScrollPaneFpdModules() {\r
-//        if (jScrollPaneFpdModules == null) {\r
-            jScrollPaneFpdModules = new JScrollPane();\r
-            jScrollPaneFpdModules.setPreferredSize(new java.awt.Dimension(150,500));\r
-            jScrollPaneFpdModules.setViewportView(getJTableFpdModules());\r
-//        }\r
-        return jScrollPaneFpdModules;\r
-    }\r
-\r
-    /**\r
-     * This method initializes jTableFpdModules \r
-     *  \r
-     * @return javax.swing.JTable   \r
-     */\r
-    private JTable getJTableFpdModules() {\r
-//        if (jTableFpdModules == null) {\r
-            NonEditableTableModel fpdModTableModel = new NonEditableTableModel();\r
-            fpdModTableModel.addColumn("Modules in Platform");\r
-            jTableFpdModules = new JTable(fpdModTableModel);\r
-            jTableFpdModules.setRowHeight(20);\r
-//        }\r
-        return jTableFpdModules;\r
-    }\r
-\r
-    /**\r
-     * This method initializes jButtonUp    \r
-     *  \r
-     * @return javax.swing.JButton  \r
-     */\r
-    private JButton getJButtonUp() {\r
-//        if (jButtonUp == null) {\r
-            jButtonUp = new JButton();\r
-            jButtonUp.setPreferredSize(new java.awt.Dimension(60,20));\r
-            jButtonUp.setFont(new java.awt.Font("Dialog", java.awt.Font.BOLD, 14));\r
-            jButtonUp.setText("^");\r
-//        }\r
-        return jButtonUp;\r
-    }\r
-\r
-    /**\r
-     * This method initializes jButtonInsert    \r
-     *  \r
-     * @return javax.swing.JButton  \r
-     */\r
-    private JButton getJButtonInsert() {\r
-//        if (jButtonInsert == null) {\r
-            jButtonInsert = new JButton();\r
-            jButtonInsert.setText("<<");\r
-            jButtonInsert.setPreferredSize(new java.awt.Dimension(60,20));\r
-//        }\r
-        return jButtonInsert;\r
-    }\r
-\r
-    /**\r
-     * This method initializes jButtonRemove    \r
-     *  \r
-     * @return javax.swing.JButton  \r
-     */\r
-    private JButton getJButtonRemove() {\r
-//        if (jButtonRemove == null) {\r
-            jButtonRemove = new JButton();\r
-            jButtonRemove.setPreferredSize(new java.awt.Dimension(60,20));\r
-            jButtonRemove.setText(">>");\r
-//        }\r
-        return jButtonRemove;\r
-    }\r
-\r
-    /**\r
-     * This method initializes jButtonDown  \r
-     *  \r
-     * @return javax.swing.JButton  \r
-     */\r
-    private JButton getJButtonDown() {\r
-//        if (jButtonDown == null) {\r
-            jButtonDown = new JButton();\r
-            jButtonDown.setPreferredSize(new java.awt.Dimension(60,20));\r
-            jButtonDown.setFont(new java.awt.Font("Dialog", java.awt.Font.BOLD, 10));\r
-            jButtonDown.setText("v");\r
-//        }\r
-        return jButtonDown;\r
-    }\r
-    \r
-    /**\r
-     * This method initializes jButtonOk    \r
-     *  \r
-     * @return javax.swing.JButton  \r
-     */\r
-    private JButton getJButtonOk() {\r
-//        if (jButtonOk == null) {\r
-            jButtonOk = new JButton();\r
-            jButtonOk.setPreferredSize(new java.awt.Dimension(80,20));\r
-            jButtonOk.setText("Ok");\r
-//        }\r
-        return jButtonOk;\r
-    }\r
-\r
-    /**\r
-     * This method initializes jButtonCancel    \r
-     *  \r
-     * @return javax.swing.JButton  \r
-     */\r
-    private JButton getJButtonCancel() {\r
-//        if (jButtonCancel == null) {\r
-            jButtonCancel = new JButton();\r
-            jButtonCancel.setPreferredSize(new java.awt.Dimension(80,20));\r
-            jButtonCancel.setText("Cancel");\r
-            jButtonCancel.addActionListener(new java.awt.event.ActionListener() {\r
-                public void actionPerformed(java.awt.event.ActionEvent e) {\r
-                    getJTabbedPane().setSelectedIndex(0);\r
-                }\r
-            });\r
-//        }\r
-        return jButtonCancel;\r
-    }\r
-\r
     \r
     public FpdFlash() {\r
         super();\r
@@ -489,7 +235,7 @@ public class FpdFlash extends IInternalFrame {
         if (jTabbedPane == null) {\r
             jTabbedPane = new JTabbedPane();\r
             jTabbedPane.addTab("General", null, getJPanelFdf(), null);\r
-            jTabbedPane.addTab("FV Parameters", null, getJPanelFvImages(), null);\r
+            jTabbedPane.addTab("Advanced", null, getJPanelFvImages(), null);\r
             \r
         }\r
         return jTabbedPane;\r
@@ -1093,7 +839,7 @@ public class FpdFlash extends IInternalFrame {
             \r
             TableColumn typeCol = jTableFvInfo.getColumnModel().getColumn(1);\r
             JComboBox cb = new JComboBox();\r
-            cb.addItem("ValidImageNames");\r
+            cb.addItem("ImageName");\r
             cb.addItem("Attributes");\r
             cb.addItem("Options");\r
             cb.addItem("Components");\r
@@ -1111,6 +857,14 @@ public class FpdFlash extends IInternalFrame {
                     }\r
                     else{\r
                         int selectedRow = lsm.getMinSelectionIndex();\r
+                        if (fvImageParaTableModel.getValueAt(selectedRow, 1).equals("ImageName")) {\r
+                            String[] fvNames = fvImageParaTableModel.getValueAt(selectedRow, 0).toString().split(" ");\r
+                            for (int i = 0; i < fvNames.length; ++i) {\r
+                                String[] row = {fvNames[i]};\r
+                                fvImageNameTableModel.addRow(row);\r
+                            }\r
+                            return;\r
+                        }\r
                         LinkedHashMap<String, String> optionMap = new LinkedHashMap<String, String>();\r
                         ffc.getFvImagesFvImageOptions(selectedRow, optionMap);\r
                         if (optionMap.size() > 0){\r
@@ -1187,13 +941,6 @@ public class FpdFlash extends IInternalFrame {
                             return;\r
                         }\r
                         \r
-//                        jLabel5.setEnabled(selected);\r
-//                        jTextField4.setEnabled(selected);\r
-//                        jLabel6.setEnabled(selected);\r
-//                        jTextField5.setEnabled(selected);\r
-//                        jButton7.setEnabled(selected);\r
-//                        jButton8.setEnabled(selected);\r
-\r
                 }\r
                 \r
             });\r
@@ -1523,11 +1270,6 @@ public class FpdFlash extends IInternalFrame {
         return jButtonUpdateFvImage;\r
     }\r
 \r
-    /**\r
-     * This method initializes jButtonTest     \r
-     *         \r
-     * @return javax.swing.JButton     \r
-     */\r
 //    private JButton getJButtonTest() {\r
 //        if (jButtonTest == null) {\r
 //            jButtonTest = new JButton();\r
@@ -1757,11 +1499,9 @@ public class FpdFlash extends IInternalFrame {
             jButtonFvInFdfOptions.addActionListener(new java.awt.event.ActionListener() {\r
                 public void actionPerformed(java.awt.event.ActionEvent e) {\r
                     int selectedRow = jTableFvInFdf.getSelectedRow();\r
-                    if (selectedRow <= 0) {\r
+                    if (selectedRow < 0) {\r
                         return;\r
                     }\r
-                    fvInFdfTableModel.moveRow(selectedRow, selectedRow, selectedRow - 1);\r
-                    jTableFvInFdf.changeSelection(selectedRow - 1, 0, false, false);\r
                 }\r
             });\r
         }\r
@@ -1853,21 +1593,6 @@ public class FpdFlash extends IInternalFrame {
         }\r
         return jButtonAddFvOptions;\r
     }\r
-\r
-    \r
-\r
-    /**\r
-     * This method initializes nonEditableTableModel   \r
-     *         \r
-     * @return org.tianocore.frameworkwizard.platform.ui.NonEditableTableModel \r
-     */\r
-    private NonEditableTableModel getNonEditableTableModel() {\r
-        if (nonEditableTableModel == null) {\r
-            nonEditableTableModel = new NonEditableTableModel();\r
-        }\r
-        return nonEditableTableModel;\r
-    }\r
-\r
     \r
     /**\r
      * @param args\r
@@ -1941,7 +1666,7 @@ public class FpdFlash extends IInternalFrame {
 \r
         for (int k = 0; k < vFvInfo.size(); ++k) {\r
             FvInfoFromFdf fvInfo = vFvInfo.get(k);\r
-            getJTabbedPane().addTab(fvInfo.getFvName(), null, getJPanelModOrder(), null);\r
+            getJTabbedPane().addTab(fvInfo.getFvName(), null, new ModuleOrderPane(), null);\r
 \r
         }\r
     }\r
@@ -2079,7 +1804,397 @@ public class FpdFlash extends IInternalFrame {
 \r
     }\r
         \r
-    \r
+    private class ModuleOrderPane extends JPanel {\r
+\r
+        /**\r
+         * \r
+         */\r
+        private static final long serialVersionUID = 1L;\r
+        private JPanel jPanelModOrderN = null;\r
+        private JPanel jPanelModOrderS = null;\r
+        private JPanel jPanelModOrderC = null;\r
+        private JScrollPane jScrollPaneModInFv = null;\r
+        private JTable jTableModInFv = null;\r
+        private JPanel jPanelController = null;\r
+        private JScrollPane jScrollPaneFpdModules = null;\r
+        private JTable jTableFpdModules = null;\r
+        private JButton jButtonUp = null;\r
+        private JButton jButtonInsert = null;\r
+        private JButton jButtonRemove = null;\r
+        private JButton jButtonDown = null;\r
+        private JButton jButtonOk = null;\r
+        private JButton jButtonCancel = null;\r
+        private NonEditableTableModel modInFvTableModel = null;\r
+        private NonEditableTableModel fpdModTableModel = null;\r
+        \r
+        public ModuleOrderPane() {\r
+            super(new BorderLayout());\r
+            add(getJPanelModOrderN(), java.awt.BorderLayout.NORTH);\r
+            add(getJPanelModOrderS(), java.awt.BorderLayout.SOUTH);\r
+            add(getJPanelModOrderC(), java.awt.BorderLayout.CENTER);\r
+            addComponentListener(new java.awt.event.ComponentAdapter() {\r
+                public void componentShown(java.awt.event.ComponentEvent e) {\r
+                    String title = jTabbedPane.getTitleAt(jTabbedPane.getSelectedIndex()); // TODO Auto-generated Event stub componentShown()\r
+                    showModulesInFv(title);\r
+                    showAllModulesInPlatform();\r
+                }\r
+            });\r
+        }\r
+        \r
+        private void showModulesInFv(String fvName) {\r
+            int size = ffc.getUserExtsIncModCount(fvName);\r
+            \r
+            if (size != -1) {\r
+                String[][] saa = new String[size][2];\r
+                ffc.getUserExtsIncMods(fvName, saa);\r
+\r
+                for (int i = 0; i < size; ++i) {\r
+                    String name = getModuleName(saa[i][0]);\r
+                    String[] row = { name };\r
+                    modInFvTableModel.addRow(row);\r
+                }\r
+            }\r
+            //\r
+            // From ModuleSAs, get module guids with FvBinding = fvName.\r
+            //\r
+            Vector<String> vGuid = new Vector<String>();\r
+            ffc.getFrameworkModuleGuid(fvName, vGuid);\r
+            //\r
+            // If BuildOptions->UserExtensions already contain these module info,\r
+            // no need to add them into table again.\r
+            //\r
+            Iterator<String> iter = vGuid.iterator();\r
+            while (iter.hasNext()){\r
+                String guid = iter.next();\r
+                String moduleName = getModuleName(guid);\r
+                if (existedInTable(moduleName, modInFvTableModel)) {\r
+                    vGuid.remove(guid);\r
+                }\r
+            }\r
+            \r
+            for (int j = 0; j < vGuid.size(); ++j) {\r
+                String[] row = {getModuleName(vGuid.get(j))};\r
+                modInFvTableModel.addRow(row);\r
+            }\r
+        }\r
+        \r
+        private void showAllModulesInPlatform() {\r
+            int size = ffc.getFrameworkModulesCount();\r
+            String[][] saa = new String[size][5];\r
+            ffc.getFrameworkModulesInfo(saa);\r
+            \r
+            for (int i = 0; i < size; ++i) {\r
+                String name = getModuleName(saa[i][0]);\r
+                if (existedInTable(name, modInFvTableModel) || existedInTable(name, fpdModTableModel)) {\r
+                    continue;\r
+                }\r
+                String[] row = {name};\r
+                fpdModTableModel.addRow(row);\r
+            }\r
+            \r
+            TableSorter sorter = (TableSorter)jTableFpdModules.getModel();\r
+            sorter.setSortState(0, TableSorter.ASCENDING);\r
+        }\r
+        \r
+        private String getModuleName (String guid) {\r
+            \r
+            for (int i = 0; i < GlobalData.vModuleList.size(); ++i) {\r
+                String mg = GlobalData.vModuleList.get(i).getGuid();\r
+                if (mg == null) {\r
+                    continue;\r
+                }\r
+                if (mg.equalsIgnoreCase(guid)) {\r
+                    return GlobalData.vModuleList.get(i).getName();\r
+                }\r
+            }\r
+            \r
+            return "";\r
+        }\r
+        \r
+        private boolean existedInTable (String name, DefaultTableModel model) {\r
+            int size = model.getDataVector().size();\r
+            for (int i = 0; i < size; ++i) {\r
+                if (((Vector)model.getDataVector().elementAt(i)).contains(name)) {\r
+                    return true;\r
+                }\r
+            }\r
+            return false;\r
+        }\r
+        \r
+        /**\r
+         * This method initializes jPanelModOrderN  \r
+         *  \r
+         * @return javax.swing.JPanel   \r
+         */\r
+        private JPanel getJPanelModOrderN() {\r
+            if (jPanelModOrderN == null) {\r
+                jPanelModOrderN = new JPanel();\r
+            }\r
+            return jPanelModOrderN;\r
+        }\r
+\r
+        /**\r
+         * This method initializes jPanelModOrderS  \r
+         *  \r
+         * @return javax.swing.JPanel   \r
+         */\r
+        private JPanel getJPanelModOrderS() {\r
+            if (jPanelModOrderS == null) {\r
+                FlowLayout flowLayout6 = new FlowLayout();\r
+                flowLayout6.setAlignment(java.awt.FlowLayout.RIGHT);\r
+                jPanelModOrderS = new JPanel();\r
+                jPanelModOrderS.setLayout(flowLayout6);\r
+                jPanelModOrderS.add(getJButtonOk(), null);\r
+                jPanelModOrderS.add(getJButtonCancel(), null);\r
+            }\r
+            return jPanelModOrderS;\r
+        }\r
+\r
+        /**\r
+         * This method initializes jPanelModOrderC  \r
+         *  \r
+         * @return javax.swing.JPanel   \r
+         */\r
+        private JPanel getJPanelModOrderC() {\r
+            if (jPanelModOrderC == null) {\r
+                jPanelModOrderC = new JPanel();\r
+                jPanelModOrderC.add(getJScrollPaneModInFv(), null);\r
+                jPanelModOrderC.add(getJPanelController(), null);\r
+                jPanelModOrderC.add(getJScrollPaneFpdModules(), null);\r
+            }\r
+            return jPanelModOrderC;\r
+        }\r
+\r
+        /**\r
+         * This method initializes jScrollPaneModInFv   \r
+         *  \r
+         * @return javax.swing.JScrollPane  \r
+         */\r
+        private JScrollPane getJScrollPaneModInFv() {\r
+            if (jScrollPaneModInFv == null) {\r
+                jScrollPaneModInFv = new JScrollPane();\r
+                jScrollPaneModInFv.setPreferredSize(new java.awt.Dimension(200,500));\r
+                jScrollPaneModInFv.setViewportView(getJTableModInFv());\r
+            }\r
+            return jScrollPaneModInFv;\r
+        }\r
+\r
+        /**\r
+         * This method initializes jTableModInFv    \r
+         *  \r
+         * @return javax.swing.JTable   \r
+         */\r
+        private JTable getJTableModInFv() {\r
+            if (jTableModInFv == null) {\r
+                modInFvTableModel = new NonEditableTableModel();\r
+                modInFvTableModel.addColumn("Module Orders in FV");\r
+                jTableModInFv = new JTable(modInFvTableModel);\r
+                jTableModInFv.setRowHeight(20);\r
+                jTableModInFv.setShowGrid(false);\r
+            }\r
+            return jTableModInFv;\r
+        }\r
+\r
+        /**\r
+         * This method initializes jPanelController \r
+         *  \r
+         * @return javax.swing.JPanel   \r
+         */\r
+        private JPanel getJPanelController() {\r
+            if (jPanelController == null) {\r
+                FlowLayout flowLayout5 = new FlowLayout();\r
+                flowLayout5.setVgap(50);\r
+                flowLayout5.setHgap(50);\r
+                jPanelController = new JPanel();\r
+                jPanelController.setLayout(flowLayout5);\r
+                jPanelController.setPreferredSize(new java.awt.Dimension(150,500));\r
+                jPanelController.add(getJButtonUp(), null);\r
+                jPanelController.add(getJButtonInsert(), null);\r
+                jPanelController.add(getJButtonRemove(), null);\r
+                jPanelController.add(getJButtonDown(), null);\r
+            }\r
+            return jPanelController;\r
+        }\r
+\r
+        /**\r
+         * This method initializes jScrollPaneFpdModules    \r
+         *  \r
+         * @return javax.swing.JScrollPane  \r
+         */\r
+        private JScrollPane getJScrollPaneFpdModules() {\r
+            if (jScrollPaneFpdModules == null) {\r
+                jScrollPaneFpdModules = new JScrollPane();\r
+                jScrollPaneFpdModules.setPreferredSize(new java.awt.Dimension(200,500));\r
+                jScrollPaneFpdModules.setViewportView(getJTableFpdModules());\r
+            }\r
+            return jScrollPaneFpdModules;\r
+        }\r
+\r
+        /**\r
+         * This method initializes jTableFpdModules \r
+         *  \r
+         * @return javax.swing.JTable   \r
+         */\r
+        private JTable getJTableFpdModules() {\r
+            if (jTableFpdModules == null) {\r
+                fpdModTableModel = new NonEditableTableModel();\r
+                TableSorter sorter = new TableSorter(fpdModTableModel);\r
+                jTableFpdModules = new JTable(sorter);\r
+                jTableFpdModules.setRowHeight(20);\r
+                jTableFpdModules.setShowGrid(false);\r
+                fpdModTableModel.addColumn("Modules in Platform");\r
+            }\r
+            return jTableFpdModules;\r
+        }\r
+\r
+        /**\r
+         * This method initializes jButtonUp    \r
+         *  \r
+         * @return javax.swing.JButton  \r
+         */\r
+        private JButton getJButtonUp() {\r
+            if (jButtonUp == null) {\r
+                jButtonUp = new JButton();\r
+                jButtonUp.setPreferredSize(new java.awt.Dimension(60,20));\r
+                jButtonUp.setFont(new java.awt.Font("Dialog", java.awt.Font.BOLD, 14));\r
+                jButtonUp.setText("^");\r
+                jButtonUp.addActionListener(new java.awt.event.ActionListener() {\r
+                    public void actionPerformed(java.awt.event.ActionEvent e) {\r
+                        int selectedRow = jTableModInFv.getSelectedRow();\r
+                        if (selectedRow <= 0) {\r
+                            return;\r
+                        }\r
+                        modInFvTableModel.moveRow(selectedRow, selectedRow, selectedRow - 1);\r
+                        jTableModInFv.changeSelection(selectedRow - 1, 0, false, false);\r
+                    }\r
+                });\r
+            }\r
+            return jButtonUp;\r
+        }\r
+\r
+        /**\r
+         * This method initializes jButtonInsert    \r
+         *  \r
+         * @return javax.swing.JButton  \r
+         */\r
+        private JButton getJButtonInsert() {\r
+            if (jButtonInsert == null) {\r
+                jButtonInsert = new JButton();\r
+                jButtonInsert.setText("<<");\r
+                jButtonInsert.setPreferredSize(new java.awt.Dimension(60,20));\r
+                jButtonInsert.addActionListener(new java.awt.event.ActionListener() {\r
+                    public void actionPerformed(java.awt.event.ActionEvent e) {\r
+                        int selectedRowRight = jTableFpdModules.getSelectedRow();\r
+                        if (selectedRowRight < 0) {\r
+                            return;\r
+                        }\r
+                        \r
+                        int rowInModel = ((TableSorter)jTableFpdModules.getModel()).getModelRowIndex(selectedRowRight);\r
+                        \r
+                        String[] row = {jTableFpdModules.getValueAt(selectedRowRight, 0)+""};\r
+                        int selectedRowLeft = jTableModInFv.getSelectedRow();\r
+                        if (selectedRowLeft < 0) {\r
+                            modInFvTableModel.addRow(row);\r
+                            jTableModInFv.changeSelection(jTableModInFv.getRowCount() - 1, 0, false, false);\r
+                            fpdModTableModel.removeRow(rowInModel);\r
+                        }\r
+                        else {\r
+                            modInFvTableModel.insertRow(selectedRowLeft, row);\r
+                            jTableModInFv.changeSelection(selectedRowLeft, 0, false, false);\r
+                        }\r
+                    }\r
+                });\r
+            }\r
+            return jButtonInsert;\r
+        }\r
+\r
+        /**\r
+         * This method initializes jButtonRemove    \r
+         *  \r
+         * @return javax.swing.JButton  \r
+         */\r
+        private JButton getJButtonRemove() {\r
+            if (jButtonRemove == null) {\r
+                jButtonRemove = new JButton();\r
+                jButtonRemove.setPreferredSize(new java.awt.Dimension(60,20));\r
+                jButtonRemove.setText(">>");\r
+                jButtonRemove.addActionListener(new java.awt.event.ActionListener() {\r
+                    public void actionPerformed(java.awt.event.ActionEvent e) {\r
+                        int selectedRowLeft = jTableModInFv.getSelectedRow();\r
+                        if (selectedRowLeft < 0) {\r
+                            return;\r
+                        }\r
+                        \r
+                        String[] row = {jTableModInFv.getValueAt(selectedRowLeft, 0)+""};\r
+                        fpdModTableModel.addRow(row);\r
+                        int viewIndex = ((TableSorter) jTableFpdModules.getModel()).getViewIndexArray()[jTableFpdModules\r
+                                                                                                                        .getRowCount() - 1];\r
+                        jTableFpdModules.changeSelection(viewIndex, 0, false, false);\r
+                        modInFvTableModel.removeRow(selectedRowLeft);\r
+                    }\r
+                });\r
+            }\r
+            return jButtonRemove;\r
+        }\r
+\r
+        /**\r
+         * This method initializes jButtonDown  \r
+         *  \r
+         * @return javax.swing.JButton  \r
+         */\r
+        private JButton getJButtonDown() {\r
+            if (jButtonDown == null) {\r
+                jButtonDown = new JButton();\r
+                jButtonDown.setPreferredSize(new java.awt.Dimension(60,20));\r
+                jButtonDown.setFont(new java.awt.Font("Dialog", java.awt.Font.BOLD, 10));\r
+                jButtonDown.setText("v");\r
+                jButtonDown.addActionListener(new java.awt.event.ActionListener() {\r
+                    public void actionPerformed(java.awt.event.ActionEvent e) {\r
+                        int selectedRow = jTableModInFv.getSelectedRow();\r
+                        if (selectedRow >= jTableModInFv.getRowCount() - 1) {\r
+                            return;\r
+                        }\r
+                        modInFvTableModel.moveRow(selectedRow, selectedRow, selectedRow + 1);\r
+                        jTableModInFv.changeSelection(selectedRow + 1, 0, false, false);\r
+                    }\r
+                });\r
+            }\r
+            return jButtonDown;\r
+        }\r
+        \r
+        /**\r
+         * This method initializes jButtonOk    \r
+         *  \r
+         * @return javax.swing.JButton  \r
+         */\r
+        private JButton getJButtonOk() {\r
+            if (jButtonOk == null) {\r
+                jButtonOk = new JButton();\r
+                jButtonOk.setPreferredSize(new java.awt.Dimension(80,20));\r
+                jButtonOk.setText("Ok");\r
+            }\r
+            return jButtonOk;\r
+        }\r
+\r
+        /**\r
+         * This method initializes jButtonCancel    \r
+         *  \r
+         * @return javax.swing.JButton  \r
+         */\r
+        private JButton getJButtonCancel() {\r
+            if (jButtonCancel == null) {\r
+                jButtonCancel = new JButton();\r
+                jButtonCancel.setPreferredSize(new java.awt.Dimension(80,20));\r
+                jButtonCancel.setText("Cancel");\r
+                jButtonCancel.addActionListener(new java.awt.event.ActionListener() {\r
+                    public void actionPerformed(java.awt.event.ActionEvent e) {\r
+                        jTabbedPane.setSelectedIndex(0);\r
+                    }\r
+                });\r
+            }\r
+            return jButtonCancel;\r
+        }\r
+    }\r
 \r
 }  //  @jve:decl-index=0:visual-constraint="10,10"\r
 \r