private boolean predefinedColours = false;
private boolean seqAssociated = false;
- Color rnaHelices[] = null;
- private void initRnaHelicesShading(int n)
- {
- int j = 0;
- if (rnaHelices==null)
- {
- rnaHelices = new Color[n + 1];
- }
- else
- if (rnaHelices != null && rnaHelices.length <= n)
- {
- Color[] t = new Color[n + 1];
- System.arraycopy(rnaHelices, 0, t, 0, rnaHelices.length);
- j = rnaHelices.length;
- rnaHelices = t;
- }
- else
- {
- return;
- }
- // Generate random colors and store
- for (; j <= n; j++)
- {
- rnaHelices[j] = jalview.util.ColorUtils
- .generateRandomColor(Color.white);
- }
- }
/**
* false if the scheme was constructed without a minColour and maxColour used
* to decide if existing colours should be taken from annotation elements when
aamin = annotation.graphMin;
if (annotation.isRNA())
{
- initRnaHelicesShading(1 + (int) aamax);
+ ColourSchemeProperty.initRnaHelicesShading(1 + (int) aamax);
}
}
}
if (rna)
{
- initRnaHelicesShading(1 + (int) aamax);
+ ColourSchemeProperty.initRnaHelicesShading(1 + (int) aamax);
}
}
}
{
if (annotation.isRNA())
{
- currentColour = rnaHelices[(int) aj.value];
+ currentColour = ColourSchemeProperty.rnaHelices[(int) aj.value];
}
else
{
return col;
}
+
+ public static Color rnaHelices[] = null;
+
+ public static void initRnaHelicesShading(int n)
+ {
+ int j = 0;
+ if (rnaHelices == null)
+ {
+ rnaHelices = new Color[n + 1];
+ }
+ else if (rnaHelices != null && rnaHelices.length <= n)
+ {
+ Color[] t = new Color[n + 1];
+ System.arraycopy(rnaHelices, 0, t, 0, rnaHelices.length);
+ j = rnaHelices.length;
+ rnaHelices = t;
+ }
+ else
+ {
+ return;
+ }
+ // Generate random colors and store
+ for (; j <= n; j++)
+ {
+ rnaHelices[j] = jalview.util.ColorUtils
+ .generateRandomColor(Color.white);
+ }
+ }
+
}