Revision 264 trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/layers/FLyrVect.java
FLyrVect.java | ||
---|---|---|
6 | 6 |
import java.awt.geom.Rectangle2D; |
7 | 7 |
import java.awt.image.BufferedImage; |
8 | 8 |
import java.util.BitSet; |
9 |
import java.util.HashMap; |
|
10 | 9 |
|
11 | 10 |
import com.iver.cit.gvsig.fmap.ViewPort; |
12 | 11 |
import com.iver.cit.gvsig.fmap.XMLEntity; |
... | ... | |
25 | 24 |
* Colecci?n de leyendas de la capa vectorial. Contendr? tantos elementos como tipos de |
26 | 25 |
* features pueda tener la capa vectorial |
27 | 26 |
*/ |
28 |
private HashMap legends = new HashMap(1);
|
|
27 |
private Legend legend;
|
|
29 | 28 |
|
30 |
public Legend getLegend(int shapeType) { |
|
31 |
Legend l = (Legend) legends.get(new Integer(shapeType)); |
|
32 |
|
|
29 |
public Legend getLegend() { |
|
33 | 30 |
//Leyenda por defecto |
34 |
if (l == null){ |
|
35 |
l = LegendFactory.createUniqueSymbolLegend(LegendFactory.DEFAULT_LINE_SYMBOL); |
|
36 |
legends.put(new Integer(shapeType), l); |
|
31 |
if (legend == null){ |
|
32 |
legend = LegendFactory.createUniqueSymbolLegend(LegendFactory.DEFAULT_LINE_SYMBOL); |
|
37 | 33 |
} |
38 | 34 |
|
39 |
return l; |
|
35 |
return legend;
|
|
40 | 36 |
} |
41 | 37 |
|
42 | 38 |
/** |
... | ... | |
187 | 183 |
/** |
188 | 184 |
* @see com.iver.cit.gvsig.fmap.layers.CommonOperations#setLegend(int, com.iver.cit.gvsig.fmap.rendering.Legend) |
189 | 185 |
*/ |
190 |
public void setLegend(int shapeType, Legend r) { |
|
186 |
public void setLegend(Legend r) { |
|
187 |
legend = r; |
|
191 | 188 |
} |
192 | 189 |
} |
Also available in: Unified diff