svn-gvsig-desktop / trunk / libraries / libFMap / src / com / iver / cit / gvsig / fmap / rendering / UniqueSymbolLegend.java @ 322
History | View | Annotate | Download (1.06 KB)
1 |
package com.iver.cit.gvsig.fmap.rendering; |
---|---|
2 |
|
3 |
|
4 |
import org.geotools.renderer.style.Style2D; |
5 |
|
6 |
import com.iver.cit.gvsig.fmap.rendering.styling.FStyle2D; |
7 |
|
8 |
|
9 |
|
10 |
public class UniqueSymbolLegend implements VectorialLegend, LegendInfo { |
11 |
|
12 |
private FStyle2D symbol = new FStyle2D(); |
13 |
private int labelField = -1; |
14 |
|
15 |
public UniqueSymbolLegend(Style2D style){
|
16 |
symbol.setStyle2D(style); |
17 |
} |
18 |
|
19 |
/**
|
20 |
* @see com.iver.cit.gvsig.fmap.rendering.Legend#setDefaultSymbol(FStyle2D)
|
21 |
*/
|
22 |
public void setDefaultSymbol(FStyle2D s) { |
23 |
symbol = s; |
24 |
} |
25 |
|
26 |
/**
|
27 |
* @see com.iver.cit.gvsig.fmap.rendering.Legend#getLabelField()
|
28 |
*/
|
29 |
public int getLabelField() { |
30 |
return labelField;
|
31 |
} |
32 |
|
33 |
/**
|
34 |
* @see com.iver.cit.gvsig.fmap.rendering.Legend#setLabelField(int)
|
35 |
*/
|
36 |
public void setLabelField(int fieldIndex) { |
37 |
labelField = fieldIndex; |
38 |
} |
39 |
|
40 |
/**
|
41 |
* @see com.iver.cit.gvsig.fmap.rendering.Legend#getSymbol(int)
|
42 |
*/
|
43 |
public FStyle2D getSymbol(int recordIndex) { |
44 |
return symbol;
|
45 |
} |
46 |
|
47 |
/**
|
48 |
* @see com.iver.cit.gvsig.fmap.rendering.LegendInfo#getSymbol()
|
49 |
*/
|
50 |
public FStyle2D getSymbol() {
|
51 |
return symbol;
|
52 |
} |
53 |
|
54 |
} |