- g.fillRect(x * charWidth, ht, charWidth, 1 + (int) scale);
- } else {
- g.drawLine(x * charWidth, ht, (x + 1) * charWidth, ht);
+ rowsel = cgeom.intersects(ci, columnSelection, hiddenColumns,
+ maskHiddenCols);
+ }
+ // TODO: show selected region
+ if (colsel || rowsel)
+ {
+
+ col = getSelectedColorForRange(min, max, contacts, ci.cStart,
+ ci.cEnd);
+ if (colsel && rowsel)
+ {
+ col = new Color(col.getBlue(), col.getGreen(), col.getRed());
+ }
+ else
+ {
+ col = new Color(col.getBlue(), col.getBlue(), col.getBlue());
+ }
+ }
+ else
+ {
+ col = getColorForRange(min, max, contacts, ci.cStart, ci.cEnd);
+ }
+ if (containsHidden)
+ {
+ col = shade.hidden;
+ }
+ if (showGroups && gpcol != null && gpcol != Color.white)
+ {
+ // todo - could overlay group as a transparent rectangle ?
+ col = new Color(
+ (int) (((float) (col.getRed() + gpcol.getRed())) / 2f),
+ (int) (((float) (col.getGreen() + gpcol.getGreen()))
+ / 2f),
+ (int) (((float) (col.getBlue() + gpcol.getBlue())) / 2f));
+ }
+ g.setColor(col);
+ if (cgeom.pixels_step > 1)
+ {
+ g.fillRect(x * charWidth, botY+ht, charWidth, cgeom.pixels_step);
+ }
+ else
+ {
+ g.drawLine(x * charWidth, botY+ht, (x + 1) * charWidth, botY+ht);