Revision 34300 branches/v2_0_0_prep/applications/appgvSIG/src/org/gvsig/app/project/documents/view/legend/gui/VectorialUniqueValue.java

View differences:

VectorialUniqueValue.java
253 253
                auxLegend.addSymbol(null, auxLegend.getDefaultSymbol());
254 254
            }
255 255

  
256
            ColorItem[] colorScheme = cmbColorScheme.getSelectedColors();
256
            Color[] colorScheme = cmbColorScheme.getSelectedColors();
257 257

  
258 258
            Color[] colors = new Color[colorScheme.length];
259 259
			for (int i = 0; i < colorScheme.length; i++) {
260
				colors[i] = colorScheme[i].getColor();
260
				colors[i] = colorScheme[i];
261 261
			}
262 262
			auxLegend.setColorScheme(colors);
263 263

  
......
314 314
										.createSymbol(
315 315
												layer
316 316
										.getShapeType(), colorScheme[rand
317
										.nextInt(colorScheme.length)]
318
										.getColor());
317
										.nextInt(colorScheme.length)]);
319 318
						theSymbol.setDescription(clave.toString());
320 319
						auxLegend.addSymbol(clave, theSymbol);
321 320
						count++;
......
566 565
    private void setColorScheme(){
567 566

  
568 567
		if(auxLegend.getColorScheme() != null) {
569
			ColorItem[] colors = new ColorItem[auxLegend.getColorScheme().length];
570
			for (int i = 0; i < auxLegend.getColorScheme().length; i++) {
571
				colors[i] = new ColorItem();
572
				colors[i].setColor(auxLegend.getColorScheme()[i]);
573
			}
574
			cmbColorScheme.setSelectedColors(colors);
568
			Color[] colorScheme = auxLegend.getColorScheme();
569
//			ColorItem[] colors = new ColorItem[auxLegend.getColorScheme().length];
570
//			for (int i = 0; i < auxLegend.getColorScheme().length; i++) {
571
//				colors[i] = new ColorItem();
572
//				colors[i].setColor(auxLegend.getColorScheme()[i]);
573
//			}
574
			cmbColorScheme.setSelectedColors(colorScheme);
575 575
		}
576 576
	}
577 577

  

Also available in: Unified diff