/**
* Create an OverviewDimensions object
*
- * @param props
+ * @param ranges
* positional properties of the viewport
* @param showAnnotationPanel
* true if the annotation panel is to be shown, false otherwise
*/
- public OverviewDimensions(ViewportPositionProps props,
+ public OverviewDimensions(ViewportRanges ranges,
boolean showAnnotationPanel)
{
// scale the initial size of overviewpanel to shape of alignment
- float initialScale = (float) props.getAbsoluteAlignmentWidth()
- / (float) props.getAbsoluteAlignmentHeight();
+ float initialScale = (float) ranges.getAbsoluteAlignmentWidth()
+ / (float) ranges.getAbsoluteAlignmentHeight();
if (!showAnnotationPanel)
{
graphHeight = 0;
}
- if (props.getAbsoluteAlignmentWidth() > props
+ if (ranges.getAbsoluteAlignmentWidth() > ranges
.getAbsoluteAlignmentHeight())
{
// wider
* hidden sequences
* @param hiddenCols
* hidden columns
- * @param props
+ * @param ranges
* viewport position properties
*/
public void updateViewportFromMouse(int mousex, int mousey,
HiddenSequences hiddenSeqs, ColumnSelection hiddenCols,
- ViewportPositionProps props)
+ ViewportRanges ranges)
{
int x = mousex;
int y = mousey;
- int alwidth = props.getAbsoluteAlignmentWidth();
- int alheight = props.getAbsoluteAlignmentHeight();
+ int alwidth = ranges.getAbsoluteAlignmentWidth();
+ int alheight = ranges.getAbsoluteAlignmentHeight();
if (x < 0)
{
int xAsRes = Math.round((float) x * alwidth / width);
// get viewport width in residues
- int vpwidth = props.getEndRes() - props.getStartRes() + 1;
+ int vpwidth = ranges.getEndRes() - ranges.getStartRes() + 1;
// get where x should be when accounting for hidden cols
// if x is in a hidden col region, shift to left - but we still need
// get viewport height in sequences
// add 1 because height includes both endSeq and startSeq
- int vpheight = props.getEndSeq() - props.getStartSeq() + 1;
+ int vpheight = ranges.getEndSeq() - ranges.getStartSeq() + 1;
// get where y should be when accounting for hidden rows
// if y is in a hidden row region, shift up - but we still need absolute
* hidden sequences
* @param hiddenCols
* hidden columns
- * @param props
+ * @param ranges
* viewport position properties
*/
public void setBoxPosition(HiddenSequences hiddenSeqs,
- ColumnSelection hiddenCols, ViewportPositionProps props)
+ ColumnSelection hiddenCols, ViewportRanges ranges)
{
- int alwidth = props.getAbsoluteAlignmentWidth();
- int alheight = props.getAbsoluteAlignmentHeight();
+ int alwidth = ranges.getAbsoluteAlignmentWidth();
+ int alheight = ranges.getAbsoluteAlignmentHeight();
// work with absolute values of startRes and endRes
- int startRes = hiddenCols.adjustForHiddenColumns(props.getStartRes());
- int endRes = hiddenCols.adjustForHiddenColumns(props.getEndRes());
+ int startRes = hiddenCols.adjustForHiddenColumns(ranges.getStartRes());
+ int endRes = hiddenCols.adjustForHiddenColumns(ranges.getEndRes());
// work with absolute values of startSeq and endSeq
- int startSeq = hiddenSeqs.adjustForHiddenSeqs(props.getStartSeq());
- int endSeq = hiddenSeqs.adjustForHiddenSeqs(props.getEndSeq());
+ int startSeq = hiddenSeqs.adjustForHiddenSeqs(ranges.getStartSeq());
+ int endSeq = hiddenSeqs.adjustForHiddenSeqs(ranges.getEndSeq());
// boxX, boxY is the x,y location equivalent to startRes, startSeq
boxX = Math.round((float) startRes * width / alwidth);