Revision 22123 branches/Mobile_Compatible_Hito_1/libFMap_mapcontext/src/org/gvsig/fmap/mapcontext/rendering/symbols/MultiLayerLineSymbol.java

View differences:

MultiLayerLineSymbol.java
317 317

  
318 318
		if (layerIndex < 0 || layers.length < layerIndex)
319 319
			throw new IndexOutOfBoundsException(layerIndex+" < 0 or "+layerIndex+" > "+layers.length);
320
		ArrayList<ISymbol> newLayers = new ArrayList<ISymbol>();
320
		ArrayList newLayers = new ArrayList();
321 321
		for (int i = 0; i < layers.length; i++) {
322 322
			newLayers.add(layers[i]);
323 323
		}
324 324
		try {
325 325
			newLayers.add(layerIndex, newLayer);
326
			layers = newLayers.toArray(new ILineSymbol[0]);
326
			layers = (ILineSymbol[]) newLayers.toArray(new ILineSymbol[0]);
327 327
		} catch (ArrayStoreException asEx) {
328 328
			throw new ClassCastException(newLayer.getClassName()+" is not an ILineSymbol");
329 329
		}
......
333 333

  
334 334
		int capacity = 0;
335 335
		capacity = layers.length;
336
		ArrayList<ILineSymbol> lst = new ArrayList<ILineSymbol>(capacity);
336
		ArrayList lst = new ArrayList(capacity);
337 337
		for (int i = 0; i < capacity; i++) {
338 338
			lst.add(layers[i]);
339 339
		}
340 340
		boolean contains = lst.remove(layer);
341
		layers = lst.toArray(new ILineSymbol[0]);
341
		layers = (ILineSymbol[]) lst.toArray(new ILineSymbol[0]);
342 342
		return contains;
343 343
	}
344 344

  
......
383 383

  
384 384
	}
385 385

  
386
	@Override
386
	
387 387
	public void setUnit(int unitIndex) {
388 388
		super.setUnit(unitIndex);
389 389
		for (int i = 0; i < layers.length; i++) {
......
391 391
		}
392 392
	}
393 393

  
394
	@Override
394

  
395 395
	public void setReferenceSystem(int system) {
396 396
		super.setReferenceSystem(system);
397 397
		for (int i = 0; i < layers.length; i++) {
......
399 399
		}
400 400
	}
401 401

  
402
	@Override
402

  
403 403
	public void setCartographicSize(double cartographicSize, Geometry geom) {
404 404
//		super.setCartographicSize(cartographicSize, shp);
405 405
		setLineWidth(cartographicSize);

Also available in: Unified diff