Commit | Line | Data |
---|---|---|
c2da4d40 JL |
1 | /*\r |
2 | GNU Lesser General Public License\r | |
3 | \r | |
4 | ImageFileChooser\r | |
5 | Copyright (C) 2000-2002 Frits Jalvingh & Howard Kistler\r | |
6 | \r | |
7 | This library is free software; you can redistribute it and/or\r | |
8 | modify it under the terms of the GNU Lesser General Public\r | |
9 | License as published by the Free Software Foundation; either\r | |
10 | version 2.1 of the License, or (at your option) any later version.\r | |
11 | \r | |
12 | This library is distributed in the hope that it will be useful,\r | |
13 | but WITHOUT ANY WARRANTY; without even the implied warranty of\r | |
14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\r | |
15 | Lesser General Public License for more details.\r | |
16 | \r | |
17 | You should have received a copy of the GNU Lesser General Public\r | |
18 | License along with this library; if not, write to the Free Software\r | |
19 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\r | |
20 | */\r | |
21 | \r | |
22 | package com.hexidec.ekit.component;\r | |
23 | \r | |
24 | import java.io.File;\r | |
25 | import javax.swing.JFileChooser;\r | |
26 | \r | |
27 | /** Class for providing a chooser that lets the user select an image to insert\r | |
28 | */\r | |
29 | public 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 |