Revision 31071
branches/v2_0_0_prep/extensions/extEditing/src/org/gvsig/editing/fmap/rendering/EditionManagerLegend.java | ||
---|---|---|
6 | 6 |
import org.gvsig.fmap.geom.Geometry; |
7 | 7 |
import org.gvsig.fmap.mapcontext.rendering.legend.IVectorLegend; |
8 | 8 |
import org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol; |
9 |
import org.gvsig.symbology.fmap.mapcontext.rendering.legend.IClassifiedLegend; |
|
9 | 10 |
import org.gvsig.symbology.fmap.mapcontext.rendering.legend.IVectorialUniqueValueLegend; |
10 |
import org.gvsig.symbology.fmap.mapcontext.rendering.legend.impl.VectorialIntervalLegend; |
|
11 |
import org.gvsig.symbology.fmap.mapcontext.rendering.legend.impl.VectorialUniqueValueLegend; |
|
12 | 11 |
|
13 | 12 |
public class EditionManagerLegend implements EditionLegend{ |
14 | 13 |
private ArrayList rules=new ArrayList(); |
... | ... | |
22 | 21 |
} |
23 | 22 |
public Object getValue(int i) { |
24 | 23 |
Object value=null; |
25 |
if (vectorialLegend instanceof VectorialUniqueValueLegend) { |
|
26 |
value=((VectorialUniqueValueLegend)vectorialLegend).getValues()[i]; |
|
27 |
}else if (vectorialLegend instanceof VectorialIntervalLegend) { |
|
28 |
value=((VectorialIntervalLegend)vectorialLegend).getValues()[i]; |
|
24 |
if (vectorialLegend instanceof IClassifiedLegend) { |
|
25 |
value = ((IClassifiedLegend) vectorialLegend).getValues()[i]; |
|
29 | 26 |
}else { |
30 | 27 |
value=new String(PluginServices.getText(this,"todos_los_valores")); |
31 | 28 |
} |
... | ... | |
70 | 67 |
lc.setPresent(i); |
71 | 68 |
} |
72 | 69 |
public int getRowCount() { |
73 |
if (vectorialLegend instanceof VectorialUniqueValueLegend || vectorialLegend instanceof VectorialIntervalLegend) { |
|
74 |
VectorialUniqueValueLegend vuvl=(VectorialUniqueValueLegend)vectorialLegend; |
|
75 |
return vuvl.getValues().length; |
|
70 |
if (vectorialLegend instanceof IClassifiedLegend) { |
|
71 |
IClassifiedLegend classifiedLegend = |
|
72 |
(IClassifiedLegend) vectorialLegend; |
|
73 |
return classifiedLegend.getValues().length; |
|
76 | 74 |
} |
77 | 75 |
return 1; |
78 | 76 |
} |
Also available in: Unified diff