package jalview.datamodel; /** * Dummy contact matrix based on sequence distance * * @author jprocter * */ public class SeqDistanceContactMatrix implements ContactMatrixI { private int width = 0; public SeqDistanceContactMatrix(int width) { this.width = width; } @Override public float getMin() { return 0f; } @Override public float getMax() { return width; } @Override public ContactListI getContactList(final int column) { if (column < 0 || column >= width) { return null; } return new ContactListImpl(new ContactListProviderI() { int p = column; // @Override // public Color getColorForScore(int column) // { // return jalview.util.ColorUtils.getGraduatedColour(Math.abs(column-p), // 0, Color.white, width, Color.magenta); // } // @Override // public Color getColorForRange(int from_column, int to_column) // { // return jalview.util.ColorUtils.getGraduatedColour( // Math.abs(to_column + from_column - 2 * p) / 2, 0, Color.white, width, // Color.magenta); // } @Override public int getContactHeight() { return width; } @Override public int getPosition() { return p; } @Override public double getContactAt(int column) { return Math.abs(column - p); } }); } @Override public boolean hasReferenceSeq() { // TODO Auto-generated method stub return false; } @Override public SequenceI getReferenceSeq() { // TODO Auto-generated method stub return null; } }