continue;
}
- if (av.getShowText())
- {
- g.setColor(Color.white);
- int charOffset = (charWidth - fm.charWidth(s)) / 2;
- g.drawString(String.valueOf(s),
- charOffset + (charWidth * (i - start)), pady);
- }
+ /*
+ * JAL-3045 text is always drawn over features, even if
+ * 'Show Text' is unchecked in the format menu
+ */
+ g.setColor(Color.white);
+ int charOffset = (charWidth - fm.charWidth(s)) / 2;
+ g.drawString(String.valueOf(s),
+ charOffset + (charWidth * (i - start)), pady);
}
return true;
}
List<SequenceFeature> overlaps = seq.getFeatures().findFeatures(
visiblePositions.getBegin(), visiblePositions.getEnd(), type);
- if (fc.isSimpleColour())
+ if (overlaps.size() > 1 && fc.isSimpleColour())
{
filterFeaturesForDisplay(overlaps);
}
}
int featureStartCol = seq.findIndex(visibleStart);
- int featureEndCol = sf.begin == sf.end ? featureStartCol : seq
- .findIndex(visibleEnd);
+ int featureEndCol = sf.begin == sf.end ? featureStartCol
+ : seq.findIndex(visibleEnd);
// Color featureColour = getColour(sequenceFeature);
else
{
*/
- boolean drawn = renderFeature(g, seq,
- featureStartCol - 1,
- featureEndCol - 1, featureColour,
- start, end, y1, colourOnly);
- if (drawn)
- {
- drawnColour = featureColour;
- }
+ boolean drawn = renderFeature(g, seq, featureStartCol - 1,
+ featureEndCol - 1, featureColour, start, end, y1,
+ colourOnly);
+ if (drawn)
+ {
+ drawnColour = featureColour;
+ }
/*}*/
}
}
for (int pos = visibleStart; pos <= visibleEnd; pos++)
{
int column = seq.findIndex(pos);
- MappedFeatures mf = fr2
- .findComplementFeaturesAtResidue(seq, pos);
+ MappedFeatures mf = fr2.findComplementFeaturesAtResidue(seq, pos);
if (mf != null)
{
for (SequenceFeature sf : mf.features)
continue;
}
+ /*
+ * find features of this type, and the colour of the _last_ one
+ * (the one that would be drawn on top) that has a colour
+ */
List<SequenceFeature> overlaps = seq.findFeatures(column, column,
type);
- for (SequenceFeature sequenceFeature : overlaps)
+ for (int i = overlaps.size() - 1 ; i >= 0 ; i--)
{
+ SequenceFeature sequenceFeature = overlaps.get(i);
if (!featureGroupNotShown(sequenceFeature))
{
Color col = getColour(sequenceFeature);
AlignViewportI complement = av.getCodingComplement();
AlignFrame af = Desktop.getAlignFrameFor(complement);
FeatureRendererModel fr2 = af.getFeatureRenderer();
- MappedFeatures mf = fr2.findComplementFeaturesAtResidue(
- seq, seq.findPosition(column - 1));
+ MappedFeatures mf = fr2.findComplementFeaturesAtResidue(seq,
+ seq.findPosition(column - 1));
if (mf == null)
{
return null;