String[] labels=new String[ranges.size()+1];
labels[0]="";
// ******************** SCALE ****************************
for (Iterator iterator = ranges.iterator(); iterator.hasNext();) {
RangeBlocks range = (RangeBlocks) iterator.next();
Integer index=patternRangeIndex.get(range.getPattern());
Color color=range.getColor();
if(color!=null){
//Paint colorTransparent=new Color(color.getRed(), color.getGreen(), color.getBlue(), 50);
Paint colorTransparent=null;
if(addTransparency==true){
colorTransparent=new Color(color.getRed(), color.getGreen(), color.getBlue(),50);
}
else{
colorTransparent=new Color(color.getRed(), color.getGreen(), color.getBlue());
}
paintScale.add(index+0.5, colorTransparent);
}
//String insertLabel=" "+range.getLabel();
String insertLabel=range.getLabel();
labels[index+1]=insertLabel;
}
renderer.setPaintScale(paintScale);