package jalview.gui;
import jalview.renderer.AnnotationRenderer;
+import jalview.renderer.seqfeatures.FeatureColourFinder;
import java.awt.Color;
import java.awt.Dimension;
float sampleRow = (float) alheight / (float) sequencesHeight;
int lastcol = -1, lastrow = -1;
- int color = Color.white.getRGB();
+ Color color = Color.white;
int row, col;
jalview.datamodel.SequenceI seq;
final boolean hasHiddenRows = av.hasHiddenRows(), hasHiddenCols = av
// get hidden row and hidden column map once at beginning.
// clone featureRenderer settings to avoid race conditions... if state is
// updated just need to refresh again
+
+ FeatureColourFinder finder = new FeatureColourFinder(fr);
+
for (row = 0; row < sequencesHeight; row++)
{
if (resizeAgain)
if ((int) (col * sampleCol) == lastcol
&& (int) (row * sampleRow) == lastrow)
{
- miniMe.setRGB(col, row, color);
+ miniMe.setRGB(col, row, color.getRGB());
continue;
}
if (seq.getLength() > lastcol)
{
- color = sr.getResidueBoxColour(seq, lastcol).getRGB();
+ color = sr.getResidueBoxColour(seq, lastcol);
if (av.isShowSequenceFeatures())
{
- color = fr.findFeatureColour(color, seq, lastcol);
+ color = finder.findFeatureColour(color, seq, lastcol);
}
}
else
{
- color = -1; // White
+ color = Color.WHITE;
}
if (hiddenRow
|| (hasHiddenCols && !av.getColumnSelection().isVisible(
lastcol)))
{
- color = new Color(color).darker().darker().getRGB();
+ color = color.darker().darker();
}
- miniMe.setRGB(col, row, color);
+ miniMe.setRGB(col, row, color.getRGB());
}
}