JAL-2738 copy to spikes/mungo
[jalview.git] / src / jalview / renderer / seqfeatures / FeatureRenderer.java
index 8feee1f..e81e519 100644 (file)
@@ -101,8 +101,7 @@ public class FeatureRenderer extends FeatureRendererModel
 
       g.setColor(featureColour);
 
-      g.fillRect((i - start) * charWidth, y1, charWidth,
-              charHeight);
+      g.fillRect((i - start) * charWidth, y1, charWidth, charHeight);
 
       if (colourOnly || !validCharWidth)
       {
@@ -111,8 +110,8 @@ public class FeatureRenderer extends FeatureRendererModel
 
       g.setColor(Color.white);
       int charOffset = (charWidth - fm.charWidth(s)) / 2;
-      g.drawString(String.valueOf(s), charOffset
-              + (charWidth * (i - start)), pady);
+      g.drawString(String.valueOf(s),
+              charOffset + (charWidth * (i - start)), pady);
     }
     return true;
   }
@@ -200,8 +199,8 @@ public class FeatureRenderer extends FeatureRendererModel
 
       g.setColor(Color.black);
       int charOffset = (charWidth - fm.charWidth(s)) / 2;
-      g.drawString(String.valueOf(s), charOffset
-              + (charWidth * (i - start)), pady);
+      g.drawString(String.valueOf(s),
+              charOffset + (charWidth * (i - start)), pady);
     }
     return true;
   }
@@ -402,6 +401,27 @@ public class FeatureRenderer extends FeatureRendererModel
   }
 
   /**
+<<<<<<< HEAD
+=======
+   * Answers true if the feature belongs to a feature group which is not
+   * currently displayed, else false
+   * 
+   * @param sequenceFeature
+   * @return
+   */
+  @Override
+  protected boolean featureGroupNotShown(
+          final SequenceFeature sequenceFeature)
+  {
+    return featureGroups != null && sequenceFeature.featureGroup != null
+            && sequenceFeature.featureGroup.length() != 0
+            && featureGroups.containsKey(sequenceFeature.featureGroup)
+            && !featureGroups.get(sequenceFeature.featureGroup)
+                    .booleanValue();
+  }
+
+  /**
+>>>>>>> refs/heads/develop
    * Called when alignment in associated view has new/modified features to
    * discover and display.
    * 
@@ -439,7 +459,8 @@ public class FeatureRenderer extends FeatureRendererModel
      * inspect features in reverse renderOrder (the last in the array is 
      * displayed on top) until we find one that is rendered at the position
      */
-    for (int renderIndex = renderOrder.length - 1; renderIndex >= 0; renderIndex--)
+    for (int renderIndex = renderOrder.length
+            - 1; renderIndex >= 0; renderIndex--)
     {
       String type = renderOrder[renderIndex];
       if (!showFeatureOfType(type))
@@ -461,7 +482,7 @@ public class FeatureRenderer extends FeatureRendererModel
         }
       }
     }
-  
+
     /*
      * no displayed feature found at position
      */