Statistics
| Revision:

svn-gvsig-desktop / trunk / prototypes / mobile / desktop / extensions / extExportMobile / src / es / prodevelop / gvsig / exportMobile / ui / panels / Chooser.java @ 19124

History | View | Annotate | Download (798 Bytes)

1
package es.prodevelop.gvsig.exportMobile.ui.panels;
2

    
3
import java.awt.Component;
4
import java.io.File;
5
import javax.swing.JFileChooser;
6
import com.iver.andami.PluginServices;
7

    
8

    
9
/**
10
 * Choose the output directory to export the new files
11
 * @author Anabel Moreno
12
 *
13
 */
14
public class Chooser {
15

    
16
        public File dirOutPut;
17

    
18
        public String nameDirOut;
19

    
20
        public Chooser() {
21

    
22
                JFileChooser jfc = new JFileChooser();
23

    
24
                /* to choose only directories files */
25
                jfc.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
26

    
27
                if (jfc.showOpenDialog((Component) PluginServices.getMainFrame()) == JFileChooser.APPROVE_OPTION) {
28

    
29
                        dirOutPut = jfc.getSelectedFile();
30
                        nameDirOut = dirOutPut.getAbsolutePath();
31

    
32
                }
33
        }
34

    
35
        public String getNameDir() {
36

    
37
                return nameDirOut;
38
        }
39
}