X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fext%2Fvarna%2FVarnaCommands.java;h=b5f0dc923e24a93ab898cb9f864ef2f9e39c3bc0;hb=8d2724b83aca38ef75d68787cc5939d950467e63;hp=21f626fb6f9d9e52b2b9817012f76120b69c064b;hpb=80c223c45fde0899c9794e887801dd82fffd3452;p=jalview.git
diff --git a/src/jalview/ext/varna/VarnaCommands.java b/src/jalview/ext/varna/VarnaCommands.java
index 21f626f..b5f0dc9 100644
--- a/src/jalview/ext/varna/VarnaCommands.java
+++ b/src/jalview/ext/varna/VarnaCommands.java
@@ -1,6 +1,6 @@
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8)
- * Copyright (C) 2012 J Procter, AM Waterhouse, LM Lui, J Engelhardt, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.0b1)
+ * Copyright (C) 2014 The Jalview Authors
*
* This file is part of Jalview.
*
@@ -14,6 +14,7 @@
* PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with Jalview. If not, see .
+ * The Jalview Authors are detailed in the 'AUTHORS' file.
*/
package jalview.ext.varna;
@@ -29,8 +30,8 @@ import java.awt.Color;
import java.util.ArrayList;
/**
- * Routines for generating Jmol commands for Jalview/Jmol binding
- * another cruisecontrol test.
+ * Routines for generating Jmol commands for Jalview/Jmol binding another
+ * cruisecontrol test.
*
* @author JimP
*
@@ -39,10 +40,14 @@ public class VarnaCommands
{
/**
- * Jmol utility which constructs the commands to colour chains by the given alignment
+ * Jmol utility which constructs the commands to colour chains by the given
+ * alignment
*
*/
- public static String[] getColourBySequenceCommand(StructureSelectionManager ssm, String[] files, SequenceI[][] sequence, SequenceRenderer sr, FeatureRenderer fr, AlignmentI alignment)
+ public static String[] getColourBySequenceCommand(
+ StructureSelectionManager ssm, String[] files,
+ SequenceI[][] sequence, SequenceRenderer sr, FeatureRenderer fr,
+ AlignmentI alignment)
{
ArrayList str = new ArrayList();
@@ -93,7 +98,10 @@ public class VarnaCommands
+ col.getGreen()
+ ","
+ col.getBlue() + "]";
- if (command.length()>newSelcom.length() && command.substring(command.length()-newSelcom.length()).equals(newSelcom))
+ if (command.length() > newSelcom.length()
+ && command.substring(
+ command.length() - newSelcom.length())
+ .equals(newSelcom))
{
command = VarnaCommands.condenseCommand(command, pos);
continue;
@@ -129,9 +137,14 @@ public class VarnaCommands
// work back to last 'select'
int p=command.length(),q=p;
- do {
+ do
+ {
p-=6;
- if (p<1) { p=0; };
+ if (p < 1)
+ {
+ p = 0;
+ }
+ ;
} while ((q=command.indexOf("select",p))==-1 && p>0);
StringBuffer sb = new StringBuffer(command.substring(0,q+7));