package jalview.datamodel;
-import java.awt.Color;
-
/**
* Dummy contact matrix based on sequence distance
*
{
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)
+ if (column < 0 || column >= width)
{
return null;
}
- return new ContactListI() {
+ 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 getColumnWidth()
- {
- return 1;
- }
+ // @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()
{
}
@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;
+ }
+
+ @Override
+ public String getAnnotDescr()
+ {
+ return "Sequence distance matrix";
}
+ @Override
+ public String getAnnotLabel()
+ {
+ return "Sequence Distance";
+ }
}