Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

Source code: com/memoire/bu/BuFileChooser.java


1   /**
2    * @modification $Date: 2002/12/30 19:22:31 $
3    * @statut       unstable
4    * @file         BuFileChooser.java
5    * @version      0.36
6    * @author       Guillaume Desnoix
7    * @email        guillaume@desnoix.com
8    * @license      GNU General Public License 2 (GPL2)
9    * @copyright    1998-2001 Guillaume Desnoix
10   */
11  
12  package com.memoire.bu;
13  
14  import com.memoire.bu.*;
15  import com.memoire.dnd.*;
16  import com.memoire.fu.*;
17  import com.memoire.re.*;
18  
19  
20  import java.awt.*;
21  import java.io.*;
22  import javax.swing.filechooser.*;
23  import javax.swing.*;
24  
25  /**
26   * Similar to JFileChooser but with a size adapted to the screen.
27   */
28  public class BuFileChooser
29         extends JFileChooser
30  {
31    public BuFileChooser()
32    {
33      super();
34      setDialogTitle(BuResource.BU.getString("Fichier"));
35      Dimension e=getToolkit().getScreenSize();
36      setPreferredSize(new Dimension(Math.min(480,e.width-60),
37             Math.max(480,e.height-360)));
38    }
39  
40    /**
41     * @deprecated
42     */
43    public BuFileChooser(File _file)
44    {
45      this();
46      setCurrentDirectory(_file);
47    }
48  
49    /**
50     * @deprecated
51     */
52    public BuFileChooser(String _file)
53    {
54      this(new File(_file));
55    }
56  }