]> git.proxmox.com Git - mirror_edk2.git/blobdiff - Tools/Source/MigrationTools/org/tianocore/migration/FirstPanel.java
modify ui title
[mirror_edk2.git] / Tools / Source / MigrationTools / org / tianocore / migration / FirstPanel.java
index de8e75f14290d504f99118e24f904fda4fa9938f..7241c1b331afd2644bdfe151da0ef0221570e422 100644 (file)
@@ -65,14 +65,15 @@ public final class FirstPanel extends JPanel implements ActionListener, ItemList
                \r
                mibox = new JCheckBox("Print ModuleInfo", false);\r
                mibox.addItemListener(this);\r
-               MigrationTool.printModuleInfo = false;\r
+               ModuleInfo.printModuleInfo = false;\r
                \r
                criticbox = new JCheckBox("Run Critic", true);\r
                criticbox.addItemListener(this);\r
-               MigrationTool.doCritic = true;\r
+               ModuleInfo.doCritic = true;\r
                \r
                defaultpathbox = new JCheckBox("Use Default Output Path", true);\r
                defaultpathbox.addItemListener(this);\r
+               ModuleInfo.defaultoutput = true;\r
                \r
         JPanel modulePanel = new JPanel();\r
         modulePanel.add(moduleButton);\r
@@ -88,7 +89,7 @@ public final class FirstPanel extends JPanel implements ActionListener, ItemList
         cst.gridx = 1;\r
         cst.gridy = 0;\r
         gridbag.setConstraints(criticButton, cst);\r
-        add(criticButton);\r
+        //add(criticButton);\r
         \r
         JPanel checkboxPanel = new JPanel();\r
         checkboxPanel.setLayout(new BoxLayout(checkboxPanel, BoxLayout.Y_AXIS));\r
@@ -114,8 +115,8 @@ public final class FirstPanel extends JPanel implements ActionListener, ItemList
         add(logScrollPane);\r
         \r
                fc = new JFileChooser();\r
-        fc.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES);\r
-       }\r
+        fc.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);\r
+       }\r
        \r
        //---------------------------------------------------------------------------------------//\r
        \r
@@ -157,7 +158,8 @@ public final class FirstPanel extends JPanel implements ActionListener, ItemList
 \r
        //---------------------------------------------------------------------------------------//\r
 \r
-       public String getFilepath() {\r
+       public String getFilepath(String title) {\r
+               fc.setDialogTitle(title);\r
                if (fc.showOpenDialog(this) == JFileChooser.APPROVE_OPTION) {\r
                        log.append(fc.getSelectedFile().getAbsolutePath() + "\n");\r
                        return fc.getSelectedFile().getAbsolutePath();\r
@@ -169,7 +171,8 @@ public final class FirstPanel extends JPanel implements ActionListener, ItemList
 \r
     public void actionPerformed(ActionEvent e) {\r
         if ( e.getSource() == moduleButton ) {\r
-               modulepath = getFilepath();\r
+               modulepath = getFilepath("Please choose a starting path");\r
+               moduletext.setText(modulepath);\r
         }\r
         if ( e.getSource() == goButton ) {\r
                try {\r
@@ -211,23 +214,21 @@ public final class FirstPanel extends JPanel implements ActionListener, ItemList
                }\r
        } else if (e.getSource() == mibox) {\r
                if (e.getStateChange() == ItemEvent.DESELECTED) {\r
-                       MigrationTool.printModuleInfo = false;\r
+                       ModuleInfo.printModuleInfo = false;\r
                } else if (e.getStateChange() == ItemEvent.SELECTED) {\r
-                       MigrationTool.printModuleInfo = true;\r
+                       ModuleInfo.printModuleInfo = true;\r
                }\r
        } else if (e.getSource() == criticbox) {\r
                if (e.getStateChange() == ItemEvent.DESELECTED) {\r
-                       MigrationTool.doCritic = false;\r
-                       System.out.println("criticbox DESELECTED");\r
+                       ModuleInfo.doCritic = false;\r
                } else if (e.getStateChange() == ItemEvent.SELECTED) {\r
-                       MigrationTool.doCritic = true;\r
-                       System.out.println("criticbox SELECTED");\r
+                       ModuleInfo.doCritic = true;\r
                }\r
        } else if (e.getSource() == defaultpathbox) {\r
                if (e.getStateChange() == ItemEvent.DESELECTED) {\r
-                       System.out.println("defaultpathbox DESELECTED");\r
+                       ModuleInfo.defaultoutput = false;\r
                } else if (e.getStateChange() == ItemEvent.SELECTED) {\r
-                       System.out.println("defaultpathbox SELECTED");\r
+                       ModuleInfo.defaultoutput = true;\r
                }\r
        }\r
     }\r