column = sRes + x;
if (hasHiddenColumns)
{
- column = hiddenColumns.adjustForHiddenColumns(column);
+ column = hiddenColumns.visibleToAbsoluteColumn(column);
}
if (column > aaMax)
* {profile type, #values, total count, char1, pct1, char2, pct2...}
*/
ContactListI contacts = viewport.getContactList(_aa, column);
- min = _aa.graphMin;
- max = _aa.graphMax;
if (contacts == null)
{
return;
// cell height to render
double scale = (_aa.graphHeight < contacts.getContactHeight()) ? 1
- : (((double) _aa.graphHeight) / (double) contacts
- .getContactHeight());
+ : ((double) _aa.graphHeight)
+ / (double) contacts.getContactHeight();
int cstart, cend = -1;
for (int ht = y2, eht = y2 - _aa.graphHeight; ht >= eht; ht -= scale)
{
cstart = cend + 1;
- cend = -1
- + (contacts.getContactHeight() * (ht - eht) / _aa.graphHeight);
+ cend = Math.max(cstart + 1, contacts.getContactHeight()
+ * ((ht - y2) / _aa.graphHeight));
// TODO show maximum colour for range - sort of done
// also need a 'getMaxPosForRange(start,end)'
- g.setColor(getColorForRange(contacts, cstart, cend));
+ g.setColor(getColorForRange(min, max, contacts, cstart, cend));
if (scale > 1)
{
Color minColor = Color.white, maxColor = Color.magenta;
- float min, max;
- Color shadeFor(float value)
+ Color shadeFor(float min, float max, float value)
{
return jalview.util.ColorUtils.getGraduatedColour(value, 0, minColor,
max, maxColor);
}
- public Color getColorForRange(ContactListI cl, int i, int j)
+ public Color getColorForRange(float min, float max, ContactListI cl,
+ int i, int j)
{
ContactRange cr = cl.getRangeFor(i, j);
// average for moment - probably more interested in maxIntProj though
- return shadeFor((float) cr.getMean());
+ return shadeFor(min, max, (float) cr.getMean());
}
}