Revision 22123 branches/Mobile_Compatible_Hito_1/libFMap_mapcontext/src/org/gvsig/fmap/mapcontext/rendering/legend/VectorialUniqueValueLegend.java

View differences:

VectorialUniqueValueLegend.java
72 72
	protected int fieldId;
73 73
//	protected DataSource dataSource;
74 74
	protected FeatureStore featureStore;
75
	private TreeMap<Object, ISymbol> symbols = new TreeMap<Object, ISymbol>(
76
			new Comparator<Object>() {
75
	private TreeMap symbols = new TreeMap(
76
			new Comparator() {
77 77
		public int compare(Object o1, Object o2) {
78 78
			if ((o1 != null) && (o2 != null)) {
79 79
				Object v2 = (Object) o2;
......
137 137
    }
138 138

  
139 139
    public void setValueSymbolByID(int id, ISymbol symbol) {
140
        ISymbol old = symbols.put(keys.get(id), symbol);
140
        ISymbol old = (ISymbol) symbols.put(keys.get(id), symbol);
141 141
        fireClassifiedSymbolChangeEvent(new SymbolLegendEvent(old, symbol));
142 142
    }
143 143

  
......
159 159

  
160 160
    public void addSymbol(Object key, ISymbol symbol) {
161 161
        ISymbol resul;
162
        resul = symbols.put(key, symbol);
162
        resul = (ISymbol) symbols.put(key, symbol);
163 163

  
164 164
        if (resul != null) {
165 165
        	log.error("Error: la clave " + key +
......
180 180

  
181 181
    public void clear() {
182 182
        keys.clear();
183
        ISymbol[] olds = symbols.values().toArray(new ISymbol[0]);
183
        ISymbol[] olds = (ISymbol[]) symbols.values().toArray(new ISymbol[0]);
184 184
        symbols.clear();
185 185
        removeLegendListener(getZSort());
186 186
        setZSort(null);
......
199 199
    }
200 200

  
201 201
     public ISymbol[] getSymbols() {
202
        return symbols.values().toArray(new ISymbol[0]);
202
        return (ISymbol[]) symbols.values().toArray(new ISymbol[0]);
203 203
    }
204 204

  
205 205
    public void setClassifyingFieldNames(String[] fNames) {
......
246 246

  
247 247
    	NullUniqueValue nuv=new NullUniqueValue();
248 248
    	if (symbols.containsKey(nuv))
249
    		return symbols.get(nuv);
249
    		return (ISymbol) symbols.get(nuv);
250 250

  
251 251
    	if(defaultSymbol==null) {
252 252
    		defaultSymbol = SymbologyFactory.createDefaultSymbolByShapeType(shapeType);
......
519 519
     * @see com.iver.cit.gvsig.fmap.rendering.UniqueValueLegend#getSymbolByValue(com.hardcode.gdbms.engine.values.Value)
520 520
     */
521 521
    public ISymbol getSymbolByValue(Object key) {
522
    	ISymbol symbol = symbols.get(key);
522
    	ISymbol symbol = (ISymbol) symbols.get(key);
523 523
    	if (symbol!=null) {
524 524
    		return symbol;
525 525
    	} else if (useDefaultSymbol) {
......
550 550

  
551 551
        fireClassifiedSymbolChangeEvent(
552 552
        		new SymbolLegendEvent(
553
        				symbols.remove(key),
553
        				(ISymbol) symbols.remove(key),
554 554
        				null));
555 555
    }
556 556

  
......
565 565
				Object key = it.next();
566 566
				if (symbols.get(key).equals(oldSymbol)) {
567 567
					fireClassifiedSymbolChangeEvent(new SymbolLegendEvent(
568
							symbols.put(key, newSymbol), newSymbol));
568
							(ISymbol) symbols.put(key, newSymbol), newSymbol));
569 569
				}
570 570

  
571 571
			}

Also available in: Unified diff