Initial revision
[old-projects.git] / ekit / com / hexidec / ekit / component / ImageFileChooser.java
CommitLineData
c2da4d40
JL
1/*\r
2GNU Lesser General Public License\r
3\r
4ImageFileChooser\r
5Copyright (C) 2000-2002 Frits Jalvingh & Howard Kistler\r
6\r
7This library is free software; you can redistribute it and/or\r
8modify it under the terms of the GNU Lesser General Public\r
9License as published by the Free Software Foundation; either\r
10version 2.1 of the License, or (at your option) any later version.\r
11\r
12This library is distributed in the hope that it will be useful,\r
13but WITHOUT ANY WARRANTY; without even the implied warranty of\r
14MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\r
15Lesser General Public License for more details.\r
16\r
17You should have received a copy of the GNU Lesser General Public\r
18License along with this library; if not, write to the Free Software\r
19Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\r
20*/\r
21\r
22package com.hexidec.ekit.component;\r
23\r
24import java.io.File;\r
25import javax.swing.JFileChooser;\r
26\r
27/** Class for providing a chooser that lets the user select an image to insert\r
28 */\r
29public class ImageFileChooser extends JFileChooser\r
30{\r
31 /** Constructor that takes a default directory to start in, specified as a File\r
32 * @param File with the default path\r
33 */\r
34 public ImageFileChooser(File fileCurrentDirectory)\r
35 {\r
36 this.setCurrentDirectory(fileCurrentDirectory);\r
37 this.setAccessory(new ImageFileChooserPreview(this));\r
38 }\r
39\r
40 /** Constructor that takes a default directory to start in, specified as a String\r
41 * @param String current directory path.\r
42 */\r
43 public ImageFileChooser(String strCurrentPath)\r
44 {\r
45 this(new File(strCurrentPath));\r
46 }\r
47\r
48 /** Empty constructor\r
49 */\r
50 public ImageFileChooser()\r
51 {\r
52 this((File)null);\r
53 }\r
54}\r