Back to index

wims  3.65+svn20090927
FileChooser.java
Go to the documentation of this file.
00001 /*
00002 $Id: FileChooser.java,v 1.2 2003/02/18 11:48:48 sander Exp $
00003 */
00004 
00005 
00006 package fr.ove.utils;
00007 
00008 import javax.swing.JFileChooser;
00009 import java.awt.Component;
00010 import java.io.File;
00011 
00015 public class FileChooser extends JFileChooser {
00019     private Component compReference = null;
00020     
00024     public FileChooser() {
00025         this(null);
00026     }
00027     
00031     public FileChooser(Component compReference) {
00032         super();
00033         this.compReference = compReference;
00034     }
00035     
00039     public int showOpen() {
00040         return showOpenDialog(compReference);
00041     }
00042     
00046     public int showSave() {
00047         return showSaveDialog(compReference);
00048     }
00049     
00053     public void setCompReference(Component compReference) {
00054         this.compReference = compReference;
00055     }
00056     
00060     public Component getCompReference() {
00061         return compReference;
00062     }
00063 }