public class OverviewResColourFinder extends ResidueColourFinder
{
- final Color GAP_COLOUR = new Color(240, 240, 240);
+ final Color GAP_COLOUR;
+
+ final Color RESIDUE_COLOUR;
+
+ final Color HIDDEN_COLOUR;
+
+ boolean useLegacy = false;
+
+ public OverviewResColourFinder()
+ {
+ GAP_COLOUR = new Color(240, 240, 240);
+ RESIDUE_COLOUR = Color.white;
+ HIDDEN_COLOUR = Color.DARK_GRAY.darker();
+ }
+
+ public OverviewResColourFinder(boolean useLegacyColouring, Color gapCol,
+ Color hiddenCol)
+ {
+ if (useLegacyColouring)
+ {
+ GAP_COLOUR = Color.white;
+ RESIDUE_COLOUR = new Color(240, 240, 240);
+ HIDDEN_COLOUR = hiddenCol;
+ }
+ else
+ {
+ GAP_COLOUR = gapCol;
+ RESIDUE_COLOUR = Color.white;
+ HIDDEN_COLOUR = hiddenCol;
+ }
+ }
@Override
public Color getBoxColour(ResidueShaderI shader, SequenceI seq, int i)
{
- Color resBoxColour = Color.white;
+ Color resBoxColour = RESIDUE_COLOUR;
char currentChar = seq.getCharAt(i);
// In the overview window, gaps are coloured grey, unless the colour scheme
return getBoxColour(currentShader, seq, i);
}
+
+ protected Color getHiddenColour()
+ {
+ return HIDDEN_COLOUR;
+ }
}