Source code: medi/plugin/AbstractPreviewer.java
1 /*
2 * AbstractPreviewer.java
3 *
4 * Created on 16 luglio 2002, 19.07
5 Medi - A media archiver. Archives media files for easy management.
6 Copyright (C) 2002-2003 Antonio Petrelli
7
8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 2 of the License, or
11 (at your option) any later version.
12
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21
22 Contact me at: brenmcguire@users.sourceforge.net
23 */
24
25 package medi.plugin;
26
27 import medi.db.AbstractProvider;
28 import javatools.db.*;
29
30 /** It is an abstract class used as a base for file-type-specific previewers.
31 * @author Antonio Petrelli
32 * @version 0.3.1
33 */
34 public abstract class AbstractPreviewer extends MediPlugin {
35
36 /** Creates new AbstractPreviewer */
37 public AbstractPreviewer() {
38 prv = null;
39 extensions = null;
40 }
41
42 /** Returns the managed extensions.
43 * @return The managed extension.
44 */
45 public String[] getExtensions() {
46 return extensions;
47 }
48
49 /** Returns the preview component.
50 * @param filePath The file path to preview.
51 * @throws DbException If something goes wrong.
52 * @return The preview component to show.
53 */
54 public abstract java.awt.Component preview(String filePath) throws DbException;
55
56 public String getPluginType() {
57 return "AbstractPreviewer";
58 }
59
60 /** The managed extensions.
61 */
62 protected String[] extensions;
63 }