svn-gvsig-desktop / trunk / org.gvsig.desktop / org.gvsig.desktop.compat.cdc / org.gvsig.fmap.mapcontext / org.gvsig.fmap.mapcontext.api / src / main / java / org / gvsig / raster / lib / legend / api / colortable / ColorTableIO.java @ 44831
History | View | Annotate | Download (1.5 KB)
1 |
package org.gvsig.raster.lib.legend.api.colortable; |
---|---|
2 |
|
3 |
import java.io.File; |
4 |
|
5 |
import org.gvsig.raster.lib.legend.api.exceptions.ColorTableIOException; |
6 |
|
7 |
/**
|
8 |
* Class to read {@link ColorTable} from files and write {@link ColorTable} to
|
9 |
* files.
|
10 |
*
|
11 |
* @author fdiaz
|
12 |
*
|
13 |
*/
|
14 |
public interface ColorTableIO { |
15 |
|
16 |
/**
|
17 |
* @return the name of {@link ColorTableIO}
|
18 |
*/
|
19 |
public String getName(); |
20 |
|
21 |
/**
|
22 |
* @return the description of {@link ColorTableIO}
|
23 |
*/
|
24 |
public String getDescription(); |
25 |
|
26 |
/**
|
27 |
* Reads file to create {@link ColorTable} from it.
|
28 |
*
|
29 |
* @param file
|
30 |
* {@link ColorTable} file.
|
31 |
* @return ColorTable {@link ColorTable} created from file.
|
32 |
* @throws ColorTableIOException
|
33 |
*/
|
34 |
public ColorTable read(File file) throws ColorTableIOException; |
35 |
|
36 |
/**
|
37 |
* Reads file to set information to {@link ColorTable} received as
|
38 |
* parameter.
|
39 |
*
|
40 |
* @param colorTable
|
41 |
* {@link ColorTable} to be filled.
|
42 |
* @param file
|
43 |
* File of new {@link ColorTable}.
|
44 |
* @throws ColorTableIOException
|
45 |
*/
|
46 |
public void read(ColorTable colorTable, File file) throws ColorTableIOException; |
47 |
|
48 |
/**
|
49 |
* Writes {@link ColorTable} to file.
|
50 |
*
|
51 |
* @param colorTable
|
52 |
* {@link ColorTable} to be written
|
53 |
* @param file
|
54 |
* File of {@link ColorTable}
|
55 |
* @throws ColorTableIOException
|
56 |
*/
|
57 |
public void write(ColorTable colorTable, File file) throws ColorTableIOException; |
58 |
|
59 |
} |