*/
package jalview.renderer.seqfeatures;
+import java.awt.AlphaComposite;
+import java.awt.Color;
+import java.awt.FontMetrics;
+import java.awt.Graphics;
+import java.awt.Graphics2D;
+import java.util.List;
+
import jalview.api.AlignViewportI;
import jalview.api.FeatureColourI;
import jalview.datamodel.ContiguousI;
import jalview.util.ReverseListIterator;
import jalview.viewmodel.seqfeatures.FeatureRendererModel;
-import java.awt.AlphaComposite;
-import java.awt.Color;
-import java.awt.FontMetrics;
-import java.awt.Graphics;
-import java.awt.Graphics2D;
-import java.util.List;
-
public class FeatureRenderer extends FeatureRendererModel
{
private static final AlphaComposite NO_TRANSPARENCY = AlphaComposite
List<SequenceFeature> overlaps = seq.getFeatures().findFeatures(
visiblePositions.getBegin(), visiblePositions.getEnd(), type);
- if (fc.isSimpleColour())
+ if (overlaps.size() > 1 && fc.isSimpleColour())
{
filterFeaturesForDisplay(overlaps);
}
*/
package jalview.viewmodel.seqfeatures;
+import java.awt.Color;
+import java.beans.PropertyChangeListener;
+import java.beans.PropertyChangeSupport;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Comparator;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Hashtable;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.concurrent.ConcurrentHashMap;
+
import jalview.api.AlignViewportI;
import jalview.api.FeatureColourI;
import jalview.api.FeaturesDisplayedI;
import jalview.renderer.seqfeatures.FeatureRenderer;
import jalview.schemes.FeatureColour;
import jalview.util.ColorUtils;
-
-import java.awt.Color;
-import java.beans.PropertyChangeListener;
-import java.beans.PropertyChangeSupport;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Comparator;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Hashtable;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.concurrent.ConcurrentHashMap;
+import jalview.util.Platform;
public abstract class FeatureRendererModel
implements jalview.api.FeatureRenderer
public void filterFeaturesForDisplay(List<SequenceFeature> features)
{
/*
+ * fudge: JalviewJS's IntervalStore lacks the sort method called :-(
+ */
+ if (Platform.isJS())
+ {
+ return;
+ }
+
+ /*
* don't remove 'redundant' features if
* - transparency is applied (feature count affects depth of feature colour)
* - filters are applied (not all features may be displayable)
/**
* Answers the colour for the feature, or null if the feature is excluded by
* feature group visibility, by filters, or by colour threshold settings. This
- * method does not take feature visibility into account.
+ * method does not take feature type visibility into account.
*
* @param sf
* @param fc