+/*
+ * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
+ * Copyright (C) $$Year-Rel$$ The Jalview Authors
+ *
+ * This file is part of Jalview.
+ *
+ * Jalview is free software: you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation, either version 3
+ * of the License, or (at your option) any later version.
+ *
+ * Jalview is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty
+ * of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE. See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Jalview. If not, see <http://www.gnu.org/licenses/>.
+ * The Jalview Authors are detailed in the 'AUTHORS' file.
+ */
package jalview.renderer;
import java.util.Arrays;
* number of contacts for each pixel_step - to last whole contact
*/
final double contacts_step;
-
+
final int lastStep;
/**
* Bean used to map from a range of contacts to a range of pixels
+ *
* @param contacts
- * @param graphHeight Number of pixels to map given range of contacts
+ * @param graphHeight
+ * Number of pixels to map given range of contacts
*/
public ContactGeometry(final ContactListI contacts, int graphHeight)
{
pixels_step = (int) Math
.ceil(((double) graphHeight) / (double) contact_height);
}
- contacts_step = pixels_step*contacts_per_pixel;
- lastStep = (int) Math.min((double)graphHeight, ((double)graphHeight)/((double)pixels_step));
+ contacts_step = pixels_step * contacts_per_pixel;
+ lastStep = (int) Math.min((double) graphHeight,
+ ((double) graphHeight) / ((double) pixels_step));
}
public class contactInterval
return cStart == them.cStart && cEnd == them.cEnd && pEnd == them.pEnd
&& pStart == them.pStart;
}
+
@Override
public String toString()
{
- return "Contacts ["+cStart+","+cEnd+"] : Pixels ["+pStart+","+pEnd+"]";
+ return "Contacts [" + cStart + "," + cEnd + "] : Pixels [" + pStart
+ + "," + pEnd + "]";
}
}
{
// TODO: turn into function on hiddenColumns and create test !!
Iterator<int[]> viscont = hiddenColumns.getVisContigsIterator(
- -1+mappedRange[p], -1+mappedRange[p + 1], false);
+ -1 + mappedRange[p], -1 + mappedRange[p + 1], false);
containsHidden = !viscont.hasNext();
if (!containsHidden)
{
}
else
{
- rowsel = columnSelection.intersects(-1+mappedRange[p],
- -1+mappedRange[p + 1]);
+ rowsel = columnSelection.intersects(-1 + mappedRange[p],
+ -1 + mappedRange[p + 1]);
}
}
return rowsel;