From bdbd32582db88724697211a25b08f9cb8958bcb1 Mon Sep 17 00:00:00 2001 From: gmungoc Date: Fri, 10 Jul 2015 06:16:12 +0100 Subject: [PATCH] JAL-1807 explicit imports (jalview.schemes) --- src/jalview/schemes/AnnotationColourGradient.java | 10 ++++++---- src/jalview/schemes/Blosum62ColourScheme.java | 3 ++- src/jalview/schemes/ColourSchemeI.java | 11 +++++------ src/jalview/schemes/ColourSchemeProperty.java | 10 ++++------ src/jalview/schemes/CovariationColourScheme.java | 9 +++++---- src/jalview/schemes/PIDColourScheme.java | 3 ++- src/jalview/schemes/PurinePyrimidineColourScheme.java | 2 +- src/jalview/schemes/RNAHelicesColour.java | 13 +++++++------ src/jalview/schemes/RNAHelicesColourChooser.java | 2 +- src/jalview/schemes/ResidueColourScheme.java | 3 ++- src/jalview/schemes/ScoreColourScheme.java | 3 ++- 11 files changed, 37 insertions(+), 32 deletions(-) diff --git a/src/jalview/schemes/AnnotationColourGradient.java b/src/jalview/schemes/AnnotationColourGradient.java index 121d6ca..b0822ca 100755 --- a/src/jalview/schemes/AnnotationColourGradient.java +++ b/src/jalview/schemes/AnnotationColourGradient.java @@ -27,6 +27,8 @@ import jalview.datamodel.Annotation; import jalview.datamodel.GraphLine; import jalview.datamodel.SequenceCollectionI; import jalview.datamodel.SequenceI; +import jalview.renderer.AnnotationRenderer; +import jalview.util.Comparison; import java.awt.Color; import java.util.IdentityHashMap; @@ -269,7 +271,7 @@ public class AnnotationColourGradient extends FollowerColourScheme if (annotation.annotations != null && j < annotation.annotations.length && annotation.annotations[j] != null - && !jalview.util.Comparison.isGap(c)) + && !Comparison.isGap(c)) { Annotation aj = annotation.annotations[j]; // 'use original colours' => colourScheme != null @@ -309,9 +311,9 @@ public class AnnotationColourGradient extends FollowerColourScheme } else { - currentColour = annotation.annotations[j].secondaryStructure == 'H' ? jalview.renderer.AnnotationRenderer.HELIX_COLOUR - : annotation.annotations[j].secondaryStructure == 'E' ? jalview.renderer.AnnotationRenderer.SHEET_COLOUR - : jalview.renderer.AnnotationRenderer.STEM_COLOUR; + currentColour = annotation.annotations[j].secondaryStructure == 'H' ? AnnotationRenderer.HELIX_COLOUR + : annotation.annotations[j].secondaryStructure == 'E' ? AnnotationRenderer.SHEET_COLOUR + : AnnotationRenderer.STEM_COLOUR; } } } diff --git a/src/jalview/schemes/Blosum62ColourScheme.java b/src/jalview/schemes/Blosum62ColourScheme.java index 9d09259..d5d2924 100755 --- a/src/jalview/schemes/Blosum62ColourScheme.java +++ b/src/jalview/schemes/Blosum62ColourScheme.java @@ -24,6 +24,7 @@ import jalview.analysis.AAFrequency; import jalview.datamodel.AnnotatedCollectionI; import jalview.datamodel.SequenceCollectionI; import jalview.datamodel.SequenceI; +import jalview.util.Comparison; import java.awt.Color; import java.util.Map; @@ -52,7 +53,7 @@ public class Blosum62ColourScheme extends ResidueColourScheme Color currentColour; - if (!jalview.util.Comparison.isGap(res)) + if (!Comparison.isGap(res)) { String max = (String) consensus[j].get(AAFrequency.MAXRESIDUE); diff --git a/src/jalview/schemes/ColourSchemeI.java b/src/jalview/schemes/ColourSchemeI.java index 1604da7..1589356 100755 --- a/src/jalview/schemes/ColourSchemeI.java +++ b/src/jalview/schemes/ColourSchemeI.java @@ -20,15 +20,14 @@ */ package jalview.schemes; -import java.awt.Color; -import java.util.Map; - -import jalview.datamodel.AlignmentI; +import jalview.analysis.Conservation; import jalview.datamodel.AnnotatedCollectionI; import jalview.datamodel.SequenceCollectionI; -import jalview.datamodel.SequenceGroup; import jalview.datamodel.SequenceI; +import java.awt.Color; +import java.util.Map; + public interface ColourSchemeI { /** @@ -61,7 +60,7 @@ public interface ColourSchemeI * * @param c */ - public void setConservation(jalview.analysis.Conservation c); + public void setConservation(Conservation c); /** * enable or disable conservation shading for this colourscheme diff --git a/src/jalview/schemes/ColourSchemeProperty.java b/src/jalview/schemes/ColourSchemeProperty.java index 5715ada..025a7a0 100755 --- a/src/jalview/schemes/ColourSchemeProperty.java +++ b/src/jalview/schemes/ColourSchemeProperty.java @@ -21,6 +21,7 @@ package jalview.schemes; import jalview.datamodel.AnnotatedCollectionI; +import jalview.util.ColorUtils; import java.awt.Color; @@ -415,8 +416,7 @@ public class ColourSchemeProperty try { // fix the launchApp user defined coloursheme transfer bug - jalview.schemes.UserColourScheme ucs = new jalview.schemes.UserColourScheme( - "white"); + UserColourScheme ucs = new UserColourScheme("white"); ucs.parseAppletParameter(name); } catch (Exception e) @@ -442,8 +442,7 @@ public class ColourSchemeProperty * @return null or an instance of the colourscheme configured to colour given * sequence set */ - public static ColourSchemeI getColour( - jalview.datamodel.AnnotatedCollectionI coll, int index) + public static ColourSchemeI getColour(AnnotatedCollectionI coll, int index) { // TODO 3.0 2.8 refactor signature to take an alignmentI like container so // colourschemes based on annotation can be initialised @@ -621,8 +620,7 @@ public class ColourSchemeProperty // Generate random colors and store for (; j <= n; j++) { - rnaHelices[j] = jalview.util.ColorUtils - .generateRandomColor(Color.white); + rnaHelices[j] = ColorUtils.generateRandomColor(Color.white); } } diff --git a/src/jalview/schemes/CovariationColourScheme.java b/src/jalview/schemes/CovariationColourScheme.java index 582faeb..48b7bee 100644 --- a/src/jalview/schemes/CovariationColourScheme.java +++ b/src/jalview/schemes/CovariationColourScheme.java @@ -20,10 +20,11 @@ */ package jalview.schemes; -import java.awt.*; -import java.util.Hashtable; - import jalview.datamodel.AlignmentAnnotation; +import jalview.util.ColorUtils; + +import java.awt.Color; +import java.util.Hashtable; /** * Became RNAHelicesColour.java. Placeholder for true covariation color scheme @@ -72,7 +73,7 @@ public class CovariationColourScheme extends ResidueColourScheme for (int j = 0; j <= numHelix; j++) { helixcolorhash.put(Integer.toString(j), - jalview.util.ColorUtils.generateRandomColor(Color.white)); + ColorUtils.generateRandomColor(Color.white)); } } diff --git a/src/jalview/schemes/PIDColourScheme.java b/src/jalview/schemes/PIDColourScheme.java index 9dd763d..c59d579 100755 --- a/src/jalview/schemes/PIDColourScheme.java +++ b/src/jalview/schemes/PIDColourScheme.java @@ -23,6 +23,7 @@ package jalview.schemes; import jalview.analysis.AAFrequency; import jalview.datamodel.SequenceGroup; import jalview.datamodel.SequenceI; +import jalview.util.Comparison; import java.awt.Color; @@ -73,7 +74,7 @@ public class PIDColourScheme extends ResidueColourScheme { sc = ((Float) consensus[j].get(ignoreGaps)).floatValue(); - if (!jalview.util.Comparison.isGap(c)) + if (!Comparison.isGap(c)) { for (int i = 0; i < thresholds.length; i++) { diff --git a/src/jalview/schemes/PurinePyrimidineColourScheme.java b/src/jalview/schemes/PurinePyrimidineColourScheme.java index 9c43ed1..3d08060 100644 --- a/src/jalview/schemes/PurinePyrimidineColourScheme.java +++ b/src/jalview/schemes/PurinePyrimidineColourScheme.java @@ -45,7 +45,7 @@ public class PurinePyrimidineColourScheme extends ResidueColourScheme * Character in sequence * * @return Color from purinepyrimidineIndex in - * jalview.schemes.ResidueProperties + * ResidueProperties */ public Color findColour(char c) { diff --git a/src/jalview/schemes/RNAHelicesColour.java b/src/jalview/schemes/RNAHelicesColour.java index 57fcba5..be28d91 100644 --- a/src/jalview/schemes/RNAHelicesColour.java +++ b/src/jalview/schemes/RNAHelicesColour.java @@ -20,14 +20,15 @@ */ package jalview.schemes; -import java.awt.*; -import java.util.Hashtable; -import java.util.Map; - import jalview.datamodel.AlignmentAnnotation; import jalview.datamodel.AnnotatedCollectionI; import jalview.datamodel.SequenceCollectionI; import jalview.datamodel.SequenceI; +import jalview.util.ColorUtils; + +import java.awt.Color; +import java.util.Hashtable; +import java.util.Map; /** * Looks at the information computed from an RNA Stockholm format file on the @@ -143,7 +144,7 @@ public class RNAHelicesColour extends ResidueColourScheme if (!helixcolorhash.containsKey(Integer.toString(j))) { helixcolorhash.put(Integer.toString(j), - jalview.util.ColorUtils.generateRandomColor(Color.white)); + ColorUtils.generateRandomColor(Color.white)); } } } @@ -151,7 +152,7 @@ public class RNAHelicesColour extends ResidueColourScheme /** * Returns default color base on purinepyrimidineIndex in - * jalview.schemes.ResidueProperties (Allows coloring in sequence logo) + * ResidueProperties (Allows coloring in sequence logo) * * @param c * Character in sequence diff --git a/src/jalview/schemes/RNAHelicesColourChooser.java b/src/jalview/schemes/RNAHelicesColourChooser.java index ee9792a..99403ab 100644 --- a/src/jalview/schemes/RNAHelicesColourChooser.java +++ b/src/jalview/schemes/RNAHelicesColourChooser.java @@ -46,7 +46,7 @@ public class RNAHelicesColourChooser Hashtable oldgroupColours; - jalview.datamodel.AlignmentAnnotation currentAnnotation; + AlignmentAnnotation currentAnnotation; boolean adjusting = false; diff --git a/src/jalview/schemes/ResidueColourScheme.java b/src/jalview/schemes/ResidueColourScheme.java index e3118ad..5294006 100755 --- a/src/jalview/schemes/ResidueColourScheme.java +++ b/src/jalview/schemes/ResidueColourScheme.java @@ -25,6 +25,7 @@ import jalview.analysis.Conservation; import jalview.datamodel.AnnotatedCollectionI; import jalview.datamodel.SequenceCollectionI; import jalview.datamodel.SequenceI; +import jalview.util.Comparison; import jalview.util.MessageManager; import java.awt.Color; @@ -268,7 +269,7 @@ public class ResidueColourScheme implements ColourSchemeI if ((conservationLength > i) && (conservation[i] != '*') && (conservation[i] != '+')) { - if (jalview.util.Comparison.isGap(conservation[i])) + if (Comparison.isGap(conservation[i])) { currentColour = Color.white; } diff --git a/src/jalview/schemes/ScoreColourScheme.java b/src/jalview/schemes/ScoreColourScheme.java index 7eb920d..beb7b59 100755 --- a/src/jalview/schemes/ScoreColourScheme.java +++ b/src/jalview/schemes/ScoreColourScheme.java @@ -21,6 +21,7 @@ package jalview.schemes; import jalview.datamodel.SequenceI; +import jalview.util.Comparison; import java.awt.Color; @@ -102,7 +103,7 @@ public class ScoreColourScheme extends ResidueColourScheme } } - if (jalview.util.Comparison.isGap(c)) + if (Comparison.isGap(c)) { return Color.white; } -- 1.7.10.2