import jalview.datamodel.AlignmentI;
/**
- * Supplies and updates viewport properties relating to position such as: start
- * and end residues and sequences
+ * Embryonic class which: Supplies and updates viewport properties relating to
+ * position such as: start and end residues and sequences; ideally will serve
+ * hidden columns/rows too
*/
-public class ViewportPositionProps extends ViewportProperties
+public class ViewportRanges extends ViewportProperties
{
// start residue of viewport
private int startRes;
* @param alignment
* the viewport's alignment
*/
- public ViewportPositionProps(AlignmentI alignment)
+ public ViewportRanges(AlignmentI alignment)
{
// initial values of viewport settings
this.startRes = 0;
this.al = alignment;
}
- // ways to update values
-
- // ways to notify of changes
-
- // ways to supply positional information
-
/**
* Get alignment width in cols, including hidden cols
*/
{
res = al.getWidth() - 1;
}
- else if (res < 1)
+ else if (res < 0)
{
- res = 1;
+ res = 0;
}
this.endRes = res;
}
{
seq = al.getHeight() - 1;
}
- else if (seq < 1)
+ else if (seq < 0)
{
- seq = 1;
+ seq = 0;
}
this.endSeq = seq;
}