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