Color colour = ColorUtils.parseColourString(descriptor);
if (colour == null)
{
- throw new IllegalArgumentException("Invalid colour descriptor: "
- + descriptor);
+ throw new IllegalArgumentException(
+ "Invalid colour descriptor: " + descriptor);
}
return new FeatureColour(colour);
}
{
if (!ttype.toLowerCase().startsWith("no"))
{
- System.err.println("Ignoring unrecognised threshold type : "
- + ttype);
+ System.err.println(
+ "Ignoring unrecognised threshold type : " + ttype);
}
}
}
}
if (gcol.hasMoreTokens())
{
- System.err
- .println("Ignoring additional tokens in parameters in graduated colour specification\n");
+ System.err.println(
+ "Ignoring additional tokens in parameters in graduated colour specification\n");
while (gcol.hasMoreTokens())
{
System.err.println("|" + gcol.nextToken());
{
if (isColourByLabel())
{
- return ColorUtils
- .createColourFromName(feature.getDescription());
+ return ColorUtils.createColourFromName(feature.getDescription());
}
if (!isGraduatedColour())
/*
* graduated colour case, optionally with threshold
- * (treating Float.NaN as within visible range here)
+ * Float.NaN is assigned minimum visible score colour
*/
float scr = feature.getScore();
+ if (Float.isNaN(scr))
+ {
+ return getMinColour();
+ }
if (isAboveThreshold() && scr <= threshold)
{
return null;
{
return getMaxColour();
}
- if (Float.isNaN(scr))
- {
- return getMinColour();
- }
float scl = (scr - base) / range;
if (isHighToLow)
{