JAL-4090 JAL-1551 spotlessApply
[jalview.git] / src / jalview / renderer / ContactGeometry.java
index a1443c8..60cf5bd 100644 (file)
@@ -45,13 +45,15 @@ public class ContactGeometry
    * 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)
   {
@@ -73,8 +75,9 @@ public class ContactGeometry
       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
@@ -108,10 +111,12 @@ public class ContactGeometry
       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 + "]";
     }
   }
 
@@ -144,7 +149,7 @@ public class ContactGeometry
       {
         // 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)
         {
@@ -156,8 +161,8 @@ public class ContactGeometry
       }
       else
       {
-        rowsel = columnSelection.intersects(-1+mappedRange[p],
-                -1+mappedRange[p + 1]);
+        rowsel = columnSelection.intersects(-1 + mappedRange[p],
+                -1 + mappedRange[p + 1]);
       }
     }
     return rowsel;