JAL-2418 source formatting
[jalview.git] / src / jalview / ws / jws2 / AADisorderClient.java
index 71b6c91..fb6ffc4 100644 (file)
@@ -29,7 +29,7 @@ import jalview.datamodel.SequenceFeature;
 import jalview.datamodel.SequenceI;
 import jalview.gui.AlignFrame;
 import jalview.schemes.FeatureColour;
-import jalview.schemes.UserColourScheme;
+import jalview.util.ColorUtils;
 import jalview.ws.jws2.jabaws2.Jws2Instance;
 import jalview.ws.params.WsParamSetI;
 
@@ -47,8 +47,7 @@ import compbio.data.sequence.Score;
 import compbio.data.sequence.ScoreManager.ScoreHolder;
 import compbio.metadata.Argument;
 
-public class AADisorderClient extends JabawsCalcWorker implements
-        AlignCalcWorkerI
+public class AADisorderClient extends JabawsCalcWorker
 {
 
   private static final String THRESHOLD = "THRESHOLD";
@@ -105,8 +104,9 @@ public class AADisorderClient extends JabawsCalcWorker implements
     Map<String, String[]> fmap;
     featureMap.put(compbio.ws.client.Services.IUPredWS.toString(),
             fmap = new HashMap<String, String[]>());
-    fmap.put("Glob", new String[] { "Globular Domain",
-        "Predicted globular domain" });
+    fmap.put("Glob",
+            new String[]
+            { "Globular Domain", "Predicted globular domain" });
     featureMap.put(compbio.ws.client.Services.JronnWS.toString(),
             fmap = new HashMap<String, String[]>());
     featureMap.put(compbio.ws.client.Services.DisemblWS.toString(),
@@ -116,10 +116,12 @@ public class AADisorderClient extends JabawsCalcWorker implements
     fmap.put("COILS", new String[] { "COILS", "Random coil" });
     featureMap.put(compbio.ws.client.Services.GlobPlotWS.toString(),
             fmap = new HashMap<String, String[]>());
-    fmap.put("GlobDoms", new String[] { "Globular Domain",
-        "Predicted globular domain" });
-    fmap.put("Disorder", new String[] { "Protein Disorder",
-        "Probable unstructured peptide region" });
+    fmap.put("GlobDoms",
+            new String[]
+            { "Globular Domain", "Predicted globular domain" });
+    fmap.put("Disorder",
+            new String[]
+            { "Protein Disorder", "Probable unstructured peptide region" });
     Map<String, Map<String, Object>> amap;
     annotMap = new HashMap<String, Map<String, Map<String, Object>>>();
     annotMap.put(compbio.ws.client.Services.GlobPlotWS.toString(),
@@ -208,9 +210,7 @@ public class AADisorderClient extends JabawsCalcWorker implements
         {
           Cache.log
                   .info("Couldn't recover disorder prediction for sequence "
-                          + seq.getName()
-                          + "(Prediction name was "
-                          + seqId
+                          + seq.getName() + "(Prediction name was " + seqId
                           + ")"
                           + "\nSee http://issues.jalview.org/browse/JAL-1319 for one possible reason why disorder predictions might fail.");
         }
@@ -239,14 +239,14 @@ public class AADisorderClient extends JabawsCalcWorker implements
                 }
                 if (vals.hasNext())
                 {
-                  sf = new SequenceFeature(type[0], type[1],
-                          base + rn.from, base + rn.to, val = vals.next()
-                                  .floatValue(), methodName);
+                  sf = new SequenceFeature(type[0], type[1], base + rn.from,
+                          base + rn.to, val = vals.next().floatValue(),
+                          methodName);
                 }
                 else
                 {
-                  sf = new SequenceFeature(type[0], type[1], null, base
-                          + rn.from, base + rn.to, methodName);
+                  sf = new SequenceFeature(type[0], type[1], null,
+                          base + rn.from, base + rn.to, methodName);
                 }
                 dseq.addSequenceFeature(sf);
                 if (last != val && !Float.isNaN(last))
@@ -269,13 +269,15 @@ public class AADisorderClient extends JabawsCalcWorker implements
                       typename = service.serviceType + " ("
                               + scr.getMethod() + ")",
                       calcName = service.getServiceTypeURI() + "/"
-                              + scr.getMethod(), aseq, base + 1, scr);
+                              + scr.getMethod(),
+                      aseq, base + 1, scr);
               annot.graph = AlignmentAnnotation.LINE_GRAPH;
 
               Map<String, Object> styleMap = (annotTypeMap == null) ? null
                       : annotTypeMap.get(scr.getMethod());
 
-              annot.visible = (styleMap == null || styleMap.get(INVISIBLE) == null);
+              annot.visible = (styleMap == null
+                      || styleMap.get(INVISIBLE) == null);
               double[] thrsh = (styleMap == null) ? null
                       : (double[]) styleMap.get(THRESHOLD);
               float[] range = (styleMap == null) ? null
@@ -309,8 +311,8 @@ public class AADisorderClient extends JabawsCalcWorker implements
                 annot.description += "<br/>" + threshNote;
               }
               annot.description += "</html>";
-              Color col = UserColourScheme.createColourFromName(typeName
-                      + scr.getMethod());
+              Color col = ColorUtils
+                      .createColourFromName(typeName + scr.getMethod());
               for (int p = 0, ps = annot.annotations.length; p < ps; p++)
               {
                 if (annot.annotations[p] != null)