]> 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 b933dac0ea79d6506a98b197573d237980214aac..7241c1b331afd2644bdfe151da0ef0221570e422 100644 (file)
@@ -73,6 +73,7 @@ public final class FirstPanel extends JPanel implements ActionListener, ItemList
                \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
@@ -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
@@ -218,16 +221,14 @@ public final class FirstPanel extends JPanel implements ActionListener, ItemList
        } else if (e.getSource() == criticbox) {\r
                if (e.getStateChange() == ItemEvent.DESELECTED) {\r
                        ModuleInfo.doCritic = false;\r
-                       System.out.println("criticbox DESELECTED");\r
                } else if (e.getStateChange() == ItemEvent.SELECTED) {\r
                        ModuleInfo.doCritic = true;\r
-                       System.out.println("criticbox SELECTED");\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