- public static void initRnaHelicesShading(int n)
- {
- int i = 0;
- Instance j = Instance.getInstance();
-
- if (j.rnaHelices == null)
- {
- j.rnaHelices = new Color[n + 1];
- }
- else if (j.rnaHelices != null && j.rnaHelices.length <= n)
- {
- Color[] t = new Color[n + 1];
- System.arraycopy(j.rnaHelices, 0, t, 0, j.rnaHelices.length);
- i = j.rnaHelices.length;
- j.rnaHelices = t;
- }
- else
- {
- return;
- }
- // Generate random colors and store
- for (; i <= n; i++)
- {
- j.rnaHelices[i] = ColorUtils.generateRandomColor(Color.white);
- }
- }
-
- /**
- * delete the existing cached RNA helices colours
- */
- public static void resetRnaHelicesShading()
- {
- Instance.getInstance().rnaHelices = null;
- }
-