View Javadoc
1   /*
2    * Created on 2005-maj-21
3    *
4    * TODO To change the template for this generated file go to
5    * Window - Preferences - Java - Code Style - Code Templates
6    */
7   package net.sourceforge.jsh3modtool.gui;
8   
9   import java.io.File;
10  import java.io.FileInputStream;
11  import java.io.IOException;
12  import java.io.InputStream;
13  
14  import net.sourceforge.jsh3modtool.gui.imagetable.ImageModel;
15  
16  
17  public class TestModel implements ImageModel {
18      File filePath;
19  
20      /***
21       * @param filePath
22       */
23      public TestModel(File filePath) {
24          super();
25          this.filePath = filePath;
26      }
27  
28      /*
29       * (non-Javadoc)
30       * 
31       * @see net.sourceforge.jsh3modtool.gui.imagetable.ImageModel#getName()
32       */
33      public String getName() {
34          return filePath.getName();
35      }
36  
37      /*
38       * (non-Javadoc)
39       * 
40       * @see net.sourceforge.jsh3modtool.gui.imagetable.ImageModel#getDescription()
41       */
42      public String getDescription() {
43          // TODO Auto-generated method stub
44          return "long descr";
45      }
46  
47      /*
48       * (non-Javadoc)
49       * 
50       * @see net.sourceforge.jsh3modtool.gui.imagetable.ImageModel#getData()
51       */
52      public InputStream getData() throws IOException {
53          // TODO Auto-generated method stub
54          return new FileInputStream(filePath);
55      }
56  
57  }