git://source.jalview.org
/
jalview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
JAL-3253 preliminary static fixes for JavaScript part 3 of 3
[jalview.git]
/
src
/
jalview
/
schemes
/
ColourSchemeProperty.java
diff --git
a/src/jalview/schemes/ColourSchemeProperty.java
b/src/jalview/schemes/ColourSchemeProperty.java
index
2d5b23d
..
90386e5
100755
(executable)
--- a/
src/jalview/schemes/ColourSchemeProperty.java
+++ b/
src/jalview/schemes/ColourSchemeProperty.java
@@
-21,6
+21,7
@@
package jalview.schemes;
import jalview.api.AlignViewportI;
package jalview.schemes;
import jalview.api.AlignViewportI;
+import jalview.bin.Jalview;
import jalview.datamodel.AnnotatedCollectionI;
import jalview.util.ColorUtils;
import jalview.datamodel.AnnotatedCollectionI;
import jalview.util.ColorUtils;
@@
-109,30
+110,30
@@
public class ColourSchemeProperty
return ucs;
}
return ucs;
}
- public static Color rnaHelices[] = null;
-
public static void initRnaHelicesShading(int n)
{
public static void initRnaHelicesShading(int n)
{
- int j = 0;
- if (rnaHelices == null)
+ int i = 0;
+ Jalview j = Jalview.getInstance();
+
+ if (j.rnaHelices == null)
{
{
- rnaHelices = new Color[n + 1];
+ j.rnaHelices = new Color[n + 1];
}
}
- else if (rnaHelices != null && rnaHelices.length <= n)
+ else if (j.rnaHelices != null && j.rnaHelices.length <= n)
{
Color[] t = new Color[n + 1];
{
Color[] t = new Color[n + 1];
- System.arraycopy(rnaHelices, 0, t, 0, rnaHelices.length);
- j = rnaHelices.length;
- rnaHelices = t;
+ System.arraycopy(j.rnaHelices, 0, t, 0, j.rnaHelices.length);
+ i = j.rnaHelices.length;
+ j.rnaHelices = t;
}
else
{
return;
}
// Generate random colors and store
}
else
{
return;
}
// Generate random colors and store
- for (; j <= n; j++)
+ for (; i <= n; i++)
{
{
- rnaHelices[j] = ColorUtils.generateRandomColor(Color.white);
+ j.rnaHelices[i] = ColorUtils.generateRandomColor(Color.white);
}
}
}
}
@@
-141,7
+142,7
@@
public class ColourSchemeProperty
*/
public static void resetRnaHelicesShading()
{
*/
public static void resetRnaHelicesShading()
{
- rnaHelices = null;
+ Jalview.getInstance().rnaHelices = null;
}
/**
}
/**