}
/*
- * autoScaled == true: colours range over actual score range; autoScaled ==
- * false ('abso'): colours range over min/max range
+ * autoScaled == true: colours range over actual score range;
+ * autoScaled == false ('abso'): colours range over min/max range
*/
- boolean autoScaled = false;
+ boolean autoScaled = true;
String tok = null, minval, maxval;
if (mincol != null)
{
}
tok = gcol.nextToken();
gcol.nextToken(); // skip next '|'
- if (tok.toLowerCase().indexOf("abso") != 0)
+ if (tok.toLowerCase().startsWith("abso"))
{
- minval = tok;
- autoScaled = true;
+ minval = gcol.nextToken();
+ gcol.nextToken(); // skip next '|'
+ autoScaled = false;
}
else
{
- minval = gcol.nextToken();
- gcol.nextToken(); // skip next '|'
+ minval = tok;
}
maxval = gcol.nextToken();
if (gcol.hasMoreTokens())
return graduatedColour;
}
- /**
- * Sets the 'graduated colour' flag. If true, also sets 'colour by label' to
- * false.
- */
- @Override
- public void setGraduatedColour(boolean b)
- {
- graduatedColour = b;
- if (b)
- {
- setColourByLabel(false);
- }
- }
-
@Override
public ColorI getColour()
{
setGraduatedColour(false);
}
}
+
+ /**
+ * Sets the 'graduated colour' flag. If true, also sets 'colour by label' to
+ * false.
+ */
+ void setGraduatedColour(boolean b)
+ {
+ graduatedColour = b;
+ if (b)
+ {
+ setColourByLabel(false);
+ }
+ }
+
@Override
public boolean isBelowThreshold()
{
{
sb.append(Format.getHexString(getMinColour())).append(BAR);
sb.append(Format.getHexString(getMaxColour())).append(BAR);
- if (isAutoScaled())
+ if (!isAutoScaled())
{
sb.append("abso").append(BAR);
}