package jalview.datamodel;
+import java.awt.Color;
+
+import jalview.renderer.ContactGeometry.contactInterval;
+
/**
* helper class to compute min/max/mean for a range on a contact list
*
@Override
public ContactRange getRangeFor(int from_column, int to_column)
{
+ // TODO: consider caching ContactRange for a particular call ?
if (clist instanceof ContactListI)
{
// clist may implement getRangeFor in a more efficient way, so use theirs
{
from_column = 0;
}
- if (to_column > getContactHeight())
+ if (to_column >= getContactHeight())
{
- to_column = getContactHeight();
+ to_column = getContactHeight()-1;
}
ContactRange cr = new ContactRange();
cr.setFrom_column(from_column);
return cr;
}
+ @Override
+ public int[] getMappedPositionsFor(int cStart, int cEnd)
+ {
+ return clist.getMappedPositionsFor(cStart, cEnd);
+ }
+
+ @Override
+ public Color getColourForGroup()
+ {
+ return clist.getColourForGroup();
+ }
}