gvsig-raster / org.gvsig.raster / branches / org.gvsig.raster.2.4 / org.gvsig.raster / org.gvsig.raster.lib / org.gvsig.raster.lib.legend / org.gvsig.raster.lib.legend.api / src / main / java / org / gvsig / raster / lib / legend / api / colortable / ColorTable.java @ 6899
History | View | Annotate | Download (2.52 KB)
1 |
package org.gvsig.raster.lib.legend.api.colortable; |
---|---|
2 |
|
3 |
import java.util.List; |
4 |
|
5 |
import org.gvsig.tools.lang.Cloneable; |
6 |
import org.gvsig.tools.persistence.Persistent; |
7 |
|
8 |
/**
|
9 |
* @author fdiaz
|
10 |
*
|
11 |
*/
|
12 |
public interface ColorTable extends Persistent, Cloneable { |
13 |
|
14 |
/**
|
15 |
* Compress {@link ColorTable} to reduce number of {@link ColorTableClass}.
|
16 |
*/
|
17 |
public void compressPalette(); |
18 |
|
19 |
/**
|
20 |
* Copies from {@link ColorTable} received as parameter
|
21 |
*
|
22 |
* @param colorTable
|
23 |
* {@link ColorTable} to be copied
|
24 |
*/
|
25 |
public void copyFrom(ColorTable colorTable); |
26 |
|
27 |
/**
|
28 |
* @return {@link ColorTableClass} of this {@link ColorTable}
|
29 |
*/
|
30 |
public List<ColorTableClass> getClasses(); |
31 |
|
32 |
/**
|
33 |
* @return Gets the name of this {@link ColorTable}
|
34 |
*/
|
35 |
public String getName(); |
36 |
|
37 |
/**
|
38 |
* @return Return if {@link ColorTable} has alpha
|
39 |
*/
|
40 |
public boolean hasAlpha(); |
41 |
|
42 |
/**
|
43 |
* @return Gets if this {@link ColorTable} is interpolated
|
44 |
*/
|
45 |
public boolean isInterpolated(); |
46 |
|
47 |
/**
|
48 |
* Remove duplicated values of {@link ColorTableClass}
|
49 |
*/
|
50 |
public void removeDuplicatedValues(); |
51 |
|
52 |
/**
|
53 |
* Sets {@link ColorTableClass} of this {@link ColorTable} and recalculates
|
54 |
* palette color of this {@link ColorTable}.
|
55 |
*
|
56 |
* @param colorTableClasses
|
57 |
* New classes of this {@link ColorTable}
|
58 |
* @param compress
|
59 |
* True to compress palette color.
|
60 |
*/
|
61 |
public void setClasses(List<ColorTableClass> colorTableClasses, boolean compress); |
62 |
|
63 |
/**
|
64 |
* Calculates and sets {@link ColorTableClass} of this {@link ColorTable}
|
65 |
* take into account min and max value. Palette color is recalculated with
|
66 |
* new color table classes.
|
67 |
*
|
68 |
* @param min
|
69 |
* Minimum value of {@link ColorTableClass}
|
70 |
* @param max
|
71 |
* Maximum value of {@link ColorTableClass}
|
72 |
* @param compress
|
73 |
* True to compress {@link ColorTable}.
|
74 |
*/
|
75 |
public void setClasses(double min, double max, boolean compress); |
76 |
|
77 |
/**
|
78 |
* Sets interpolated to this {@link ColorTable}
|
79 |
*
|
80 |
* @param interpolated
|
81 |
*/
|
82 |
public void setInterpolated(boolean interpolated); |
83 |
|
84 |
/**
|
85 |
* Sets name of this {@link ColorTable}
|
86 |
*
|
87 |
* @param name
|
88 |
*/
|
89 |
public void setName(String name); |
90 |
|
91 |
/**
|
92 |
* Get RGBA values defined by {@link ColorTableClass}
|
93 |
*
|
94 |
* @param value
|
95 |
* Value to get RGBA
|
96 |
* @return Byte array with RGBA values
|
97 |
*/
|
98 |
byte[] getRGBA(Object value); |
99 |
} |