//NOTE for using the unit and digits values, the field "alternativeColorMapEntryBuilder" must be set to
//TRUE with the method "setalternativeColorMapEntryBuilder()"
//
switch (colorMapType) {
case UNIQUE_VALUES:
element = new SingleColorMapEntryLegendBuilder(
Arrays.asList(cEntry), hAlign, vAlign, backgroundColor, 1.0,
grayChannelName, requestedDimension, labelFont, labelFontColor, extended,
borderColor, unit, digits, alternativeColorMapEntryBuilder);
break;
case RAMP: