apply jalview code style
authorjprocter <Jim Procter>
Thu, 23 Sep 2010 07:06:55 +0000 (07:06 +0000)
committerjprocter <Jim Procter>
Thu, 23 Sep 2010 07:06:55 +0000 (07:06 +0000)
185 files changed:
src/MCview/AppletPDBCanvas.java
src/MCview/PDBCanvas.java
src/MCview/PDBChain.java
src/MCview/PDBViewer.java
src/ext/vamsas/JpredSoapBindingStub.java
src/ext/vamsas/MuscleWSSoapBindingStub.java
src/ext/vamsas/RegistryServiceSoapBindingStub.java
src/ext/vamsas/SeqSearchServiceSoapBindingStub.java
src/jalview/analysis/AAFrequency.java
src/jalview/analysis/AlignSeq.java
src/jalview/analysis/AlignmentSorter.java
src/jalview/analysis/CrossRef.java
src/jalview/analysis/Dna.java
src/jalview/analysis/NJTree.java
src/jalview/analysis/PCA.java
src/jalview/analysis/SeqsetUtils.java
src/jalview/api/FeatureRenderer.java
src/jalview/api/SequenceStructureBinding.java
src/jalview/appletgui/APopupMenu.java
src/jalview/appletgui/AlignFrame.java
src/jalview/appletgui/AlignViewport.java
src/jalview/appletgui/AlignmentPanel.java
src/jalview/appletgui/AnnotationColourChooser.java
src/jalview/appletgui/AnnotationLabels.java
src/jalview/appletgui/AnnotationPanel.java
src/jalview/appletgui/AppletJmol.java
src/jalview/appletgui/AppletJmolBinding.java
src/jalview/appletgui/CutAndPasteTransfer.java
src/jalview/appletgui/ExtJmol.java
src/jalview/appletgui/FeatureColourChooser.java
src/jalview/appletgui/FeatureRenderer.java
src/jalview/appletgui/FeatureSettings.java
src/jalview/appletgui/Finder.java
src/jalview/appletgui/IdPanel.java
src/jalview/appletgui/OverviewPanel.java
src/jalview/appletgui/RotatableCanvas.java
src/jalview/appletgui/ScalePanel.java
src/jalview/appletgui/SeqCanvas.java
src/jalview/appletgui/SeqPanel.java
src/jalview/appletgui/Tooltip.java
src/jalview/appletgui/TreeCanvas.java
src/jalview/appletgui/TreePanel.java
src/jalview/appletgui/UserDefinedColours.java
src/jalview/bin/Cache.java
src/jalview/bin/Jalview.java
src/jalview/bin/JalviewLite.java
src/jalview/commands/EditCommand.java
src/jalview/datamodel/Alignment.java
src/jalview/datamodel/AlignmentI.java
src/jalview/datamodel/ColumnSelection.java
src/jalview/datamodel/SeqCigar.java
src/jalview/datamodel/SequenceGroup.java
src/jalview/datamodel/xdb/embl/EmblEntry.java
src/jalview/gui/AlignFrame.java
src/jalview/gui/AlignViewport.java
src/jalview/gui/AlignmentPanel.java
src/jalview/gui/AnnotationColourChooser.java
src/jalview/gui/AnnotationExporter.java
src/jalview/gui/AnnotationLabels.java
src/jalview/gui/AnnotationPanel.java
src/jalview/gui/AppJmol.java
src/jalview/gui/AppJmolBinding.java
src/jalview/gui/Console.java
src/jalview/gui/CutAndPasteTransfer.java
src/jalview/gui/DasSourceBrowser.java
src/jalview/gui/Desktop.java
src/jalview/gui/EditNameDialog.java
src/jalview/gui/FeatureRenderer.java
src/jalview/gui/FeatureSettings.java
src/jalview/gui/FontChooser.java
src/jalview/gui/IdCanvas.java
src/jalview/gui/Jalview2XML.java
src/jalview/gui/Jalview2XML_V1.java
src/jalview/gui/JvSwingUtils.java
src/jalview/gui/OOMWarning.java
src/jalview/gui/OverviewPanel.java
src/jalview/gui/PCAPanel.java
src/jalview/gui/PopupMenu.java
src/jalview/gui/Preferences.java
src/jalview/gui/RotatableCanvas.java
src/jalview/gui/ScalePanel.java
src/jalview/gui/SeqCanvas.java
src/jalview/gui/SeqPanel.java
src/jalview/gui/SequenceRenderer.java
src/jalview/gui/SliderPanel.java
src/jalview/gui/SplashScreen.java
src/jalview/gui/TextColourChooser.java
src/jalview/gui/TreePanel.java
src/jalview/gui/UserDefinedColours.java
src/jalview/gui/UserQuestionnaireCheck.java
src/jalview/gui/VamsasApplication.java
src/jalview/gui/WsJobParameters.java
src/jalview/gui/WsPreferences.java
src/jalview/io/AnnotationFile.java
src/jalview/io/AppletFormatAdapter.java
src/jalview/io/ClustalFile.java
src/jalview/io/FeaturesFile.java
src/jalview/io/FormatAdapter.java
src/jalview/io/HTMLOutput.java
src/jalview/io/JPredFile.java
src/jalview/io/JalviewFileChooser.java
src/jalview/io/JnetAnnotationMaker.java
src/jalview/io/NewickFile.java
src/jalview/io/PIRFile.java
src/jalview/io/StockholmFile.java
src/jalview/io/VamsasAppDatastore.java
src/jalview/io/WSWUBlastClient.java
src/jalview/io/vamsas/Datasetsequence.java
src/jalview/io/vamsas/DatastoreItem.java
src/jalview/io/vamsas/Dbref.java
src/jalview/io/vamsas/Sequencefeature.java
src/jalview/io/vamsas/Sequencemapping.java
src/jalview/io/vamsas/Tree.java
src/jalview/jbgui/GAlignFrame.java
src/jalview/jbgui/GPCAPanel.java
src/jalview/jbgui/GPreferences.java
src/jalview/jbgui/GStructureViewer.java
src/jalview/jbgui/GUserDefinedColours.java
src/jalview/jbgui/GWsPreferences.java
src/jalview/schemabinding/version2/WebServiceParameterSet.java
src/jalview/schemabinding/version2/descriptors/AlcodonFrameDescriptor.java
src/jalview/schemabinding/version2/descriptors/AnnotationDescriptor.java
src/jalview/schemabinding/version2/descriptors/FeatureDescriptor.java
src/jalview/schemabinding/version2/descriptors/JGroupDescriptor.java
src/jalview/schemabinding/version2/descriptors/JSeqDescriptor.java
src/jalview/schemabinding/version2/descriptors/JalviewModelDescriptor.java
src/jalview/schemabinding/version2/descriptors/JalviewModelSequenceDescriptor.java
src/jalview/schemabinding/version2/descriptors/MapListTypeDescriptor.java
src/jalview/schemabinding/version2/descriptors/MappingChoiceDescriptor.java
src/jalview/schemabinding/version2/descriptors/MappingDescriptor.java
src/jalview/schemabinding/version2/descriptors/PdbentryDescriptor.java
src/jalview/schemabinding/version2/descriptors/PdbentryItemDescriptor.java
src/jalview/schemabinding/version2/descriptors/PdbidsDescriptor.java
src/jalview/schemabinding/version2/descriptors/SequenceSetDescriptor.java
src/jalview/schemabinding/version2/descriptors/TreeDescriptor.java
src/jalview/schemabinding/version2/descriptors/UserColoursDescriptor.java
src/jalview/schemabinding/version2/descriptors/VAMSASDescriptor.java
src/jalview/schemabinding/version2/descriptors/ViewportDescriptor.java
src/jalview/schemabinding/version2/descriptors/WebServiceParameterSetDescriptor.java
src/jalview/schemes/ClustalxColourScheme.java
src/jalview/schemes/ResidueProperties.java
src/jalview/util/AWTConsole.java
src/jalview/util/DBRefUtils.java
src/jalview/util/Format.java
src/jalview/util/ImageMaker.java
src/jalview/util/TableSorter.java
src/jalview/ws/AWSThread.java
src/jalview/ws/AWsJob.java
src/jalview/ws/DBRefFetcher.java
src/jalview/ws/DasSequenceFeatureFetcher.java
src/jalview/ws/EnfinEnvision2OneWay.java
src/jalview/ws/JobStateSummary.java
src/jalview/ws/WSClient.java
src/jalview/ws/dbsources/EmblXmlSource.java
src/jalview/ws/dbsources/GeneDbSource.java
src/jalview/ws/dbsources/das/DasSequenceSourceListener.java
src/jalview/ws/ebi/EBIFetchClient.java
src/jalview/ws/jws1/Discoverer.java
src/jalview/ws/jws1/JPredClient.java
src/jalview/ws/jws1/JPredThread.java
src/jalview/ws/jws1/JWS1Thread.java
src/jalview/ws/jws1/MsaWSClient.java
src/jalview/ws/jws1/MsaWSThread.java
src/jalview/ws/jws1/SeqSearchWSClient.java
src/jalview/ws/jws1/SeqSearchWSThread.java
src/jalview/ws/jws1/WS1Client.java
src/jalview/ws/jws1/WSJob.java
src/jalview/ws/jws2/JWs2Job.java
src/jalview/ws/jws2/JabaPreset.java
src/jalview/ws/jws2/Jws2Client.java
src/jalview/ws/jws2/Jws2Discoverer.java
src/jalview/ws/jws2/MsaWSClient.java
src/jalview/ws/jws2/ParameterUtils.java
src/jalview/ws/jws2/dm/JabaOption.java
src/jalview/ws/jws2/dm/JabaParameter.java
src/jalview/ws/jws2/dm/JabaValueConstrain.java
src/jalview/ws/params/ArgumentI.java
src/jalview/ws/params/OptionI.java
src/jalview/ws/params/ParamDatastoreI.java
src/jalview/ws/params/ParamManager.java
src/jalview/ws/params/ParameterI.java
src/jalview/ws/params/ValueConstrainI.java
src/jalview/ws/params/WsParamSetI.java
src/uk/ac/ebi/picr/model/UPEntry.java
src/uk/ac/ebi/www/picr/AccessionMappingService/AccessionMapperBindingStub.java

index 543d680..9939131 100755 (executable)
@@ -177,8 +177,10 @@ public class AppletPDBCanvas extends Panel implements MouseListener,
       // the start and end points.
       // Align the sequence to the pdb
       // TODO: DNa/Pep switch
-      AlignSeq as = new AlignSeq(sequence, ((PDBChain) pdb.chains
-              .elementAt(i)).sequence, ((PDBChain) pdb.chains.elementAt(i)).isNa ? AlignSeq.DNA : AlignSeq.PEP);
+      AlignSeq as = new AlignSeq(sequence,
+              ((PDBChain) pdb.chains.elementAt(i)).sequence,
+              ((PDBChain) pdb.chains.elementAt(i)).isNa ? AlignSeq.DNA
+                      : AlignSeq.PEP);
       as.calcScoreMatrix();
       as.traceAlignment();
       PrintStream ps = new PrintStream(System.out)
@@ -1102,7 +1104,8 @@ public class AppletPDBCanvas extends Panel implements MouseListener,
   // /StructureListener
   public String[] getPdbFile()
   {
-    return new String[] { pdbentry.getFile() };
+    return new String[]
+    { pdbentry.getFile() };
   }
 
   String lastMessage;
index 3b00418..23de254 100755 (executable)
@@ -173,8 +173,8 @@ public class PDBCanvas extends JPanel implements MouseListener,
       // Now lets compare the sequences to get
       // the start and end points.
       // Align the sequence to the pdb
-      AlignSeq as = new AlignSeq(sequence, ((PDBChain) pdb.chains
-              .elementAt(i)).sequence, "pep");
+      AlignSeq as = new AlignSeq(sequence,
+              ((PDBChain) pdb.chains.elementAt(i)).sequence, "pep");
       as.calcScoreMatrix();
       as.traceAlignment();
       PrintStream ps = new PrintStream(System.out)
@@ -1069,7 +1069,8 @@ public class PDBCanvas extends JPanel implements MouseListener,
   // /StructureListener
   public String[] getPdbFile()
   {
-    return new String[] { pdbentry.getFile() };
+    return new String[]
+    { pdbentry.getFile() };
   }
 
   String lastMessage;
index e25dfd0..47f6817 100755 (executable)
@@ -46,7 +46,9 @@ public class PDBChain
   public int offset;
 
   public Sequence sequence;
-  public boolean isNa=false;
+
+  public boolean isNa = false;
+
   public boolean isVisible = true;
 
   public int pdbstart = 0;
@@ -150,10 +152,9 @@ public class PDBChain
                 - offset)).atoms.elementAt(0)).alignmentMapping);
         tx.setEnd(1 + ((Atom) ((Residue) residues.elementAt(tx.getEnd()
                 - offset)).atoms.elementAt(0)).alignmentMapping);
-        tx
-                .setStatus(status
-                        + ((tx.getStatus() == null || tx.getStatus()
-                                .length() == 0) ? "" : ":" + tx.getStatus()));
+        tx.setStatus(status
+                + ((tx.getStatus() == null || tx.getStatus().length() == 0) ? ""
+                        : ":" + tx.getStatus()));
         if (tx.begin != 0 && tx.end != 0)
           sq.addSequenceFeature(tx);
       }
@@ -163,18 +164,18 @@ public class PDBChain
 
   public void makeCaBondList()
   {
-    boolean na=false;
-    int numNa=0;
+    boolean na = false;
+    int numNa = 0;
     for (int i = 0; i < (residues.size() - 1); i++)
     {
       Residue tmpres = (Residue) residues.elementAt(i);
       Residue tmpres2 = (Residue) residues.elementAt(i + 1);
       Atom at1 = tmpres.findAtom("CA");
       Atom at2 = tmpres2.findAtom("CA");
-      na=false;
+      na = false;
       if ((at1 == null) && (at2 == null))
       {
-        na=true;
+        na = true;
         at1 = tmpres.findAtom("P");
         at2 = tmpres2.findAtom("P");
       }
@@ -194,9 +195,9 @@ public class PDBChain
         System.out.println("not found " + i);
       }
     }
-    if (numNa>0 && ((numNa/residues.size())>0.99))
+    if (numNa > 0 && ((numNa / residues.size()) > 0.99))
     {
-      isNa=true;
+      isNa = true;
     }
   }
 
@@ -273,7 +274,7 @@ public class PDBChain
       // Keep totting up the sequence
       if ((symbol = ResidueProperties.getAA3Hash().get(tmpat.resName)) == null)
       {
-        String nucname=tmpat.resName.trim();
+        String nucname = tmpat.resName.trim();
         if (ResidueProperties.nucleotideIndex[nucname.charAt(0)] == -1)
         {
           seq.append("X");
@@ -303,7 +304,7 @@ public class PDBChain
     {
       id = " ";
     }
-    isNa=nucleotide;
+    isNa = nucleotide;
     sequence = new Sequence(id, seq.toString(), offset, resNumber - 1); // Note:
     // resNumber-offset
     // ~=
@@ -475,11 +476,9 @@ public class PDBChain
           }
         }
       }
-      sq
-              .addAlignmentAnnotation(new AlignmentAnnotation("PDB.RESNUM",
-                      "PDB Residue Numbering for " + this.pdbid + ":"
-                              + this.id, an, (float) min, (float) max,
-                      AlignmentAnnotation.LINE_GRAPH));
+      sq.addAlignmentAnnotation(new AlignmentAnnotation("PDB.RESNUM",
+              "PDB Residue Numbering for " + this.pdbid + ":" + this.id,
+              an, (float) min, (float) max, AlignmentAnnotation.LINE_GRAPH));
     }
   }
 }
index 3800d07..6c3de37 100755 (executable)
@@ -360,8 +360,7 @@ public class PDBViewer extends JInternalFrame implements Runnable
             if (evt.isControlDown()
                     || SwingUtilities.isRightMouseButton(evt))
             {
-              radioItem
-                      .removeActionListener(radioItem.getActionListeners()[0]);
+              radioItem.removeActionListener(radioItem.getActionListeners()[0]);
 
               int option = JOptionPane.showInternalConfirmDialog(
                       jalview.gui.Desktop.desktop,
@@ -492,8 +491,8 @@ public class PDBViewer extends JInternalFrame implements Runnable
     else
     {
       im = new jalview.util.ImageMaker(this, jalview.util.ImageMaker.EPS,
-              "Make EPS file from view", width, height, null, this
-                      .getTitle());
+              "Make EPS file from view", width, height, null,
+              this.getTitle());
     }
 
     if (im.getGraphics() != null)
@@ -564,12 +563,13 @@ public class PDBViewer extends JInternalFrame implements Runnable
   public void mapping_actionPerformed(ActionEvent e)
   {
     jalview.gui.CutAndPasteTransfer cap = new jalview.gui.CutAndPasteTransfer();
-    try {
+    try
+    {
       cap.setText(pdbcanvas.mappingDetails.toString());
       Desktop.addInternalFrame(cap, "PDB - Sequence Mapping", 550, 600);
     } catch (OutOfMemoryError oom)
     {
-      new OOMWarning("Opening sequence to structure mapping report",oom);
+      new OOMWarning("Opening sequence to structure mapping report", oom);
       cap.dispose();
     }
   }
@@ -659,8 +659,8 @@ public class PDBViewer extends JInternalFrame implements Runnable
 
   public void savePDB_actionPerformed(ActionEvent e)
   {
-    JalviewFileChooser chooser = new JalviewFileChooser(jalview.bin.Cache
-            .getProperty("LAST_DIRECTORY"));
+    JalviewFileChooser chooser = new JalviewFileChooser(
+            jalview.bin.Cache.getProperty("LAST_DIRECTORY"));
 
     chooser.setFileView(new JalviewFileView());
     chooser.setDialogTitle("Save PDB File");
index ecbd9c5..7c80f57 100755 (executable)
@@ -95,9 +95,7 @@ public class JpredSoapBindingStub extends org.apache.axis.client.Stub
     oper.setReturnType(new javax.xml.namespace.QName(
             "http://simple.objects.vamsas", "JpredResult"));
     oper.setReturnClass(vamsas.objects.simple.JpredResult.class);
-    oper
-            .setReturnQName(new javax.xml.namespace.QName("",
-                    "getresultReturn"));
+    oper.setReturnQName(new javax.xml.namespace.QName("", "getresultReturn"));
     oper.setStyle(org.apache.axis.constants.Style.RPC);
     oper.setUse(org.apache.axis.constants.Use.ENCODED);
     _operations[3] = oper;
@@ -236,8 +234,7 @@ public class JpredSoapBindingStub extends org.apache.axis.client.Stub
         if (firstCall())
         {
           // must set encoding style before registering serializers
-          _call
-                  .setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
+          _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
           _call.setEncodingStyle(org.apache.axis.Constants.URI_SOAP11_ENC);
           for (int i = 0; i < cachedSerFactories.size(); ++i)
           {
@@ -271,8 +268,7 @@ public class JpredSoapBindingStub extends org.apache.axis.client.Stub
     _call.setOperation(_operations[0]);
     _call.setUseSOAPAction(true);
     _call.setSOAPActionURI("");
-    _call
-            .setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
+    _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
     _call.setOperationName(new javax.xml.namespace.QName("vamsas",
             "predict"));
 
@@ -311,8 +307,7 @@ public class JpredSoapBindingStub extends org.apache.axis.client.Stub
     _call.setOperation(_operations[1]);
     _call.setUseSOAPAction(true);
     _call.setSOAPActionURI("");
-    _call
-            .setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
+    _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
     _call.setOperationName(new javax.xml.namespace.QName("vamsas",
             "predictOnMsa"));
 
@@ -350,8 +345,7 @@ public class JpredSoapBindingStub extends org.apache.axis.client.Stub
     _call.setOperation(_operations[2]);
     _call.setUseSOAPAction(true);
     _call.setSOAPActionURI("");
-    _call
-            .setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
+    _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
     _call.setOperationName(new javax.xml.namespace.QName("vamsas",
             "getpredict"));
 
@@ -389,8 +383,7 @@ public class JpredSoapBindingStub extends org.apache.axis.client.Stub
     _call.setOperation(_operations[3]);
     _call.setUseSOAPAction(true);
     _call.setSOAPActionURI("");
-    _call
-            .setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
+    _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
     _call.setOperationName(new javax.xml.namespace.QName("vamsas",
             "getresult"));
 
index c8aa279..f732060 100755 (executable)
@@ -194,9 +194,7 @@ public class MuscleWSSoapBindingStub extends org.apache.axis.client.Stub
     oper.setReturnType(new javax.xml.namespace.QName(
             "simple.objects.vamsas", "Alignment"));
     oper.setReturnClass(vamsas.objects.simple.Alignment.class);
-    oper
-            .setReturnQName(new javax.xml.namespace.QName("",
-                    "getalignReturn"));
+    oper.setReturnQName(new javax.xml.namespace.QName("", "getalignReturn"));
     oper.setStyle(org.apache.axis.constants.Style.RPC);
     oper.setUse(org.apache.axis.constants.Use.ENCODED);
     _operations[1] = oper;
@@ -211,9 +209,7 @@ public class MuscleWSSoapBindingStub extends org.apache.axis.client.Stub
     oper.setReturnType(new javax.xml.namespace.QName(
             "simple.objects.vamsas", "MsaResult"));
     oper.setReturnClass(vamsas.objects.simple.MsaResult.class);
-    oper
-            .setReturnQName(new javax.xml.namespace.QName("",
-                    "getResultReturn"));
+    oper.setReturnQName(new javax.xml.namespace.QName("", "getResultReturn"));
     oper.setStyle(org.apache.axis.constants.Style.RPC);
     oper.setUse(org.apache.axis.constants.Use.ENCODED);
     _operations[2] = oper;
@@ -290,8 +286,7 @@ public class MuscleWSSoapBindingStub extends org.apache.axis.client.Stub
         if (firstCall())
         {
           // must set encoding style before registering serializers
-          _call
-                  .setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
+          _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
           _call.setEncodingStyle(org.apache.axis.Constants.URI_SOAP11_ENC);
 
           for (int i = 0; i < cachedSerFactories.size(); ++i)
@@ -329,11 +324,8 @@ public class MuscleWSSoapBindingStub extends org.apache.axis.client.Stub
     _call.setOperation(_operations[0]);
     _call.setUseSOAPAction(true);
     _call.setSOAPActionURI("");
-    _call
-            .setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
-    _call
-            .setOperationName(new javax.xml.namespace.QName("vamsas",
-                    "align"));
+    _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
+    _call.setOperationName(new javax.xml.namespace.QName("vamsas", "align"));
 
     setRequestHeaders(_call);
     setAttachments(_call);
@@ -372,8 +364,7 @@ public class MuscleWSSoapBindingStub extends org.apache.axis.client.Stub
     _call.setOperation(_operations[1]);
     _call.setUseSOAPAction(true);
     _call.setSOAPActionURI("");
-    _call
-            .setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
+    _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
     _call.setOperationName(new javax.xml.namespace.QName("vamsas",
             "getalign"));
 
@@ -414,8 +405,7 @@ public class MuscleWSSoapBindingStub extends org.apache.axis.client.Stub
     _call.setOperation(_operations[2]);
     _call.setUseSOAPAction(true);
     _call.setSOAPActionURI("");
-    _call
-            .setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
+    _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
     _call.setOperationName(new javax.xml.namespace.QName("vamsas",
             "getResult"));
 
@@ -456,11 +446,8 @@ public class MuscleWSSoapBindingStub extends org.apache.axis.client.Stub
     _call.setOperation(_operations[3]);
     _call.setUseSOAPAction(true);
     _call.setSOAPActionURI("");
-    _call
-            .setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
-    _call
-            .setOperationName(new javax.xml.namespace.QName("vamsas",
-                    "cancel"));
+    _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
+    _call.setOperationName(new javax.xml.namespace.QName("vamsas", "cancel"));
 
     setRequestHeaders(_call);
     setAttachments(_call);
index 5d977ad..7722d99 100755 (executable)
@@ -166,8 +166,7 @@ public class RegistryServiceSoapBindingStub extends
         if (firstCall())
         {
           // must set encoding style before registering serializers
-          _call
-                  .setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
+          _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
           _call.setEncodingStyle(org.apache.axis.Constants.URI_SOAP11_ENC);
           for (int i = 0; i < cachedSerFactories.size(); ++i)
           {
@@ -201,8 +200,7 @@ public class RegistryServiceSoapBindingStub extends
     _call.setOperation(_operations[0]);
     _call.setUseSOAPAction(true);
     _call.setSOAPActionURI("");
-    _call
-            .setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
+    _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
     _call.setOperationName(new javax.xml.namespace.QName("vamsas",
             "getServices"));
 
index 305caf9..9b918fd 100644 (file)
@@ -60,9 +60,7 @@ public class SeqSearchServiceSoapBindingStub extends
     oper.setReturnType(new javax.xml.namespace.QName(\r
             "simple.objects.vamsas", "SeqSearchResult"));\r
     oper.setReturnClass(vamsas.objects.simple.SeqSearchResult.class);\r
-    oper\r
-            .setReturnQName(new javax.xml.namespace.QName("",\r
-                    "getResultReturn"));\r
+    oper.setReturnQName(new javax.xml.namespace.QName("", "getResultReturn"));\r
     oper.setStyle(org.apache.axis.constants.Style.RPC);\r
     oper.setUse(org.apache.axis.constants.Use.ENCODED);\r
     _operations[1] = oper;\r
@@ -275,8 +273,7 @@ public class SeqSearchServiceSoapBindingStub extends
         if (firstCall())\r
         {\r
           // must set encoding style before registering serializers\r
-          _call\r
-                  .setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);\r
+          _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);\r
           _call.setEncodingStyle(org.apache.axis.Constants.URI_SOAP11_ENC);\r
           for (int i = 0; i < cachedSerFactories.size(); ++i)\r
           {\r
@@ -309,8 +306,7 @@ public class SeqSearchServiceSoapBindingStub extends
     _call.setOperation(_operations[0]);\r
     _call.setUseSOAPAction(true);\r
     _call.setSOAPActionURI("");\r
-    _call\r
-            .setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);\r
+    _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);\r
     _call.setOperationName(new javax.xml.namespace.QName("vamsas",\r
             "getDatabase"));\r
 \r
@@ -348,8 +344,7 @@ public class SeqSearchServiceSoapBindingStub extends
     _call.setOperation(_operations[1]);\r
     _call.setUseSOAPAction(true);\r
     _call.setSOAPActionURI("");\r
-    _call\r
-            .setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);\r
+    _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);\r
     _call.setOperationName(new javax.xml.namespace.QName("vamsas",\r
             "getResult"));\r
 \r
@@ -388,8 +383,7 @@ public class SeqSearchServiceSoapBindingStub extends
     _call.setOperation(_operations[2]);\r
     _call.setUseSOAPAction(true);\r
     _call.setSOAPActionURI("");\r
-    _call\r
-            .setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);\r
+    _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);\r
     _call.setOperationName(new javax.xml.namespace.QName("vamsas",\r
             "psearch"));\r
 \r
@@ -428,11 +422,8 @@ public class SeqSearchServiceSoapBindingStub extends
     _call.setOperation(_operations[3]);\r
     _call.setUseSOAPAction(true);\r
     _call.setSOAPActionURI("");\r
-    _call\r
-            .setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);\r
-    _call\r
-            .setOperationName(new javax.xml.namespace.QName("vamsas",\r
-                    "search"));\r
+    _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);\r
+    _call.setOperationName(new javax.xml.namespace.QName("vamsas", "search"));\r
 \r
     setRequestHeaders(_call);\r
     setAttachments(_call);\r
@@ -468,11 +459,8 @@ public class SeqSearchServiceSoapBindingStub extends
     _call.setOperation(_operations[4]);\r
     _call.setUseSOAPAction(true);\r
     _call.setSOAPActionURI("");\r
-    _call\r
-            .setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);\r
-    _call\r
-            .setOperationName(new javax.xml.namespace.QName("vamsas",\r
-                    "cancel"));\r
+    _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);\r
+    _call.setOperationName(new javax.xml.namespace.QName("vamsas", "cancel"));\r
 \r
     setRequestHeaders(_call);\r
     setAttachments(_call);\r
index 11e7a3d..4bff6ef 100755 (executable)
@@ -204,16 +204,20 @@ public class AAFrequency
           boolean includeAllConsSymbols, char[] alphabet)
   {
     float tval, value;
-    if (consensus==null || consensus.annotations==null || consensus.annotations.length<width)
+    if (consensus == null || consensus.annotations == null
+            || consensus.annotations.length < width)
     {
-      // called with a bad alignment annotation row - wait for it to be initialised properly
+      // called with a bad alignment annotation row - wait for it to be
+      // initialised properly
       return;
     }
     for (int i = iStart; i < width; i++)
     {
-      if (i>=hconsensus.length) {
-        // happens if sequences calculated over were shorter than alignment width
-        consensus.annotations[i]=null;
+      if (i >= hconsensus.length)
+      {
+        // happens if sequences calculated over were shorter than alignment
+        // width
+        consensus.annotations[i] = null;
         continue;
       }
       value = 0;
index fcb117c..28c6283 100755 (executable)
@@ -501,22 +501,23 @@ public class AlignSeq
     // TODO: Use original sequence characters rather than re-translated
     // characters in output
     // Find the biggest id length for formatting purposes
-    String s1id=s1.getName(),s2id=s2.getName();
+    String s1id = s1.getName(), s2id = s2.getName();
     int maxid = s1.getName().length();
     if (s2.getName().length() > maxid)
     {
       maxid = s2.getName().length();
     }
-    if (maxid>30) {
+    if (maxid > 30)
+    {
       maxid = 30;
       // JAL-527 - truncate the sequence ids
-      if (s1.getName().length()>maxid)
+      if (s1.getName().length() > maxid)
       {
-        s1id = s1.getName().substring(0,30);
+        s1id = s1.getName().substring(0, 30);
       }
-      if (s2.getName().length()>maxid)
+      if (s2.getName().length() > maxid)
       {
-        s2id = s2.getName().substring(0,30);
+        s2id = s2.getName().substring(0, 30);
       }
     }
     int len = 72 - maxid - 1;
@@ -537,8 +538,7 @@ public class AlignSeq
     for (int j = 0; j < nochunks; j++)
     {
       // Print the first aligned sequence
-      output.append(new Format("%" + (maxid) + "s").form(s1id)
-              + " ");
+      output.append(new Format("%" + (maxid) + "s").form(s1id) + " ");
 
       for (int i = 0; i < len; i++)
       {
index 0ea479d..158fe81 100755 (executable)
@@ -798,9 +798,8 @@ public class AlignmentSorter
         // filter for selection criteria
         if (
         // ignore features outwith alignment start-stop positions.
-        (sf[f].end < sstart || sf[f].begin > sstop)
-                ||
-                // or ignore based on selection criteria
+        (sf[f].end < sstart || sf[f].begin > sstop) ||
+        // or ignore based on selection criteria
                 (featureLabels != null && !AlignmentSorter
                         .containsIgnoreCase(sf[f].type, featureLabels))
                 || (groupLabels != null
index 1c14240..8682e8a 100644 (file)
@@ -66,12 +66,12 @@ public class CrossRef
   public static Hashtable classifyDbRefs(DBRefEntry[] rfs)\r
   {\r
     Hashtable classes = new Hashtable();\r
-    classes.put(DBRefSource.PROTEINDBS, jalview.util.DBRefUtils.selectRefs(\r
-            rfs, DBRefSource.PROTEINDBS));\r
+    classes.put(DBRefSource.PROTEINDBS,\r
+            jalview.util.DBRefUtils.selectRefs(rfs, DBRefSource.PROTEINDBS));\r
     classes.put(DBRefSource.DNACODINGDBS, jalview.util.DBRefUtils\r
             .selectRefs(rfs, DBRefSource.DNACODINGDBS));\r
-    classes.put(DBRefSource.DOMAINDBS, jalview.util.DBRefUtils.selectRefs(\r
-            rfs, DBRefSource.DOMAINDBS));\r
+    classes.put(DBRefSource.DOMAINDBS,\r
+            jalview.util.DBRefUtils.selectRefs(rfs, DBRefSource.DOMAINDBS));\r
     // classes.put(OTHER, )\r
     return classes;\r
   }\r
@@ -518,7 +518,7 @@ public class CrossRef
           }\r
           else\r
           {\r
-            poss = CrossRef.findXDbRefs(dna, poss); // \r
+            poss = CrossRef.findXDbRefs(dna, poss); //\r
             cands = jalview.util.DBRefUtils.searchRefs(poss, xrf);\r
           }\r
           if (cands != null)\r
index 2b753fe..482c54a 100644 (file)
@@ -559,8 +559,8 @@ public class Dna
     }\r
     if (resSize > 0)\r
     {\r
-      SequenceI newseq = new Sequence(selection.getName(), protein\r
-              .toString());\r
+      SequenceI newseq = new Sequence(selection.getName(),\r
+              protein.toString());\r
       if (rf != 0)\r
       {\r
         jalview.bin.Cache.log\r
@@ -655,7 +655,7 @@ public class Dna
       }\r
     }\r
     // register the mapping somehow\r
-    // \r
+    //\r
     return null;\r
   }\r
 \r
@@ -700,8 +700,7 @@ public class Dna
         fgstate = (featureGroups == null) ? null : ((Boolean) featureGroups\r
                 .get(sf[f].featureGroup));\r
         if ((featureTypes == null || featureTypes.containsKey(sf[f]\r
-                .getType()))\r
-                && (fgstate == null || fgstate.booleanValue()))\r
+                .getType())) && (fgstate == null || fgstate.booleanValue()))\r
         {\r
           if (FeatureProperties.isCodingFeature(null, sf[f].getType()))\r
           {\r
index c053cb3..ee782e7 100755 (executable)
@@ -740,8 +740,9 @@ public class NJTree
           {
             try
             {
-              score += pwmatrix.getPairwiseScore(sequenceString[i]
-                      .charAt(k), sequenceString[j].charAt(k));
+              score += pwmatrix.getPairwiseScore(
+                      sequenceString[i].charAt(k),
+                      sequenceString[j].charAt(k));
             } catch (Exception ex)
             {
               System.err.println("err creating BLOSUM62 tree");
index 4b20b07..9be0e3c 100755 (executable)
@@ -245,15 +245,11 @@ public class PCA implements Runnable
     details.append(" --- Eigenvalues ---\n");
     eigenvector.printD(ps);
     ps.println();
-    /*for (int seq=0;seq<symm.rows;seq++)
-    {
-      ps.print("\"Seq"+seq+"\"");
-      for (int ev=0;ev<symm.rows; ev++)
-      {
-        
-        ps.print(","+component(seq, ev));
-      }
-      ps.println(); 
-    }*/
+    /*
+     * for (int seq=0;seq<symm.rows;seq++) { ps.print("\"Seq"+seq+"\""); for
+     * (int ev=0;ev<symm.rows; ev++) {
+     * 
+     * ps.print(","+component(seq, ev)); } ps.println(); }
+     */
   }
 }
index a0d0f00..332f89f 100755 (executable)
@@ -74,8 +74,9 @@ public class SeqsetUtils
     sqinfo.put("SeqFeatures", sfeat);
     sqinfo.put("PdbId", (seq.getPDBId() != null) ? seq.getPDBId()
             : new Vector());
-    sqinfo.put("datasetSequence", (seq.getDatasetSequence() != null) ? seq
-            .getDatasetSequence() : new Sequence("THISISAPLACEHOLDER", ""));
+    sqinfo.put("datasetSequence",
+            (seq.getDatasetSequence() != null) ? seq.getDatasetSequence()
+                    : new Sequence("THISISAPLACEHOLDER", ""));
     return sqinfo;
   }
 
@@ -287,8 +288,8 @@ public class SeqsetUtils
     for (int i = 0, j = sequences.length; i < j; i++)
     {
       String tempseq = jalview.analysis.AlignSeq.extractGaps(
-              jalview.util.Comparison.GapChars, sequences[i]
-                      .getSequenceAsString());
+              jalview.util.Comparison.GapChars,
+              sequences[i].getSequenceAsString());
 
       if (tempseq.length() == 0)
       {
index 0fad3f8..14af09b 100644 (file)
@@ -23,8 +23,9 @@ import java.awt.Color;
 
 /**
  * Abstract feature renderer interface
+ * 
  * @author JimP
- *
+ * 
  */
 public interface FeatureRenderer
 {
index e95f047..f4c9345 100644 (file)
 package jalview.api;
 
 /**
- * methods for interacting with the binding between a structure visualization and one or more Jalview views.
- * @author JimP
- * prototype class - this may disappear !
+ * methods for interacting with the binding between a structure visualization
+ * and one or more Jalview views.
+ * 
+ * @author JimP prototype class - this may disappear !
  */
 public interface SequenceStructureBinding
 {
 
-  // todo: decide what this really means - we could return a reference to the alignment/jmol binding, or some other binding.
+  // todo: decide what this really means - we could return a reference to the
+  // alignment/jmol binding, or some other binding.
 }
index f4b3903..5288fe4 100755 (executable)
@@ -184,9 +184,9 @@ public class APopupMenu extends java.awt.PopupMenu implements
         {
 
           // collect matching db-refs
-          DBRefEntry[] dbr = jalview.util.DBRefUtils.selectRefs(seq
-                  .getDBRef(), new String[]
-          { target });
+          DBRefEntry[] dbr = jalview.util.DBRefUtils.selectRefs(
+                  seq.getDBRef(), new String[]
+                  { target });
           // collect id string too
           String id = seq.getName();
           String descr = seq.getDescription();
@@ -492,8 +492,8 @@ public class APopupMenu extends java.awt.PopupMenu implements
         {
           EditCommand editCommand = new EditCommand("Edit Sequences",
                   EditCommand.REPLACE, dialog.getName().replace(' ',
-                          ap.av.getGapCharacter()), sg
-                          .getSequencesAsArray(ap.av.hiddenRepSequences),
+                          ap.av.getGapCharacter()),
+                  sg.getSequencesAsArray(ap.av.hiddenRepSequences),
                   sg.getStartRes(), sg.getEndRes() + 1, ap.av.alignment);
 
           ap.alignFrame.addHistoryItem(editCommand);
@@ -630,19 +630,20 @@ public class APopupMenu extends java.awt.PopupMenu implements
 
     Frame frame = new Frame();
     frame.add(cap);
-    jalview.bin.JalviewLite.addFrame(frame, "Selection output - "
-            + e.getActionCommand(), 600, 500);
+    jalview.bin.JalviewLite.addFrame(frame,
+            "Selection output - " + e.getActionCommand(), 600, 500);
 
-    cap.setText(new jalview.io.AppletFormatAdapter().formatSequences(e
-            .getActionCommand(), new Alignment(ap.av
-            .getSelectionAsNewSequence()), ap.av.showJVSuffix));
+    cap.setText(new jalview.io.AppletFormatAdapter().formatSequences(
+            e.getActionCommand(),
+            new Alignment(ap.av.getSelectionAsNewSequence()),
+            ap.av.showJVSuffix));
 
   }
 
   void editName()
   {
-    EditNameDialog dialog = new EditNameDialog(seq.getName(), seq
-            .getDescription(), "       Sequence Name",
+    EditNameDialog dialog = new EditNameDialog(seq.getName(),
+            seq.getDescription(), "       Sequence Name",
             "Sequence Description", ap.alignFrame,
             "Edit Sequence Name / Description", 500, 100, true);
 
@@ -805,9 +806,9 @@ public class APopupMenu extends java.awt.PopupMenu implements
   protected void clustalColour_actionPerformed()
   {
     SequenceGroup sg = getGroup();
-    sg.cs = new ClustalxColourScheme(sg
-            .getSequences(ap.av.hiddenRepSequences), ap.av.alignment
-            .getWidth());
+    sg.cs = new ClustalxColourScheme(
+            sg.getSequences(ap.av.hiddenRepSequences),
+            ap.av.alignment.getWidth());
     refresh();
   }
 
@@ -869,9 +870,9 @@ public class APopupMenu extends java.awt.PopupMenu implements
 
     if (abovePIDColour.getState())
     {
-      sg.cs.setConsensus(AAFrequency.calculate(sg
-              .getSequences(ap.av.hiddenRepSequences), 0, ap.av.alignment
-              .getWidth()));
+      sg.cs.setConsensus(AAFrequency.calculate(
+              sg.getSequences(ap.av.hiddenRepSequences), 0,
+              ap.av.alignment.getWidth()));
       int threshold = SliderPanel.setPIDSliderSource(ap, sg.cs, getGroup()
               .getName());
 
@@ -899,9 +900,9 @@ public class APopupMenu extends java.awt.PopupMenu implements
   {
     SequenceGroup sg = getGroup();
     sg.cs = new PIDColourScheme();
-    sg.cs.setConsensus(AAFrequency.calculate(sg
-            .getSequences(ap.av.hiddenRepSequences), 0, ap.av.alignment
-            .getWidth()));
+    sg.cs.setConsensus(AAFrequency.calculate(
+            sg.getSequences(ap.av.hiddenRepSequences), 0,
+            ap.av.alignment.getWidth()));
     refresh();
   }
 
@@ -911,9 +912,9 @@ public class APopupMenu extends java.awt.PopupMenu implements
 
     sg.cs = new Blosum62ColourScheme();
 
-    sg.cs.setConsensus(AAFrequency.calculate(sg
-            .getSequences(ap.av.hiddenRepSequences), 0, ap.av.alignment
-            .getWidth()));
+    sg.cs.setConsensus(AAFrequency.calculate(
+            sg.getSequences(ap.av.hiddenRepSequences), 0,
+            ap.av.alignment.getWidth()));
 
     refresh();
   }
@@ -936,8 +937,8 @@ public class APopupMenu extends java.awt.PopupMenu implements
     {
 
       Conservation c = new Conservation("Group",
-              ResidueProperties.propHash, 3, sg
-                      .getSequences(ap.av.hiddenRepSequences), 0,
+              ResidueProperties.propHash, 3,
+              sg.getSequences(ap.av.hiddenRepSequences), 0,
               ap.av.alignment.getWidth());
 
       c.calculate();
index fce50fe..684d7a4 100755 (executable)
@@ -3200,55 +3200,30 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener,
    * @param viewer
    *          JmolViewer instance
    * @param sequenceIds
-   *          - sequence Ids to search for associations
-   * This method doesn't work. See http://issues.jalview.org/browse/JAL-621
+   *          - sequence Ids to search for associations This method doesn't
+   *          work. See http://issues.jalview.org/browse/JAL-621
    * 
-  public SequenceStructureBinding addStructureViewInstance(Object jmolviewer, String[] sequenceIds)
-  {
-    org.jmol.api.JmolViewer viewer=null;
-    try {
-      viewer = (org.jmol.api.JmolViewer) jmolviewer;
-    } 
-    catch (ClassCastException ex) {
-      System.err.println("Unsupported viewer object :"+jmolviewer.getClass());
-    }
-    if (viewer==null)
-    {
-      System.err.println("Can't use this object as a structure viewer:"+jmolviewer.getClass());
-      return null;
-    }
-    SequenceI[] seqs=null;
-    if (sequenceIds==null || sequenceIds.length==0)
-    {
-      seqs = viewport.getAlignment().getSequencesArray();
-    } else {
-      Vector sqi=new Vector();
-      AlignmentI al = viewport.getAlignment();
-      for (int sid=0;sid<sequenceIds.length;sid++) {
-        SequenceI sq = al.findName(sequenceIds[sid]);
-        if (sq!=null) {
-          sqi.addElement(sq);
-        }
-      }
-      if (sqi.size()>0) {
-        seqs = new SequenceI[sqi.size()];
-        for (int sid=0,sSize=sqi.size();sid<sSize;sid++)
-        {
-          seqs[sid] = (SequenceI) sqi.elementAt(sid);
-        }
-      } else {
-        return null;
-      }
-    }
-    ExtJmol jmv=null;
-    // TODO: search for a jmv that involves viewer
-    if (jmv==null){
-      // create a new viewer/jalview binding.
-      jmv = new ExtJmol(viewer, alignPanel, seqs);
-    }
-    return jmv;
-    
-  }
+   *          public SequenceStructureBinding addStructureViewInstance(Object
+   *          jmolviewer, String[] sequenceIds) { org.jmol.api.JmolViewer
+   *          viewer=null; try { viewer = (org.jmol.api.JmolViewer) jmolviewer;
+   *          } catch (ClassCastException ex) {
+   *          System.err.println("Unsupported viewer object :"
+   *          +jmolviewer.getClass()); } if (viewer==null) {
+   *          System.err.println("Can't use this object as a structure viewer:"
+   *          +jmolviewer.getClass()); return null; } SequenceI[] seqs=null; if
+   *          (sequenceIds==null || sequenceIds.length==0) { seqs =
+   *          viewport.getAlignment().getSequencesArray(); } else { Vector
+   *          sqi=new Vector(); AlignmentI al = viewport.getAlignment(); for
+   *          (int sid=0;sid<sequenceIds.length;sid++) { SequenceI sq =
+   *          al.findName(sequenceIds[sid]); if (sq!=null) { sqi.addElement(sq);
+   *          } } if (sqi.size()>0) { seqs = new SequenceI[sqi.size()]; for (int
+   *          sid=0,sSize=sqi.size();sid<sSize;sid++) { seqs[sid] = (SequenceI)
+   *          sqi.elementAt(sid); } } else { return null; } } ExtJmol jmv=null;
+   *          // TODO: search for a jmv that involves viewer if (jmv==null){ //
+   *          create a new viewer/jalview binding. jmv = new ExtJmol(viewer,
+   *          alignPanel, seqs); } return jmv;
+   * 
+   *          }
    **/
   public boolean addPdbFile(String sequenceId, String pdbEntryString,
           String pdbFile)
@@ -3292,14 +3267,17 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener,
       if (needtoadd)
       {
         // make a note of the access mode and add
-        if (pdbentry.getProperty()==null)
-          {pdbentry.setProperty(new Hashtable());}
+        if (pdbentry.getProperty() == null)
+        {
+          pdbentry.setProperty(new Hashtable());
+        }
         pdbentry.getProperty().put("protocol", protocol);
         toaddpdb.addPDBId(pdbentry);
       }
     }
     return true;
   }
+
   private Object[] cleanSeqChainArrays(SequenceI[] seqs, String[] chains)
   {
     if (seqs != null)
@@ -3309,7 +3287,8 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener,
       {
         if (seqs[i] != null)
         {
-          sequences.addElement(new Object[] { seqs[i], (chains!=null) ? chains[i] : null});
+          sequences.addElement(new Object[]
+          { seqs[i], (chains != null) ? chains[i] : null });
         }
       }
       seqs = new SequenceI[sequences.size()];
@@ -3322,9 +3301,11 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener,
         chains[i] = (String) oj[1];
       }
     }
-    return new Object[] { seqs, chains};
+    return new Object[]
+    { seqs, chains };
 
   }
+
   public void newStructureView(JalviewLite applet, PDBEntry pdb,
           SequenceI[] seqs, String[] chains, String protocol)
   {
@@ -3364,9 +3345,10 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener,
           break;
         }
       }
-      if (ajm!=null)
+      if (ajm != null)
       {
-        System.err.println("Incremental adding and aligning structure to existing Jmol view not yet implemented.");
+        System.err
+                .println("Incremental adding and aligning structure to existing Jmol view not yet implemented.");
         // try and add the pdb structure
         // ajm.addS
         ajm = null;
index fb77cf3..804b590 100755 (executable)
@@ -378,8 +378,8 @@ public class AlignViewport
         }
 
         Conservation cons = new jalview.analysis.Conservation("All",
-                jalview.schemes.ResidueProperties.propHash, 3, alignment
-                        .getSequences(), 0, alWidth - 1);
+                jalview.schemes.ResidueProperties.propHash, 3,
+                alignment.getSequences(), 0, alWidth - 1);
 
         cons.calculate();
         cons.verdict(false, ConsPercGaps);
@@ -454,10 +454,10 @@ public class AlignViewport
             value = ((Double) cons.quality.elementAt(i)).floatValue();
             vprop = value - qmin;
             vprop /= qmax;
-            quality.annotations[i] = new Annotation(" ", String
-                    .valueOf(value), ' ', value, new Color(minR
-                    + (maxR * vprop), minG + (maxG * vprop), minB
-                    + (maxB * vprop)));
+            quality.annotations[i] = new Annotation(" ",
+                    String.valueOf(value), ' ', value, new Color(minR
+                            + (maxR * vprop), minG + (maxG * vprop), minB
+                            + (maxB * vprop)));
           }
         }
       } catch (OutOfMemoryError error)
@@ -558,8 +558,9 @@ public class AlignViewport
         consensus.annotations = new Annotation[aWidth];
 
         hconsensus = new Hashtable[aWidth];
-        AAFrequency.calculate(alignment.getSequencesArray(), 0, alignment
-                .getWidth(), hconsensus, true); // always calculate the full profile
+        AAFrequency.calculate(alignment.getSequencesArray(), 0,
+                alignment.getWidth(), hconsensus, true); // always calculate the
+                                                         // full profile
         AAFrequency.completeConsensus(consensus, hconsensus, 0, aWidth,
                 ignoreGapsInConsensusCalculation,
                 includeAllConsensusSymbols);
@@ -1506,8 +1507,8 @@ public class AlignViewport
       {
         Alignment al = (Alignment) alignment;
         Conservation c = new Conservation("All",
-                ResidueProperties.propHash, 3, al.getSequences(), 0, al
-                        .getWidth() - 1);
+                ResidueProperties.propHash, 3, al.getSequences(), 0,
+                al.getWidth() - 1);
         c.calculate();
         c.verdict(false, ConsPercGaps);
 
@@ -1521,8 +1522,8 @@ public class AlignViewport
       SequenceGroup sg = (SequenceGroup) alignment.getGroups().elementAt(s);
       if (sg.cs != null && sg.cs instanceof ClustalxColourScheme)
       {
-        ((ClustalxColourScheme) sg.cs).resetClustalX(sg
-                .getSequences(hiddenRepSequences), sg.getWidth());
+        ((ClustalxColourScheme) sg.cs).resetClustalX(
+                sg.getSequences(hiddenRepSequences), sg.getWidth());
       }
       sg.recalcConservation();
     }
index 15b2198..6d4c63b 100755 (executable)
@@ -418,8 +418,7 @@ public class AlignmentPanel extends Panel implements AdjustmentListener
     }
 
     av.setStartRes(x);
-    av
-            .setEndRes((x + (seqPanel.seqCanvas.getSize().width / av.charWidth)) - 1);
+    av.setEndRes((x + (seqPanel.seqCanvas.getSize().width / av.charWidth)) - 1);
 
     hextent = seqPanel.seqCanvas.getSize().width / av.charWidth;
     vextent = seqPanel.seqCanvas.getSize().height / av.charHeight;
index 0c8df06..41c20bd 100755 (executable)
@@ -382,13 +382,14 @@ public class AnnotationColourChooser extends Panel implements
     AnnotationColourGradient acg = null;
     if (currentColours.getState())
     {
-      acg = new AnnotationColourGradient(currentAnnotation, av
-              .getGlobalColourScheme(), aboveThreshold);
+      acg = new AnnotationColourGradient(currentAnnotation,
+              av.getGlobalColourScheme(), aboveThreshold);
     }
     else
     {
-      acg = new AnnotationColourGradient(currentAnnotation, minColour
-              .getBackground(), maxColour.getBackground(), aboveThreshold);
+      acg = new AnnotationColourGradient(currentAnnotation,
+              minColour.getBackground(), maxColour.getBackground(),
+              aboveThreshold);
     }
 
     if (currentAnnotation.graphMin == 0f
@@ -421,8 +422,8 @@ public class AnnotationColourChooser extends Panel implements
         }
         else
         {
-          sg.cs = new AnnotationColourGradient(currentAnnotation, minColour
-                  .getBackground(), maxColour.getBackground(),
+          sg.cs = new AnnotationColourGradient(currentAnnotation,
+                  minColour.getBackground(), maxColour.getBackground(),
                   aboveThreshold);
         }
 
index 8a377cc..ebc4ebb 100755 (executable)
@@ -82,7 +82,8 @@ public class AnnotationLabels extends Panel implements ActionListener,
   /**
    * 
    * @param y
-   * @return -2 if no rows are visible at all, -1 if no visible rows were selected
+   * @return -2 if no rows are visible at all, -1 if no visible rows were
+   *         selected
    */
   int getSelectedRow(int y)
   {
@@ -207,8 +208,10 @@ public class AnnotationLabels extends Panel implements ActionListener,
     {
       if (tooltip == null)
       {
-        tooltip = new Tooltip(ap.av.alignment.getAlignmentAnnotation()[row]
-                .getDescription(true), this);
+        tooltip = new Tooltip(
+                ap.av.alignment.getAlignmentAnnotation()[row]
+                        .getDescription(true),
+                this);
       }
       else
       {
@@ -254,14 +257,14 @@ public class AnnotationLabels extends Panel implements ActionListener,
     MenuItem item = new MenuItem(ADDNEW);
     item.addActionListener(this);
     popup.add(item);
-    if (selectedRow<0)
+    if (selectedRow < 0)
     {
-      // this never happens at moment: - see comment on JAL-563 
+      // this never happens at moment: - see comment on JAL-563
       if (hasHiddenRows)
       {
-         item = new MenuItem(SHOWALL);
-         item.addActionListener(this);
-         popup.add(item);
+        item = new MenuItem(SHOWALL);
+        item.addActionListener(this);
+        popup.add(item);
       }
       this.add(popup);
       popup.show(this, evt.getX(), evt.getY());
@@ -274,7 +277,8 @@ public class AnnotationLabels extends Panel implements ActionListener,
     item = new MenuItem(HIDE);
     item.addActionListener(this);
     popup.add(item);
-    if (hasHiddenRows) {
+    if (hasHiddenRows)
+    {
       item = new MenuItem(SHOWALL);
       item.addActionListener(this);
       popup.add(item);
@@ -367,26 +371,26 @@ public class AnnotationLabels extends Panel implements ActionListener,
     g.setColor(Color.black);
 
     AlignmentAnnotation[] aa = av.alignment.getAlignmentAnnotation();
-    int y = 0, fy=g.getFont().getSize();
+    int y = 0, fy = g.getFont().getSize();
     int x = 0, offset;
 
     if (aa != null)
     {
-      hasHiddenRows=false;
+      hasHiddenRows = false;
       for (int i = 0; i < aa.length; i++)
       {
         if (!aa[i].visible)
         {
-          hasHiddenRows=true;
+          hasHiddenRows = true;
           continue;
         }
 
         x = width - fm.stringWidth(aa[i].label) - 3;
 
         y += aa[i].height;
-        offset = -(aa[i].height-fy)/2;
+        offset = -(aa[i].height - fy) / 2;
 
-        g.drawString(aa[i].label, x, y+offset);
+        g.drawString(aa[i].label, x, y + offset);
       }
     }
   }
index fdd727f..c3f17f9 100755 (executable)
@@ -104,7 +104,7 @@ public class AnnotationPanel extends Panel implements AdjustmentListener,
   public void actionPerformed(ActionEvent evt)
   {
     AlignmentAnnotation[] aa = av.alignment.getAlignmentAnnotation();
-    if (aa==null)
+    if (aa == null)
     {
       return;
     }
@@ -329,7 +329,7 @@ public class AnnotationPanel extends Panel implements AdjustmentListener,
     if (needValidating)
     {
       ap.validate();
-      needValidating=false;
+      needValidating = false;
     }
     ap.scalePanel.mouseReleased(evt);
   }
@@ -337,7 +337,9 @@ public class AnnotationPanel extends Panel implements AdjustmentListener,
   public void mouseClicked(MouseEvent evt)
   {
   }
-  boolean needValidating=false;
+
+  boolean needValidating = false;
+
   public void mouseDragged(MouseEvent evt)
   {
     if (graphStretch > -1)
@@ -350,7 +352,7 @@ public class AnnotationPanel extends Panel implements AdjustmentListener,
       }
       graphStretchY = evt.getY();
       adjustPanelHeight();
-      needValidating=true;
+      needValidating = true;
       ap.paintAlignment(true);
     }
     else
@@ -453,7 +455,7 @@ public class AnnotationPanel extends Panel implements AdjustmentListener,
         height += aa[i].height;
       }
     }
-    if (height==0)
+    if (height == 0)
     {
       height = 20;
     }
@@ -697,9 +699,7 @@ public class AnnotationPanel extends Panel implements AdjustmentListener,
 
               if (v == column)
               {
-                g
-                        .fillRect(x * av.charWidth, y, av.charWidth,
-                                av.charHeight);
+                g.fillRect(x * av.charWidth, y, av.charWidth, av.charHeight);
               }
             }
           }
@@ -877,9 +877,7 @@ public class AnnotationPanel extends Panel implements AdjustmentListener,
           if (sCol == 0 || row.annotations[sCol - 1] == null
                   || row.annotations[sCol - 1].secondaryStructure != 'H')
           {
-            g
-                    .fillArc(lastSSX, y + 4 + iconOffset, av.charWidth, 8,
-                            90, 180);
+            g.fillArc(lastSSX, y + 4 + iconOffset, av.charWidth, 8, 90, 180);
             x1 += av.charWidth / 2;
           }
 
index 55df194..42e6f56 100644 (file)
@@ -98,25 +98,41 @@ public class AppletJmol extends EmbmenuFrame implements
    * datasource protocol for access to PDBEntry
    */
   String protocol = null;
+
   /**
-   * Load a bunch of pdb entries associated with sequences in the alignment and display them - aligning them if necessary.
-   * @param pdbentries each pdb file (at least one needed)
-   * @param boundseqs each set of sequences for each pdb file (must match number of pdb files)
-   * @param boundchains the target pdb chain corresponding with each sequence associated with each pdb file (may be null at any level)
-   * @param align true/false
-   * @param ap associated alignment
-   * @param protocol how to get pdb data
+   * Load a bunch of pdb entries associated with sequences in the alignment and
+   * display them - aligning them if necessary.
+   * 
+   * @param pdbentries
+   *          each pdb file (at least one needed)
+   * @param boundseqs
+   *          each set of sequences for each pdb file (must match number of pdb
+   *          files)
+   * @param boundchains
+   *          the target pdb chain corresponding with each sequence associated
+   *          with each pdb file (may be null at any level)
+   * @param align
+   *          true/false
+   * @param ap
+   *          associated alignment
+   * @param protocol
+   *          how to get pdb data
    */
-  public AppletJmol(PDBEntry[] pdbentries, SequenceI[][] boundseqs, String[][] boundchains, boolean align, AlignmentPanel ap, String protocol)
+  public AppletJmol(PDBEntry[] pdbentries, SequenceI[][] boundseqs,
+          String[][] boundchains, boolean align, AlignmentPanel ap,
+          String protocol)
   {
     throw new Error("Not yet implemented.");
   }
+
   public AppletJmol(PDBEntry pdbentry, SequenceI[] seq, String[] chains,
           AlignmentPanel ap, String protocol)
   {
     this.ap = ap;
     jmb = new AppletJmolBinding(this, new PDBEntry[]
-    { pdbentry }, new SequenceI[][]{seq}, new String[][]{ chains }, protocol);
+    { pdbentry }, new SequenceI[][]
+    { seq }, new String[][]
+    { chains }, protocol);
     jmb.setColourBySequence(true);
     if (pdbentry.getId() == null || pdbentry.getId().length() < 1)
     {
@@ -194,12 +210,12 @@ public class AppletJmol extends EmbmenuFrame implements
     scriptWindow = new Panel();
     scriptWindow.setVisible(false);
     // this.add(scriptWindow, BorderLayout.SOUTH);
-    
+
     try
     {
-      jmb.allocateViewer(renderPanel, true, ap.av.applet.getName()+"_jmol_",
-              ap.av.applet.getDocumentBase(), ap.av.applet.getCodeBase(),
-              "-applet", scriptWindow, null);
+      jmb.allocateViewer(renderPanel, true, ap.av.applet.getName()
+              + "_jmol_", ap.av.applet.getDocumentBase(),
+              ap.av.applet.getCodeBase(), "-applet", scriptWindow, null);
     } catch (Exception e)
     {
       System.err
@@ -220,7 +236,7 @@ public class AppletJmol extends EmbmenuFrame implements
         closeViewer();
       }
     });
-    if (pdbentry.getProperty()==null)
+    if (pdbentry.getProperty() == null)
     {
       pdbentry.setProperty(new Hashtable());
       pdbentry.getProperty().put("protocol", protocol);
@@ -359,19 +375,21 @@ public class AppletJmol extends EmbmenuFrame implements
       frame.add(cap);
 
       StringBuffer sb = new StringBuffer();
-      try {
-      for (int s = 0; s < jmb.pdbentry.length; s++)
+      try
       {
-        sb.append(StructureSelectionManager.getStructureSelectionManager()
-                .printMapping(jmb.pdbentry[s].getFile()));
-        sb.append("\n");
-      }
-      cap.setText(sb.toString());
-      }
-      catch (OutOfMemoryError ex)
+        for (int s = 0; s < jmb.pdbentry.length; s++)
+        {
+          sb.append(StructureSelectionManager
+                  .getStructureSelectionManager().printMapping(
+                          jmb.pdbentry[s].getFile()));
+          sb.append("\n");
+        }
+        cap.setText(sb.toString());
+      } catch (OutOfMemoryError ex)
       {
         frame.dispose();
-        System.err.println("Out of memory when trying to create dialog box with sequence-structure mapping.");
+        System.err
+                .println("Out of memory when trying to create dialog box with sequence-structure mapping.");
         return;
       }
       jalview.bin.JalviewLite.addFrame(frame, "PDB - Sequence Mapping",
@@ -525,26 +543,30 @@ public class AppletJmol extends EmbmenuFrame implements
     {
     }
   }
-  Panel splitPane=null;
+
+  Panel splitPane = null;
+
   public void showConsole(boolean showConsole)
   {
     if (showConsole)
     {
       remove(renderPanel);
       splitPane = new Panel();
-      
-      splitPane.setLayout(new java.awt.GridLayout(2,1));
+
+      splitPane.setLayout(new java.awt.GridLayout(2, 1));
       splitPane.add(renderPanel);
       splitPane.add(scriptWindow);
       scriptWindow.setVisible(true);
       this.add(splitPane, BorderLayout.CENTER);
       splitPane.setVisible(true);
       splitPane.validate();
-    } else {
+    }
+    else
+    {
       scriptWindow.setVisible(false);
       remove(splitPane);
       add(renderPanel, BorderLayout.CENTER);
-      splitPane=null;
+      splitPane = null;
     }
     validate();
   }
index 7490edc..009cefd 100644 (file)
@@ -36,8 +36,8 @@ class AppletJmolBinding extends jalview.ext.jmol.JalviewJmolBinding
    */
   private AppletJmol appletJmolBinding;
 
-  public AppletJmolBinding(AppletJmol appletJmol, PDBEntry[] pdbentry, SequenceI[][] seq,
-          String[][] chains, String protocol)
+  public AppletJmolBinding(AppletJmol appletJmol, PDBEntry[] pdbentry,
+          SequenceI[][] seq, String[][] chains, String protocol)
   {
     super(pdbentry, seq, chains, protocol);
     appletJmolBinding = appletJmol;
@@ -49,10 +49,13 @@ class AppletJmolBinding extends jalview.ext.jmol.JalviewJmolBinding
     {
       if (appletJmolBinding.fr == null)
       {
-        appletJmolBinding.fr = new jalview.appletgui.FeatureRenderer(appletJmolBinding.ap.av);
+        appletJmolBinding.fr = new jalview.appletgui.FeatureRenderer(
+                appletJmolBinding.ap.av);
       }
 
-      appletJmolBinding.fr.transferSettings(appletJmolBinding.ap.seqPanel.seqCanvas.getFeatureRenderer());
+      appletJmolBinding.fr
+              .transferSettings(appletJmolBinding.ap.seqPanel.seqCanvas
+                      .getFeatureRenderer());
     }
 
     return appletJmolBinding.fr;
@@ -90,7 +93,7 @@ class AppletJmolBinding extends jalview.ext.jmol.JalviewJmolBinding
   {
     appletJmolBinding.updateTitleAndMenus();
   }
-  
+
   public void updateColours(Object source)
   {
     AlignmentPanel ap = (AlignmentPanel) source;
@@ -101,17 +104,19 @@ class AppletJmolBinding extends jalview.ext.jmol.JalviewJmolBinding
   {
     try
     {
-      appletJmolBinding.ap.av.applet.getAppletContext().showDocument(new java.net.URL(url),
-              "jmol");
+      appletJmolBinding.ap.av.applet.getAppletContext().showDocument(
+              new java.net.URL(url), "jmol");
     } catch (java.net.MalformedURLException ex)
     {
     }
   }
 
-  public void newJmolPopup(boolean translateLocale, String menuName, boolean asPopup)
+  public void newJmolPopup(boolean translateLocale, String menuName,
+          boolean asPopup)
   {
-    
-    jmolpopup = JmolPopup.newJmolPopup(viewer,translateLocale, menuName,asPopup);
+
+    jmolpopup = JmolPopup.newJmolPopup(viewer, translateLocale, menuName,
+            asPopup);
   }
 
   public void notifyScriptTermination(String strStatus, int msWalltime)
@@ -122,13 +127,13 @@ class AppletJmolBinding extends jalview.ext.jmol.JalviewJmolBinding
   public void selectionChanged(BitSet arg0)
   {
     // TODO Auto-generated method stub
-    
+
   }
 
   public void refreshPdbEntries()
   {
     // TODO Auto-generated method stub
-    
+
   }
 
   @Override
@@ -143,17 +148,25 @@ class AppletJmolBinding extends jalview.ext.jmol.JalviewJmolBinding
   {
     return new AppletConsole(viewer2, consolePanel);
   }
+
   @Override
   protected void releaseUIResources()
   {
     appletJmolBinding = null;
-    if (console!=null) {
-      try {
+    if (console != null)
+    {
+      try
+      {
         console.setVisible(false);
-      } catch (Error e) {} catch (Exception x) {};
-      console=null;
+      } catch (Error e)
+      {
+      } catch (Exception x)
+      {
+      }
+      ;
+      console = null;
     }
-    
+
   }
 
 }
index f9e4ac1..c09784e 100755 (executable)
@@ -139,8 +139,8 @@ public class CutAndPasteTransfer extends Panel implements ActionListener,
     {
       try
       {
-        jalview.io.NewickFile fin = new jalview.io.NewickFile(textarea
-                .getText(), "Paste");
+        jalview.io.NewickFile fin = new jalview.io.NewickFile(
+                textarea.getText(), "Paste");
 
         fin.parse();
         if (fin.getTree() != null)
index a854c6c..d3dad58 100644 (file)
@@ -33,15 +33,17 @@ import jalview.ext.jmol.JalviewJmolBinding;
 
 /**
  * bind an alignment view to an external Jmol instance.
+ * 
  * @author JimP
- *
+ * 
  */
 public class ExtJmol extends JalviewJmolBinding
 {
 
   private AlignmentPanel ap;
 
-  protected ExtJmol(jalview.appletgui.AlignFrame alframe, PDBEntry[] pdbentry, SequenceI[][] seq, String[][] chains,
+  protected ExtJmol(jalview.appletgui.AlignFrame alframe,
+          PDBEntry[] pdbentry, SequenceI[][] seq, String[][] chains,
           String protocol)
   {
     super(pdbentry, seq, chains, protocol);
@@ -58,7 +60,7 @@ public class ExtJmol extends JalviewJmolBinding
 
   public void updateColours(Object source)
   {
-    
+
     // TODO Auto-generated method stub
 
   }
@@ -120,22 +122,23 @@ public class ExtJmol extends JalviewJmolBinding
     Vector pdbe = new Vector();
     Hashtable fileids = new Hashtable();
     SequenceI[] sq = ap.av.getAlignment().getSequencesArray();
-    for (int s=0;s<sq.length;s++)
+    for (int s = 0; s < sq.length; s++)
     {
       Vector pdbids = sq[s].getPDBId();
-      if (pdbids!=null)
+      if (pdbids != null)
       {
-        for (int pe=0,peSize=pdbids.size(); pe<peSize; pe++)
+        for (int pe = 0, peSize = pdbids.size(); pe < peSize; pe++)
         {
           PDBEntry pentry = (PDBEntry) pdbids.elementAt(pe);
-          if (!fileids.containsKey(pentry.getId())) {
+          if (!fileids.containsKey(pentry.getId()))
+          {
             pdbe.addElement(pentry);
           }
         }
       }
     }
     pdbentry = new PDBEntry[pdbe.size()];
-    for (int pe=0;pe<pdbe.size(); pe++)
+    for (int pe = 0; pe < pdbe.size(); pe++)
     {
       pdbentry[pe] = (PDBEntry) pdbe.elementAt(pe);
     }
@@ -144,8 +147,11 @@ public class ExtJmol extends JalviewJmolBinding
   @Override
   public void showConsole(boolean show)
   {
-    // This never gets called because we haven't overriden the associated Jmol's console
-    System.err.println("WARNING: unexpected call to ExtJmol's showConsole method. (showConsole="+show);
+    // This never gets called because we haven't overriden the associated Jmol's
+    // console
+    System.err
+            .println("WARNING: unexpected call to ExtJmol's showConsole method. (showConsole="
+                    + show);
   }
 
   @Override
@@ -155,17 +161,25 @@ public class ExtJmol extends JalviewJmolBinding
     // TODO Auto-generated method stub
     return null;
   }
+
   @Override
   protected void releaseUIResources()
   {
     ap = null;
-    if (console!=null) {
-      try {
+    if (console != null)
+    {
+      try
+      {
         console.setVisible(false);
-      } catch (Error e) {} catch (Exception x) {};
-      console=null;
+      } catch (Error e)
+      {
+      } catch (Exception x)
+      {
+      }
+      ;
+      console = null;
     }
-    
+
   }
 
 }
index bcee04c..69f667a 100644 (file)
@@ -287,8 +287,9 @@ public class FeatureColourChooser extends Panel implements ActionListener,
   {
     if (newCol == null)
     {
-      UserDefinedColours udc = new UserDefinedColours(this, minColour
-              .getBackground(), owner, "Select Colour for Minimum Value"); // frame.owner,
+      UserDefinedColours udc = new UserDefinedColours(this,
+              minColour.getBackground(), owner,
+              "Select Colour for Minimum Value"); // frame.owner,
     }
     else
     {
@@ -307,8 +308,9 @@ public class FeatureColourChooser extends Panel implements ActionListener,
 
       // UserDefinedColours udc = new UserDefinedColours(this,
       // "Select Colour for Maximum Value",maxColour.getBackground(),true);
-      UserDefinedColours udc = new UserDefinedColours(this, maxColour
-              .getBackground(), owner, "Select Colour for Maximum Value");
+      UserDefinedColours udc = new UserDefinedColours(this,
+              maxColour.getBackground(), owner,
+              "Select Colour for Maximum Value");
     }
     else
     {
index d2712b8..6e9da1a 100755 (executable)
@@ -661,16 +661,16 @@ public class FeatureRenderer implements jalview.api.FeatureRenderer
         else if (sequenceFeatures[sfindex].type.equals("disulfide bond"))
         {
 
-          renderFeature(g, seq, seq
-                  .findIndex(sequenceFeatures[sfindex].begin) - 1, seq
-                  .findIndex(sequenceFeatures[sfindex].begin) - 1,
+          renderFeature(g, seq,
+                  seq.findIndex(sequenceFeatures[sfindex].begin) - 1,
+                  seq.findIndex(sequenceFeatures[sfindex].begin) - 1,
                   getColour(sequenceFeatures[sfindex])
                   // new Color(((Integer) av.featuresDisplayed
                   // .get(sequenceFeatures[sfindex].type)).intValue())
                   , start, end, y1);
-          renderFeature(g, seq, seq
-                  .findIndex(sequenceFeatures[sfindex].end) - 1, seq
-                  .findIndex(sequenceFeatures[sfindex].end) - 1,
+          renderFeature(g, seq,
+                  seq.findIndex(sequenceFeatures[sfindex].end) - 1,
+                  seq.findIndex(sequenceFeatures[sfindex].end) - 1,
                   getColour(sequenceFeatures[sfindex])
                   // new Color(((Integer) av.featuresDisplayed
                   // .get(sequenceFeatures[sfindex].type)).intValue())
@@ -681,9 +681,9 @@ public class FeatureRenderer implements jalview.api.FeatureRenderer
         {
           if (showFeature(sequenceFeatures[sfindex]))
           {
-            renderFeature(g, seq, seq
-                    .findIndex(sequenceFeatures[sfindex].begin) - 1, seq
-                    .findIndex(sequenceFeatures[sfindex].end) - 1,
+            renderFeature(g, seq,
+                    seq.findIndex(sequenceFeatures[sfindex].begin) - 1,
+                    seq.findIndex(sequenceFeatures[sfindex].end) - 1,
                     getColour(sequenceFeatures[sfindex]), start, end, y1);
           }
         }
@@ -747,6 +747,7 @@ public class FeatureRenderer implements jalview.api.FeatureRenderer
   }
 
   Hashtable minmax = null;
+
   /**
    * Called when alignment in associated view has new/modified features to
    * discover and display.
@@ -757,6 +758,7 @@ public class FeatureRenderer implements jalview.api.FeatureRenderer
     lastSeq = null;
     findAllFeatures();
   }
+
   /**
    * find all features on the alignment
    */
@@ -790,8 +792,8 @@ public class FeatureRenderer implements jalview.api.FeatureRenderer
         {
           if (getColour(features[index].getType()) == null)
           {
-            featureColours.put(features[index].getType(), ucs
-                    .createColourFromName(features[index].getType()));
+            featureColours.put(features[index].getType(),
+                    ucs.createColourFromName(features[index].getType()));
           }
 
           av.featuresDisplayed.put(features[index].getType(), new Integer(
index d664cad..fb8b37c 100755 (executable)
@@ -445,8 +445,8 @@ public class FeatureSettings extends Panel implements ItemListener,
       Checkbox source = (Checkbox) evt.getSource();
       if (fr.featureGroups.containsKey(source.getLabel()))
       {
-        fr.featureGroups.put(source.getLabel(), new Boolean(source
-                .getState()));
+        fr.featureGroups.put(source.getLabel(),
+                new Boolean(source.getState()));
         ap.seqPanel.seqCanvas.repaint();
         if (ap.overviewPanel != null)
         {
@@ -608,8 +608,8 @@ public class FeatureSettings extends Panel implements ItemListener,
       {
         evt.consume();
         String link = fr.featureLinks.get(check.type).toString();
-        ap.alignFrame.showURL(link.substring(link.indexOf("|") + 1), link
-                .substring(0, link.indexOf("|")));
+        ap.alignFrame.showURL(link.substring(link.indexOf("|") + 1),
+                link.substring(0, link.indexOf("|")));
       }
     }
 
index 4ca59c9..eef4b62 100755 (executable)
@@ -121,8 +121,8 @@ public class Finder extends Panel implements ActionListener
       av = ap.av;
     }
     createNewGroup.setEnabled(false);
-    jalview.analysis.Finder finder = new jalview.analysis.Finder(av
-            .getAlignment(), av.getSelectionGroup(), seqIndex, resIndex);
+    jalview.analysis.Finder finder = new jalview.analysis.Finder(
+            av.getAlignment(), av.getSelectionGroup(), seqIndex, resIndex);
     finder.setCaseSensitive(caseSensitive.getState());
     finder.setFindAll(findAll);
 
index b1a9a36..a7a20ed 100755 (executable)
@@ -75,8 +75,7 @@ public class IdPanel extends Panel implements MouseListener,
     if (links.size() < 1)
     {
       links = new java.util.Vector();
-      links
-              .addElement("SRS|http://srs.ebi.ac.uk/srsbin/cgi-bin/wgetz?-newId+(([uniprot-all:$SEQUENCE_ID$]))+-view+SwissEntry");
+      links.addElement("SRS|http://srs.ebi.ac.uk/srsbin/cgi-bin/wgetz?-newId+(([uniprot-all:$SEQUENCE_ID$]))+-view+SwissEntry");
     }
   }
 
index 65913ff..d740625 100755 (executable)
@@ -388,8 +388,7 @@ public class OverviewPanel extends Panel implements Runnable,
   {
     int fullsizeWidth = av.alignment.getWidth() * av.getCharWidth();
     int fullsizeHeight = (av.alignment.getHeight() + av.alignment
-            .getHiddenSequences().getSize())
-            * av.getCharHeight();
+            .getHiddenSequences().getSize()) * av.getCharHeight();
 
     int startRes = av.getStartRes();
     int endRes = av.getEndRes();
index 4efa701..4872aad 100755 (executable)
@@ -396,8 +396,8 @@ public class RotatableCanvas extends Panel implements MouseListener,
 
       if (av.getSelectionGroup() != null)
       {
-        if (av.getSelectionGroup().getSequences(null).contains(
-                ((SequencePoint) points.elementAt(i)).sequence))
+        if (av.getSelectionGroup().getSequences(null)
+                .contains(((SequencePoint) points.elementAt(i)).sequence))
         {
           g.setColor(Color.gray);
         }
@@ -411,8 +411,9 @@ public class RotatableCanvas extends Panel implements MouseListener,
       if (showLabels)
       {
         g.setColor(Color.red);
-        g.drawString(((SequencePoint) points.elementAt(i)).sequence
-                .getName(), x - 3, y - 4);
+        g.drawString(
+                ((SequencePoint) points.elementAt(i)).sequence.getName(),
+                x - 3, y - 4);
       }
     }
   }
@@ -595,8 +596,8 @@ public class RotatableCanvas extends Panel implements MouseListener,
       {
         if (av != null)
         {
-          if (!av.getSelectionGroup().getSequences(null).contains(
-                  sp.sequence))
+          if (!av.getSelectionGroup().getSequences(null)
+                  .contains(sp.sequence))
           {
             av.getSelectionGroup().addSequence(sp.sequence, true);
           }
index 7d0d599..0971882 100755 (executable)
@@ -398,22 +398,20 @@ public class ScalePanel extends Panel implements MouseMotionListener,
           maxX = (i - startx + 1) * av.charWidth + fm.stringWidth(string);
         }
 
-        gg
-                .drawLine(
-                        (int) (((i - startx - 1) * av.charWidth) + (av.charWidth / 2)),
-                        y + 2,
-                        (int) (((i - startx - 1) * av.charWidth) + (av.charWidth / 2)),
-                        y + (fm.getDescent() * 2));
+        gg.drawLine(
+                (int) (((i - startx - 1) * av.charWidth) + (av.charWidth / 2)),
+                y + 2,
+                (int) (((i - startx - 1) * av.charWidth) + (av.charWidth / 2)),
+                y + (fm.getDescent() * 2));
 
       }
       else
       {
-        gg
-                .drawLine(
-                        (int) (((i - startx - 1) * av.charWidth) + (av.charWidth / 2)),
-                        y + fm.getDescent(),
-                        (int) (((i - startx - 1) * av.charWidth) + (av.charWidth / 2)),
-                        y + (fm.getDescent() * 2));
+        gg.drawLine(
+                (int) (((i - startx - 1) * av.charWidth) + (av.charWidth / 2)),
+                y + fm.getDescent(),
+                (int) (((i - startx - 1) * av.charWidth) + (av.charWidth / 2)),
+                y + (fm.getDescent() * 2));
       }
     }
 
index 6fa4933..fd9d768 100755 (executable)
@@ -539,11 +539,9 @@ public class SeqCanvas extends Panel
         if (av.getShowHiddenMarkers())
         {
           g1.setColor(Color.blue);
-          g1
-                  .drawLine((blockEnd - blockStart + 1) * av.charWidth - 1,
-                          0 + offset, (blockEnd - blockStart + 1)
-                                  * av.charWidth - 1, (endSeq - startSeq)
-                                  * av.charHeight + offset);
+          g1.drawLine((blockEnd - blockStart + 1) * av.charWidth - 1,
+                  0 + offset, (blockEnd - blockStart + 1) * av.charWidth
+                          - 1, (endSeq - startSeq) * av.charHeight + offset);
         }
 
         g1.translate(-screenY * av.charWidth, 0);
index c5b6d1c..24f4786 100755 (executable)
@@ -464,14 +464,14 @@ public class SeqPanel extends Panel implements MouseMotionListener,
         av.setSelectionGroup(null);
       }
 
-      SequenceFeature[] features = findFeaturesAtRes(sequence, sequence
-              .findPosition(findRes(evt)));
+      SequenceFeature[] features = findFeaturesAtRes(sequence,
+              sequence.findPosition(findRes(evt)));
 
       if (features != null && features.length > 0)
       {
         SearchResults highlight = new SearchResults();
-        highlight.addResult(sequence, features[0].getBegin(), features[0]
-                .getEnd());
+        highlight.addResult(sequence, features[0].getBegin(),
+                features[0].getEnd());
         seqCanvas.highlightSearchResults(highlight);
       }
       if (features != null && features.length > 0)
@@ -580,8 +580,8 @@ public class SeqPanel extends Panel implements MouseMotionListener,
 
       y -= hgap;
 
-      seq = Math.min((y % cHeight) / av.getCharHeight(), av.alignment
-              .getHeight() - 1);
+      seq = Math.min((y % cHeight) / av.getCharHeight(),
+              av.alignment.getHeight() - 1);
       if (seq < 0)
       {
         seq = -1;
@@ -734,8 +734,8 @@ public class SeqPanel extends Panel implements MouseMotionListener,
     }
 
     // use aa to see if the mouse pointer is on a
-    SequenceFeature[] allFeatures = findFeaturesAtRes(sequence, sequence
-            .findPosition(res));
+    SequenceFeature[] allFeatures = findFeaturesAtRes(sequence,
+            sequence.findPosition(res));
 
     int index = 0;
     while (index < allFeatures.length)
@@ -836,9 +836,7 @@ public class SeqPanel extends Panel implements MouseMotionListener,
           fontSize = 1;
         }
 
-        av
-                .setFont(new Font(av.font.getName(), av.font.getStyle(),
-                        fontSize));
+        av.setFont(new Font(av.font.getName(), av.font.getStyle(), fontSize));
         av.charWidth = oldWidth;
       }
       else
@@ -1348,8 +1346,8 @@ public class SeqPanel extends Panel implements MouseMotionListener,
     // DETECT RIGHT MOUSE BUTTON IN AWT
     if ((evt.getModifiers() & InputEvent.BUTTON3_MASK) == InputEvent.BUTTON3_MASK)
     {
-      SequenceFeature[] allFeatures = findFeaturesAtRes(sequence, sequence
-              .findPosition(res));
+      SequenceFeature[] allFeatures = findFeaturesAtRes(sequence,
+              sequence.findPosition(res));
 
       Vector links = null;
       if (allFeatures != null)
@@ -1420,9 +1418,9 @@ public class SeqPanel extends Panel implements MouseMotionListener,
     {
       if (stretchGroup.cs instanceof ClustalxColourScheme)
       {
-        ((ClustalxColourScheme) stretchGroup.cs).resetClustalX(stretchGroup
-                .getSequences(av.hiddenRepSequences), stretchGroup
-                .getWidth());
+        ((ClustalxColourScheme) stretchGroup.cs).resetClustalX(
+                stretchGroup.getSequences(av.hiddenRepSequences),
+                stretchGroup.getWidth());
       }
 
       if (stretchGroup.cs instanceof Blosum62ColourScheme
@@ -1435,14 +1433,14 @@ public class SeqPanel extends Panel implements MouseMotionListener,
 
       if (stretchGroup.cs.conservationApplied())
       {
-        SliderPanel.setConservationSlider(ap, stretchGroup.cs, stretchGroup
-                .getName());
+        SliderPanel.setConservationSlider(ap, stretchGroup.cs,
+                stretchGroup.getName());
         stretchGroup.recalcConservation();
       }
       else
       {
-        SliderPanel.setPIDSliderSource(ap, stretchGroup.cs, stretchGroup
-                .getName());
+        SliderPanel.setPIDSliderSource(ap, stretchGroup.cs,
+                stretchGroup.getName());
       }
     }
     changeEndRes = false;
index 61c9976..4806ba1 100755 (executable)
@@ -86,8 +86,8 @@ public class Tooltip extends Canvas implements MouseListener,
         g.drawImage(linkImage, x, i * fontHeight + 1, this);\r
         if (lindex + 6 < tip[i].length())\r
         {\r
-          g.drawString(tip[i].substring(lindex + 6), x\r
-                  + linkImage.getWidth(this), (i + 1) * fontHeight - 3);\r
+          g.drawString(tip[i].substring(lindex + 6),\r
+                  x + linkImage.getWidth(this), (i + 1) * fontHeight - 3);\r
         }\r
       }\r
       else\r
@@ -142,11 +142,12 @@ public class Tooltip extends Canvas implements MouseListener,
     {\r
       return;\r
     }\r
-    setLocation((owner.getLocationOnScreen().x - mainContainer\r
-            .getLocationOnScreen().x)\r
-            + evt.getX(), (owner.getLocationOnScreen().y\r
-            - mainContainer.getLocationOnScreen().y + VERTICAL_OFFSET)\r
-            + evt.getY());\r
+    setLocation(\r
+            (owner.getLocationOnScreen().x - mainContainer.getLocationOnScreen().x)\r
+                    + evt.getX(),\r
+            (owner.getLocationOnScreen().y\r
+                    - mainContainer.getLocationOnScreen().y + VERTICAL_OFFSET)\r
+                    + evt.getY());\r
 \r
     // correction, whole tool tip must be visible\r
     if (mainContainer.getSize().width < (getLocation().x + getSize().width))\r
index d1c6c61..d40ab73 100755 (executable)
@@ -184,8 +184,7 @@ public class TreeCanvas extends Panel implements MouseListener,
       }
 
       String name = (markPlaceholders && node.isPlaceholder()) ? (PLACEHOLDER + node
-              .getName())
-              : node.getName();
+              .getName()) : node.getName();
       FontMetrics fm = g.getFontMetrics(font);
       int charWidth = fm.stringWidth(name) + 3;
       int charHeight = fm.getHeight();
@@ -585,12 +584,12 @@ public class TreeCanvas extends Panel implements MouseListener,
     for (int i = 0; i < tree.getGroups().size(); i++)
     {
 
-      Color col = new Color((int) (Math.random() * 255), (int) (Math
-              .random() * 255), (int) (Math.random() * 255));
+      Color col = new Color((int) (Math.random() * 255),
+              (int) (Math.random() * 255), (int) (Math.random() * 255));
       setColor((SequenceNode) tree.getGroups().elementAt(i), col.brighter());
 
-      Vector l = tree.findLeaves((SequenceNode) tree.getGroups().elementAt(
-              i), new Vector());
+      Vector l = tree.findLeaves(
+              (SequenceNode) tree.getGroups().elementAt(i), new Vector());
 
       Vector sequences = new Vector();
       for (int j = 0; j < l.size(); j++)
@@ -609,8 +608,9 @@ public class TreeCanvas extends Panel implements MouseListener,
       {
         if (av.getGlobalColourScheme() instanceof UserColourScheme)
         {
-          cs = new UserColourScheme(((UserColourScheme) av
-                  .getGlobalColourScheme()).getColours());
+          cs = new UserColourScheme(
+                  ((UserColourScheme) av.getGlobalColourScheme())
+                          .getColours());
 
         }
         else
@@ -620,8 +620,8 @@ public class TreeCanvas extends Panel implements MouseListener,
                   .getGlobalColourScheme()));
         }
 
-        cs.setThreshold(av.getGlobalColourScheme().getThreshold(), av
-                .getIgnoreGapsConsensus());
+        cs.setThreshold(av.getGlobalColourScheme().getThreshold(),
+                av.getIgnoreGapsConsensus());
       }
 
       SequenceGroup sg = new SequenceGroup(sequences, "", cs, true, true,
@@ -633,8 +633,8 @@ public class TreeCanvas extends Panel implements MouseListener,
               && av.getGlobalColourScheme().conservationApplied())
       {
         Conservation c = new Conservation("Group",
-                ResidueProperties.propHash, 3, sg.getSequences(null), sg
-                        .getStartRes(), sg.getEndRes());
+                ResidueProperties.propHash, 3, sg.getSequences(null),
+                sg.getStartRes(), sg.getEndRes());
 
         c.calculate();
         c.verdict(false, av.ConsPercGaps);
index 92dcde4..268fece 100755 (executable)
@@ -280,8 +280,8 @@ public class TreePanel extends EmbmenuFrame implements ActionListener,
 
   public void newickOutput_actionPerformed()
   {
-    jalview.io.NewickFile fout = new jalview.io.NewickFile(tree
-            .getTopNode());
+    jalview.io.NewickFile fout = new jalview.io.NewickFile(
+            tree.getTopNode());
     String output = fout.print(false, true);
     CutAndPasteTransfer cap = new CutAndPasteTransfer(false, null);
     cap.setText(output);
index 7819ff3..188099a 100755 (executable)
@@ -194,9 +194,10 @@ public class UserDefinedColours extends Panel implements ActionListener,
     int width = 400;
 
     dialog.setBounds(alignframe.getBounds().x
-            + (alignframe.getSize().width - width) / 2, alignframe
-            .getBounds().y
-            + (alignframe.getSize().height - height) / 2, width, height);
+            + (alignframe.getSize().width - width) / 2,
+            alignframe.getBounds().y
+                    + (alignframe.getSize().height - height) / 2, width,
+            height);
 
   }
 
index 24ef016..d666b01 100755 (executable)
@@ -125,7 +125,8 @@ import org.biojava.dasobert.dasregistry.Das1Source;
  * <li>SHOW_CONSENSUS_LOGO (false) Show consensus annotation row's sequence
  * logo.</li>
  * <li>FOLLOW_SELECTIONS (true) Controls whether a new alignment view should
- * respond to selections made in other alignments containing the same sequences.</li>
+ * respond to selections made in other alignments containing the same sequences.
+ * </li>
  * 
  * <li></li>
  * 
@@ -172,7 +173,7 @@ public class Cache
 
   public static void initLogger()
   {
-    if (log!=null)
+    if (log != null)
     {
       return;
     }
@@ -241,9 +242,7 @@ public class Cache
       System.out.println("Using proxyServer: "
               + getDefault("PROXY_SERVER", null) + " proxyPort: "
               + getDefault("PROXY_PORT", null));
-      System
-              .setProperty("http.proxyHost", getDefault("PROXY_SERVER",
-                      null));
+      System.setProperty("http.proxyHost", getDefault("PROXY_SERVER", null));
       System.setProperty("http.proxyPort", getDefault("PROXY_PORT", null));
     }
 
@@ -253,8 +252,8 @@ public class Cache
     try
     {
       String buildDetails = "jar:".concat(Cache.class.getProtectionDomain()
-              .getCodeSource().getLocation().toString().concat(
-                      "!/.build_properties"));
+              .getCodeSource().getLocation().toString()
+              .concat("!/.build_properties"));
 
       java.net.URL localJarFileURL = new java.net.URL(buildDetails);
 
@@ -609,8 +608,7 @@ public class Cache
                   "com.boxysystems.jgoogleanalytics.FocusPoint");
         } catch (Exception e)
         {
-          log
-                  .debug("com.boxysystems.jgoogleanalytics package is not present - tracking not enabled.");
+          log.debug("com.boxysystems.jgoogleanalytics package is not present - tracking not enabled.");
           tracker = null;
           jgoogleanalyticstracker = null;
           trackerfocus = null;
@@ -654,10 +652,7 @@ public class Cache
         if (log != null)
         {
           if (re != null)
-            log
-                    .debug(
-                            "Caught runtime exception in googletracker init:",
-                            re);
+            log.debug("Caught runtime exception in googletracker init:", re);
           if (ex != null)
             log.warn(
                     "Failed to initialise GoogleTracker for Jalview Desktop with version "
index e7fc917..39daac6 100755 (executable)
@@ -81,8 +81,9 @@ public class Jalview
             + System.getProperty("os.version"));
     if (new Platform().isAMac())
     {
-       System.setProperty("com.apple.mrj.application.apple.menu.about.name", "Jalview");
-       System.setProperty("apple.laf.useScreenMenuBar", "true");
+      System.setProperty("com.apple.mrj.application.apple.menu.about.name",
+              "Jalview");
+      System.setProperty("apple.laf.useScreenMenuBar", "true");
     }
 
     ArgsParser aparser = new ArgsParser(args);
@@ -553,7 +554,7 @@ public class Jalview
       }
     }
     // and finally, turn off batch mode indicator - if the desktop still exists
-    if (desktop!=null)
+    if (desktop != null)
     {
       desktop.setInBatchMode(false);
     }
index 157c22b..6a29ecd 100755 (executable)
@@ -334,7 +334,7 @@ public class JalviewLite extends Applet
 
   public boolean jmolAvailable = false;
 
-  private boolean alignPdbStructures=false;
+  private boolean alignPdbStructures = false;
 
   public static boolean debug = false;
 
@@ -901,10 +901,11 @@ public class JalviewLite extends Applet
           }
         }
         /*
-         * <param name="alignpdbfiles" value="false/true"/>
-         * Undocumented for 2.6 - related to JAL-434
+         * <param name="alignpdbfiles" value="false/true"/> Undocumented for 2.6
+         * - related to JAL-434
          */
-        applet.setAlignPdbStructures(getDefaultParameter("alignpdbfiles",false));
+        applet.setAlignPdbStructures(getDefaultParameter("alignpdbfiles",
+                false));
         /*
          * <param name="PDBfile" value="1gaq.txt PDB|1GAQ|1GAQ|A PDB|1GAQ|1GAQ|B
          * PDB|1GAQ|1GAQ|C">
@@ -913,10 +914,11 @@ public class JalviewLite extends Applet
          * 
          * <param name="PDBfile3" value="1q0o Q45135_9MICO">
          */
-        
+
         int pdbFileCount = 0;
-        // Accumulate pdbs here if they are heading for the same view (if alignPdbStructures is true)
-        Vector pdbs=new Vector();
+        // Accumulate pdbs here if they are heading for the same view (if
+        // alignPdbStructures is true)
+        Vector pdbs = new Vector();
         do
         {
           if (pdbFileCount > 0)
@@ -1008,25 +1010,29 @@ public class JalviewLite extends Applet
                   }
                 }
               }
-              
-              if (!alignPdbStructures) {
+
+              if (!alignPdbStructures)
+              {
                 newAlignFrame.newStructureView(applet, pdb, seqs, chains,
-                      protocol);
-              } else {
-                pdbs.addElement(new Object[] { pdb, seqs, chains, new String(protocol)});
+                        protocol);
+              }
+              else
+              {
+                pdbs.addElement(new Object[]
+                { pdb, seqs, chains, new String(protocol) });
               }
             }
           }
 
           pdbFileCount++;
         } while (pdbFileCount < 10);
-        if (pdbs.size()>0)
+        if (pdbs.size() > 0)
         {
           SequenceI[][] seqs = new SequenceI[pdbs.size()][];
           PDBEntry[] pdb = new PDBEntry[pdbs.size()];
           String[][] chains = new String[pdbs.size()][];
           String[] protocols = new String[pdbs.size()];
-          for (int pdbsi=0,pdbsiSize=pdbs.size(); pdbsi<pdbsiSize;pdbsi++)
+          for (int pdbsi = 0, pdbsiSize = pdbs.size(); pdbsi < pdbsiSize; pdbsi++)
           {
             Object[] o = (Object[]) pdbs.elementAt(pdbsi);
             pdb[pdbsi] = (PDBEntry) o[0];
@@ -1034,8 +1040,9 @@ public class JalviewLite extends Applet
             chains[pdbsi] = (String[]) o[2];
             protocols[pdbsi] = (String) o[3];
           }
-          newAlignFrame.alignedStructureView(applet, pdb, seqs, chains, protocols);
-          
+          newAlignFrame.alignedStructureView(applet, pdb, seqs, chains,
+                  protocols);
+
         }
         // ///////////////////////////
         // modify display of features
@@ -1190,7 +1197,7 @@ public class JalviewLite extends Applet
   public String arrayToSeparatorList(String[] list)
   {
     StringBuffer v = new StringBuffer();
-    if (list != null && list.length>0)
+    if (list != null && list.length > 0)
     {
       for (int i = 0, iSize = list.length - 1; i < iSize; i++)
       {
@@ -1365,7 +1372,8 @@ public class JalviewLite extends Applet
   }
 
   /**
-   * get all components associated with the applet of the given type 
+   * get all components associated with the applet of the given type
+   * 
    * @param class1
    * @return
    */
@@ -1373,19 +1381,19 @@ public class JalviewLite extends Applet
   {
     Vector wnds = new Vector();
     Component[] cmp = getComponents();
-    if (cmp!=null)
-    {
-    for (int i=0;i<cmp.length;i++)
+    if (cmp != null)
     {
-      if (class1.isAssignableFrom(cmp[i].getClass()))
+      for (int i = 0; i < cmp.length; i++)
       {
-        wnds.addElement(cmp);
+        if (class1.isAssignableFrom(cmp[i].getClass()))
+        {
+          wnds.addElement(cmp);
+        }
       }
-    }}
+    }
     return wnds;
   }
 
-
   /**
    * bind structures in a viewer to any matching sequences in an alignFrame (use
    * sequenceIds to limit scope of search to specific sequences)
@@ -1394,21 +1402,13 @@ public class JalviewLite extends Applet
    * @param viewer
    * @param sequenceIds
    * @return TODO: consider making an exception structure for indicating when
-   *         binding fails
-  public SequenceStructureBinding addStructureViewInstance(
-          AlignFrame alFrame, Object viewer, String sequenceIds)
-  {
-
-    if (sequenceIds != null && sequenceIds.length() > 0)
-    {
-      return alFrame.addStructureViewInstance(viewer,
-              separatorListToArray(sequenceIds));
-    }
-    else
-    {
-      return alFrame.addStructureViewInstance(viewer, null);
-    }
-    // return null;
-  }
+   *         binding fails public SequenceStructureBinding
+   *         addStructureViewInstance( AlignFrame alFrame, Object viewer, String
+   *         sequenceIds) {
+   * 
+   *         if (sequenceIds != null && sequenceIds.length() > 0) { return
+   *         alFrame.addStructureViewInstance(viewer,
+   *         separatorListToArray(sequenceIds)); } else { return
+   *         alFrame.addStructureViewInstance(viewer, null); } // return null; }
    */
 }
index d556442..5310838 100644 (file)
@@ -143,8 +143,8 @@ public class EditCommand implements CommandI
   final public void appendEdit(int command, SequenceI[] seqs, int position,
           int number, AlignmentI al, boolean performEdit, AlignmentI[] views)
   {
-    Edit edit = new Edit(command, seqs, position, number, al
-            .getGapCharacter());
+    Edit edit = new Edit(command, seqs, position, number,
+            al.getGapCharacter());
     if (al.getHeight() == seqs.length)
     {
       edit.al = al;
@@ -286,9 +286,12 @@ public class EditCommand implements CommandI
               command.oldds = new SequenceI[command.seqs.length];
             }
             command.oldds[i] = oldds;
-            adjustFeatures(command, i, command.seqs[i]
-                    .findPosition(command.position), command.seqs[i]
-                    .findPosition(command.position + command.number), false);
+            adjustFeatures(
+                    command,
+                    i,
+                    command.seqs[i].findPosition(command.position),
+                    command.seqs[i].findPosition(command.position
+                            + command.number), false);
           }
         }
       }
@@ -781,9 +784,8 @@ public class EditCommand implements CommandI
       if (command.editedFeatures != null
               && command.editedFeatures.containsKey(seq))
       {
-        sequence
-                .setSequenceFeatures((SequenceFeature[]) command.editedFeatures
-                        .get(seq));
+        sequence.setSequenceFeatures((SequenceFeature[]) command.editedFeatures
+                .get(seq));
       }
 
       return;
index 2352ac5..1a0d82c 100755 (executable)
@@ -593,8 +593,8 @@ public class Alignment implements AlignmentI
     for (int i = 0; i < sequences.size(); i++)
     {
       Sequence seq = (Sequence) sequences.elementAt(i);
-      seq.setSequence(seq.getSequenceAsString().replace('.', gc).replace(
-              '-', gc).replace(' ', gc));
+      seq.setSequence(seq.getSequenceAsString().replace('.', gc)
+              .replace('-', gc).replace(' ', gc));
     }
   }
 
index 9339b5c..8b947eb 100755 (executable)
@@ -215,8 +215,9 @@ public interface AlignmentI
   public boolean deleteAnnotation(AlignmentAnnotation aa);
 
   /**
-   * Get the annotation associated with this alignment
-   * (this can be null if no annotation has ever been created on the alignment)
+   * Get the annotation associated with this alignment (this can be null if no
+   * annotation has ever been created on the alignment)
+   * 
    * @return array of AlignmentAnnotation objects
    */
   public AlignmentAnnotation[] getAlignmentAnnotation();
index 546ba1a..a36faf7 100644 (file)
@@ -508,8 +508,9 @@ public class ColumnSelection
   }\r
 \r
   /**\r
-   * Use this method to find out where a column will appear in the visible alignment when\r
-   * hidden columns exist. If the column is not visible, then the left-most visible column will always be returned.\r
+   * Use this method to find out where a column will appear in the visible\r
+   * alignment when hidden columns exist. If the column is not visible, then the\r
+   * left-most visible column will always be returned.\r
    * \r
    * @param hiddenColumn\r
    *          int\r
@@ -530,9 +531,9 @@ public class ColumnSelection
           result -= region[1] + 1 - region[0];\r
         }\r
       } while ((hiddenColumn > region[1]) && (index < hiddenColumns.size()));\r
-      if (hiddenColumn>region[0] && hiddenColumn<region[1])\r
+      if (hiddenColumn > region[0] && hiddenColumn < region[1])\r
       {\r
-        return region[0]+hiddenColumn-result;\r
+        return region[0] + hiddenColumn - result;\r
       }\r
     }\r
     return result; // return the shifted position after removing hidden columns.\r
index f2777f4..b2a1f66 100644 (file)
@@ -68,8 +68,8 @@ public class SeqCigar extends CigarSimple
    */
   public String getSequenceString(char GapChar)
   {
-    return (length == 0) ? "" : (String) getSequenceAndDeletions(refseq
-            .getSequenceAsString(start, end), GapChar)[0];
+    return (length == 0) ? "" : (String) getSequenceAndDeletions(
+            refseq.getSequenceAsString(start, end), GapChar)[0];
   }
 
   /**
@@ -85,18 +85,17 @@ public class SeqCigar extends CigarSimple
     {
       return null;
     }
-    Object[] edit_result = getSequenceAndDeletions(refseq
-            .getSequenceAsString(start, end), GapChar);
+    Object[] edit_result = getSequenceAndDeletions(
+            refseq.getSequenceAsString(start, end), GapChar);
     if (edit_result == null)
     {
       throw new Error(
               "Implementation Error - unexpected null from getSequenceAndDeletions");
     }
     int bounds[] = (int[]) edit_result[1];
-    seq = new Sequence(refseq.getName(), (String) edit_result[0], refseq
-            .getStart()
-            + start + bounds[0], refseq.getStart() + start
-            + ((bounds[2] == 0) ? -1 : bounds[2]));
+    seq = new Sequence(refseq.getName(), (String) edit_result[0],
+            refseq.getStart() + start + bounds[0], refseq.getStart()
+                    + start + ((bounds[2] == 0) ? -1 : bounds[2]));
     seq.setDescription(refseq.getDescription());
     int sstart = seq.getStart(), send = seq.getEnd();
     // seq.checkValidRange(); probably not needed
@@ -170,9 +169,8 @@ public class SeqCigar extends CigarSimple
       }
       else
       {
-        ds = new Sequence(seq.getName(), ungapped, seq.getStart(), seq
-                .getStart()
-                + ungapped.length() - 1);
+        ds = new Sequence(seq.getName(), ungapped, seq.getStart(),
+                seq.getStart() + ungapped.length() - 1);
         // JBPNote: this would be consistent but may not be useful
         // seq.setDatasetSequence(ds);
       }
@@ -501,8 +499,8 @@ public class SeqCigar extends CigarSimple
             }
             else
             {
-              g_seqs[s].insert(inspos, alseqs_string[i].substring(
-                      region[0], region[1] + 1));
+              g_seqs[s].insert(inspos,
+                      alseqs_string[i].substring(region[0], region[1] + 1));
             }
           }
           shifts.addShift(region[2], insert.length); // update shift in
@@ -520,10 +518,9 @@ public class SeqCigar extends CigarSimple
     {
       int[] bounds = ((int[]) ((Object[]) gs_regions[i])[1]);
       SequenceI ref = alseqs[i].getRefSeq();
-      seqs[i] = new Sequence(ref.getName(), g_seqs[i].toString(), ref
-              .getStart()
-              + alseqs[i].start + bounds[0], ref.getStart()
-              + alseqs[i].start + (bounds[2] == 0 ? -1 : bounds[2]));
+      seqs[i] = new Sequence(ref.getName(), g_seqs[i].toString(),
+              ref.getStart() + alseqs[i].start + bounds[0], ref.getStart()
+                      + alseqs[i].start + (bounds[2] == 0 ? -1 : bounds[2]));
       seqs[i].setDatasetSequence(ref);
       seqs[i].setDescription(ref.getDescription());
     }
index 1c70ae9..be40bce 100755 (executable)
@@ -226,8 +226,8 @@ public class SequenceGroup
               if (!found)
                 continue;
             }
-            AlignmentAnnotation newannot = new AlignmentAnnotation(seq
-                    .getAnnotation()[a]);
+            AlignmentAnnotation newannot = new AlignmentAnnotation(
+                    seq.getAnnotation()[a]);
             newannot.restrict(startRes, endRes);
             newannot.setSequenceRef(seqs[ipos]);
             newannot.adjustForAlignment();
@@ -1056,8 +1056,8 @@ public class SequenceGroup
       }
     }
 
-    SequenceI sq = new Sequence("Group" + getName() + " Consensus", seqs
-            .toString());
+    SequenceI sq = new Sequence("Group" + getName() + " Consensus",
+            seqs.toString());
     sq.setDescription("Percentage Identity Consensus "
             + ((ignoreGapsInConsensus) ? " without gaps" : ""));
     return sq;
index a1b8509..1439a8b 100644 (file)
@@ -585,10 +585,9 @@ public class EmblEntry
     {
       // extract proteins.
       product = new Sequence(prid, prseq, 1, prseq.length());
-      product
-              .setDescription(((prname.length() == 0) ? "Protein Product from "
-                      + sourceDb
-                      : prname));
+      product.setDescription(((prname.length() == 0) ? "Protein Product from "
+              + sourceDb
+              : prname));
       if (!noPeptide)
       {
         // Protein is also added to vector of sequences returned
@@ -713,16 +712,16 @@ public class EmblEntry
         }
         if (product != null)
         {
-          DBRefEntry pref = new DBRefEntry(ref.getSource(), ref
-                  .getVersion(), ref.getAccessionId());
+          DBRefEntry pref = new DBRefEntry(ref.getSource(),
+                  ref.getVersion(), ref.getAccessionId());
           pref.setMap(null); // reference is direct
           product.addDBRef(pref);
           // Add converse mapping reference
           if (map != null)
           {
             Mapping pmap = new Mapping(dna, map.getMap().getInverse());
-            pref = new DBRefEntry(sourceDb, getVersion(), this
-                    .getAccession());
+            pref = new DBRefEntry(sourceDb, getVersion(),
+                    this.getAccession());
             pref.setMap(pmap);
             if (map.getTo() != null)
             {
index 42e6185..b20314b 100755 (executable)
@@ -4572,7 +4572,7 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener,
 
     });
     rfetch.add(fetchr);
-    final AlignFrame me=this;
+    final AlignFrame me = this;
     new Thread(new Runnable()
     {
       public void run()
index 9208e5e..6f713fc 100755 (executable)
@@ -552,8 +552,8 @@ public class AlignViewport implements SelectionSource
         consensus.annotations = new Annotation[aWidth];
 
         hconsensus = new Hashtable[aWidth];
-        AAFrequency.calculate(alignment.getSequencesArray(), 0, alignment
-                .getWidth(), hconsensus, true);
+        AAFrequency.calculate(alignment.getSequencesArray(), 0,
+                alignment.getWidth(), hconsensus, true);
         updateAnnotation(true);
 
         if (globalColourScheme != null)
@@ -589,7 +589,8 @@ public class AlignViewport implements SelectionSource
 
     protected void updateAnnotation(boolean immediate)
     {
-      // TODO: make calls thread-safe, so if another thread calls this method, it will either return or wait until one calculation is finished.
+      // TODO: make calls thread-safe, so if another thread calls this method,
+      // it will either return or wait until one calculation is finished.
       if (immediate
               || (!updatingConsensus && consensus != null && hconsensus != null))
       {
@@ -1852,8 +1853,8 @@ public class AlignViewport implements SelectionSource
       {
         Alignment al = (Alignment) alignment;
         Conservation c = new Conservation("All",
-                ResidueProperties.propHash, 3, al.getSequences(), 0, al
-                        .getWidth() - 1);
+                ResidueProperties.propHash, 3, al.getSequences(), 0,
+                al.getWidth() - 1);
         c.calculate();
         c.verdict(false, ConsPercGaps);
 
@@ -1867,8 +1868,8 @@ public class AlignViewport implements SelectionSource
       SequenceGroup sg = (SequenceGroup) alignment.getGroups().elementAt(s);
       if (sg.cs != null && sg.cs instanceof ClustalxColourScheme)
       {
-        ((ClustalxColourScheme) sg.cs).resetClustalX(sg
-                .getSequences(hiddenRepSequences), sg.getWidth());
+        ((ClustalxColourScheme) sg.cs).resetClustalX(
+                sg.getSequences(hiddenRepSequences), sg.getWidth());
       }
       sg.recalcConservation();
     }
index 9278bc1..efefeaf 100755 (executable)
@@ -179,8 +179,8 @@ public class AlignmentPanel extends GAlignmentPanel implements
 
     AlignmentI al = av.getAlignment();
     int afwidth = (alignFrame != null ? alignFrame.getWidth() : 300);
-    int maxwidth = Math.max(20, Math.min(afwidth - 200, (int) 2 * afwidth
-            / 3));
+    int maxwidth = Math.max(20,
+            Math.min(afwidth - 200, (int) 2 * afwidth / 3));
     int i = 0;
     int idWidth = 0;
     String id;
@@ -283,7 +283,8 @@ public class AlignmentPanel extends GAlignmentPanel implements
       }
       int start = r[0];
       int end = r[1];
-      // System.err.println("Seq : "+seqIndex+" Scroll to "+start+","+end); // DEBUG
+      // System.err.println("Seq : "+seqIndex+" Scroll to "+start+","+end); //
+      // DEBUG
       if (start < 0)
       {
         return false;
@@ -577,9 +578,7 @@ public class AlignmentPanel extends GAlignmentPanel implements
     {
       int x = hscroll.getValue();
       av.setStartRes(x);
-      av
-              .setEndRes((x + (seqPanel.seqCanvas.getWidth() / av
-                      .getCharWidth())) - 1);
+      av.setEndRes((x + (seqPanel.seqCanvas.getWidth() / av.getCharWidth())) - 1);
     }
 
     if (evt.getSource() == vscroll)
@@ -859,8 +858,8 @@ public class AlignmentPanel extends GAlignmentPanel implements
       }
 
       pg.setColor(currentColor);
-      pg.fillRect(0, (i - startSeq) * av.charHeight, idWidth, av
-              .getCharHeight());
+      pg.fillRect(0, (i - startSeq) * av.charHeight, idWidth,
+              av.getCharHeight());
 
       pg.setColor(currentTextColor);
 
@@ -873,7 +872,9 @@ public class AlignmentPanel extends GAlignmentPanel implements
                 - 4;
       }
 
-      pg.drawString(seq.getDisplayId(av.getShowJVSuffix()), xPos,
+      pg.drawString(
+              seq.getDisplayId(av.getShowJVSuffix()),
+              xPos,
               (((i - startSeq) * av.charHeight) + av.getCharHeight())
                       - (av.getCharHeight() / 5));
     }
@@ -1327,7 +1328,8 @@ public class AlignmentPanel extends GAlignmentPanel implements
 
   public void updateAnnotation(boolean applyGlobalSettings)
   {
-    // TODO: this should be merged with other annotation update stuff - that sits on AlignViewport
+    // TODO: this should be merged with other annotation update stuff - that
+    // sits on AlignViewport
     boolean updateCalcs = false;
     boolean conv = av.isShowGroupConservation();
     boolean cons = av.isShowGroupConsensus();
@@ -1346,46 +1348,46 @@ public class AlignmentPanel extends GAlignmentPanel implements
     Hashtable oldrfs = new Hashtable();
     if (aan != null)
     {
-    for (int an = 0; an < aan.length; an++)
-    {
-      if (aan[an].autoCalculated && aan[an].groupRef != null)
+      for (int an = 0; an < aan.length; an++)
       {
-        oldrfs.put(aan[an].groupRef, aan[an].groupRef);
-        av.alignment.deleteAnnotation(aan[an]);
-        aan[an] = null;
+        if (aan[an].autoCalculated && aan[an].groupRef != null)
+        {
+          oldrfs.put(aan[an].groupRef, aan[an].groupRef);
+          av.alignment.deleteAnnotation(aan[an]);
+          aan[an] = null;
+        }
       }
     }
-    }
     SequenceGroup sg;
     if (gr != null)
     {
-    for (int g = 0; g < gr.size(); g++)
-    {
-      updateCalcs = false;
-      sg = (SequenceGroup) gr.elementAt(g);
-      if (applyGlobalSettings || !oldrfs.containsKey(sg))
-      {
-        // set defaults for this group's conservation/consensus
-        sg.setshowSequenceLogo(showprf);
-        sg.setShowConsensusHistogram(showConsHist);
-      }
-      if (conv)
-      {
-        updateCalcs = true;
-        av.alignment.addAnnotation(sg.getConservationRow(), 0);
-      }
-      if (cons)
-      {
-        updateCalcs = true;
-        av.alignment.addAnnotation(sg.getConsensus(), 0);
-      }
-      // refresh the annotation rows
-      if (updateCalcs)
+      for (int g = 0; g < gr.size(); g++)
       {
-        sg.recalcConservation();
+        updateCalcs = false;
+        sg = (SequenceGroup) gr.elementAt(g);
+        if (applyGlobalSettings || !oldrfs.containsKey(sg))
+        {
+          // set defaults for this group's conservation/consensus
+          sg.setshowSequenceLogo(showprf);
+          sg.setShowConsensusHistogram(showConsHist);
+        }
+        if (conv)
+        {
+          updateCalcs = true;
+          av.alignment.addAnnotation(sg.getConservationRow(), 0);
+        }
+        if (cons)
+        {
+          updateCalcs = true;
+          av.alignment.addAnnotation(sg.getConsensus(), 0);
+        }
+        // refresh the annotation rows
+        if (updateCalcs)
+        {
+          sg.recalcConservation();
+        }
       }
     }
-    }
     oldrfs.clear();
     adjustAnnotationHeight();
   }
index 43bf850..a05ccf1 100755 (executable)
@@ -377,13 +377,14 @@ public class AnnotationColourChooser extends JPanel
     AnnotationColourGradient acg = null;
     if (currentColours.isSelected())
     {
-      acg = new AnnotationColourGradient(currentAnnotation, av
-              .getGlobalColourScheme(), aboveThreshold);
+      acg = new AnnotationColourGradient(currentAnnotation,
+              av.getGlobalColourScheme(), aboveThreshold);
     }
     else
     {
-      acg = new AnnotationColourGradient(currentAnnotation, minColour
-              .getBackground(), maxColour.getBackground(), aboveThreshold);
+      acg = new AnnotationColourGradient(currentAnnotation,
+              minColour.getBackground(), maxColour.getBackground(),
+              aboveThreshold);
     }
 
     if (currentAnnotation.graphMin == 0f
@@ -416,8 +417,8 @@ public class AnnotationColourChooser extends JPanel
         }
         else
         {
-          sg.cs = new AnnotationColourGradient(currentAnnotation, minColour
-                  .getBackground(), maxColour.getBackground(),
+          sg.cs = new AnnotationColourGradient(currentAnnotation,
+                  minColour.getBackground(), maxColour.getBackground(),
                   aboveThreshold);
         }
 
index de6aaa0..e50859d 100755 (executable)
@@ -196,7 +196,7 @@ public class AnnotationExporter extends JPanel
   private Hashtable getDisplayedFeatureCols()\r
   {\r
     Hashtable fcols = new Hashtable();\r
-    if (ap.av.featuresDisplayed==null)\r
+    if (ap.av.featuresDisplayed == null)\r
     {\r
       return fcols;\r
     }\r
index 8605f74..b77fab6 100755 (executable)
@@ -104,8 +104,8 @@ public class AnnotationLabels extends JPanel implements MouseListener,
     {
     }
 
-    BufferedImage bi = new BufferedImage(temp.getHeight(this), temp
-            .getWidth(this), BufferedImage.TYPE_INT_RGB);
+    BufferedImage bi = new BufferedImage(temp.getHeight(this),
+            temp.getWidth(this), BufferedImage.TYPE_INT_RGB);
     Graphics2D g = (Graphics2D) bi.getGraphics();
     g.rotate(Math.toRadians(90));
     g.drawImage(temp, 0, -bi.getWidth(this), this);
@@ -453,7 +453,7 @@ public class AnnotationLabels extends JPanel implements MouseListener,
             // todo: make the ap scroll to the selection
             ap.seqPanel.ap.idPanel.highlightSearchResults(null);
             ap.av.setSelectionGroup(// new SequenceGroup(
-                    aa[selectedRow].groupRef); // );
+            aa[selectedRow].groupRef); // );
             ap.av.sendSelection();
             ap.paintAlignment(false);
             PaintRefresher.Refresh(ap, ap.av.getSequenceSetId());
@@ -550,8 +550,8 @@ public class AnnotationLabels extends JPanel implements MouseListener,
         final JCheckBoxMenuItem cbmi = new JCheckBoxMenuItem(
                 "Ignore Gaps In Consensus",
                 (aa[selectedRow].groupRef != null) ? aa[selectedRow].groupRef
-                        .getIgnoreGapsConsensus()
-                        : ap.av.getIgnoreGapsConsensus());
+                        .getIgnoreGapsConsensus() : ap.av
+                        .getIgnoreGapsConsensus());
         final AlignmentAnnotation aaa = aa[selectedRow];
         cbmi.addActionListener(new ActionListener()
         {
@@ -574,8 +574,8 @@ public class AnnotationLabels extends JPanel implements MouseListener,
         if (aaa.groupRef != null)
         {
           final JCheckBoxMenuItem chist = new JCheckBoxMenuItem(
-                  "Show Group Histogram", aa[selectedRow].groupRef
-                          .isShowConsensusHistogram());
+                  "Show Group Histogram",
+                  aa[selectedRow].groupRef.isShowConsensusHistogram());
           chist.addActionListener(new ActionListener()
           {
             public void actionPerformed(ActionEvent e)
@@ -593,8 +593,8 @@ public class AnnotationLabels extends JPanel implements MouseListener,
           });
           pop.add(chist);
           final JCheckBoxMenuItem cprofl = new JCheckBoxMenuItem(
-                  "Show Group Logo", aa[selectedRow].groupRef
-                          .isShowSequenceLogo());
+                  "Show Group Logo",
+                  aa[selectedRow].groupRef.isShowSequenceLogo());
           cprofl.addActionListener(new ActionListener()
           {
             public void actionPerformed(ActionEvent e)
@@ -690,8 +690,8 @@ public class AnnotationLabels extends JPanel implements MouseListener,
     String output = new FormatAdapter().formatSequences("Fasta", seqs,
             omitHidden);
 
-    Toolkit.getDefaultToolkit().getSystemClipboard().setContents(
-            new StringSelection(output), Desktop.instance);
+    Toolkit.getDefaultToolkit().getSystemClipboard()
+            .setContents(new StringSelection(output), Desktop.instance);
 
     Vector hiddenColumns = null;
     if (av.hasHiddenColumns)
@@ -824,8 +824,8 @@ public class AnnotationLabels extends JPanel implements MouseListener,
                 g.setColor(aa[gg].annotations[0].colour);
               }
 
-              g.drawLine(x, y - graphExtras - 3, x
-                      + fm.stringWidth(aa[gg].label), y - graphExtras - 3);
+              g.drawLine(x, y - graphExtras - 3,
+                      x + fm.stringWidth(aa[gg].label), y - graphExtras - 3);
 
               g.setColor(Color.black);
               graphExtras += fontHeight + 8;
@@ -846,9 +846,8 @@ public class AnnotationLabels extends JPanel implements MouseListener,
     else if (dragEvent != null && aa != null)
     {
       g.setColor(Color.lightGray);
-      g.drawString(aa[selectedRow].label, dragEvent.getX(), dragEvent
-              .getY()
-              - scrollOffset);
+      g.drawString(aa[selectedRow].label, dragEvent.getX(),
+              dragEvent.getY() - scrollOffset);
     }
 
     if ((aa == null) || (aa.length < 1))
index 638a1c9..a7cca2c 100755 (executable)
@@ -175,7 +175,7 @@ public class AnnotationPanel extends JPanel implements MouseListener,
         height += aa[i].height;
       }
     }
-    if (height==0)
+    if (height == 0)
     {
       // set minimum
       height = 20;
@@ -200,7 +200,7 @@ public class AnnotationPanel extends JPanel implements MouseListener,
   public void actionPerformed(ActionEvent evt)
   {
     AlignmentAnnotation[] aa = av.alignment.getAlignmentAnnotation();
-    if (aa==null)
+    if (aa == null)
     {
       return;
     }
@@ -919,9 +919,7 @@ public class AnnotationPanel extends JPanel implements MouseListener,
 
               if (v == column)
               {
-                g
-                        .fillRect(x * av.charWidth, y, av.charWidth,
-                                av.charHeight);
+                g.fillRect(x * av.charWidth, y, av.charWidth, av.charHeight);
               }
             }
           }
@@ -1096,9 +1094,7 @@ public class AnnotationPanel extends JPanel implements MouseListener,
           if (sCol == 0 || row.annotations[sCol - 1] == null
                   || row.annotations[sCol - 1].secondaryStructure != 'H')
           {
-            g
-                    .fillArc(lastSSX, y + 4 + iconOffset, av.charWidth, 8,
-                            90, 180);
+            g.fillArc(lastSSX, y + 4 + iconOffset, av.charWidth, 8, 90, 180);
             x1 += av.charWidth / 2;
           }
 
@@ -1416,8 +1412,8 @@ public class AnnotationPanel extends JPanel implements MouseListener,
                                                       // group(aa.groupRef.cs==null)
                                                       // ? av.textColour2 :
                                                       // cs.findColour(dc));
-            g.drawChars(dc, 0, 1, x * av.charWidth, (int) (ht + lm
-                    .getHeight()));
+            g.drawChars(dc, 0, 1, x * av.charWidth,
+                    (int) (ht + lm.getHeight()));
             // ht+=g.getFontMetrics().getAscent()-g.getFontMetrics().getDescent();
           }
         }
@@ -1447,16 +1443,16 @@ public class AnnotationPanel extends JPanel implements MouseListener,
               && aa.groupRef.isShowSequenceLogo())
       {
         return AAFrequency.extractProfile(
-                aa.groupRef.consensusData[column], aa.groupRef
-                        .getIgnoreGapsConsensus());
+                aa.groupRef.consensusData[column],
+                aa.groupRef.getIgnoreGapsConsensus());
       }
       // TODO extend annotation row to enable dynamic and static profile data to
       // be stored
       if (aa.groupRef == null && aa.sequenceRef == null
               && av.isShowSequenceLogo())
       {
-        return AAFrequency.extractProfile(av.hconsensus[column], av
-                .getIgnoreGapsConsensus());
+        return AAFrequency.extractProfile(av.hconsensus[column],
+                av.getIgnoreGapsConsensus());
       }
     }
     return null;
index 868f306..041d6a2 100644 (file)
@@ -49,7 +49,7 @@ public class AppJmol extends GStructureViewer implements Runnable,
   AppJmolBinding jmb;
 
   JPanel scriptWindow;
-  
+
   JSplitPane splitPane;
 
   RenderPanel renderPanel;
@@ -255,12 +255,13 @@ public class AppJmol extends GStructureViewer implements Runnable,
    * @param pdbentry
    * @param seq
    * @param chains
-   * @param alignFrame 
+   * @param alignFrame
    * @param align
    *          if true, new structure(s) will be align using associated alignment
    */
   private void addStructure(final PDBEntry pdbentry, final SequenceI[] seq,
-          final String[] chains, final boolean b, final IProgressIndicator alignFrame)
+          final String[] chains, final boolean b,
+          final IProgressIndicator alignFrame)
   {
     if (pdbentry.getFile() == null)
     {
@@ -298,7 +299,7 @@ public class AppJmol extends GStructureViewer implements Runnable,
     addingStructures = true;
     _started = false;
     alignAddedStructures = b;
-    progressBar = alignFrame; // visual indication happens on caller frame. 
+    progressBar = alignFrame; // visual indication happens on caller frame.
     (worker = new Thread(this)).start();
     return;
   }
@@ -340,8 +341,10 @@ public class AppJmol extends GStructureViewer implements Runnable,
       bl.setVgap(0);
       scriptWindow = new JPanel(bl);
       scriptWindow.setVisible(false);
-    };
-    jmb.allocateViewer(renderPanel, true, "", null, null, "", scriptWindow, null);
+    }
+    ;
+    jmb.allocateViewer(renderPanel, true, "", null, null, "", scriptWindow,
+            null);
     jmb.newJmolPopup(true, "Jmol", true);
     jmb.evalStateCommand(command);
     jmb.setFinishedInit(true);
@@ -414,7 +417,7 @@ public class AppJmol extends GStructureViewer implements Runnable,
   void closeViewer()
   {
     jmb.closeViewer();
-    
+
     // TODO: check for memory leaks where instance isn't finalised because jmb
     // holds a reference to the window
     jmb = null;
@@ -445,11 +448,10 @@ public class AppJmol extends GStructureViewer implements Runnable,
           // retrieve the pdb and store it locally
           AlignmentI pdbseq = null;
           pdbid = jmb.pdbentry[pi].getId();
-          long hdl=pdbid.hashCode()-System.currentTimeMillis();
+          long hdl = pdbid.hashCode() - System.currentTimeMillis();
           if (progressBar != null)
           {
-            progressBar.setProgressBar("Fetching PDB " + pdbid,
-                    hdl);
+            progressBar.setProgressBar("Fetching PDB " + pdbid, hdl);
           }
           try
           {
@@ -557,23 +559,24 @@ public class AppJmol extends GStructureViewer implements Runnable,
         {
           Cache.log.error("Couldn't add files to Jmol viewer!", ex);
         }
-          long lastnotify=jmb.getLoadNotifiesHandled();
-          // need to wait around until script has finished
-          while (lastnotify>=jmb.getLoadNotifiesHandled()); 
+        long lastnotify = jmb.getLoadNotifiesHandled();
+        // need to wait around until script has finished
+        while (lastnotify >= jmb.getLoadNotifiesHandled())
+          ;
+        {
+          try
           {
-            try
-            {
-              Thread.sleep(35);
-            } catch (Exception e)
-            {
-            }
-          }
-          // refresh the sequence colours for the new structure(s)
-          jmb.updateColours(ap);
-          // do superposition if asked to
-          if (alignAddedStructures)
+            Thread.sleep(35);
+          } catch (Exception e)
           {
-            javax.swing.SwingUtilities.invokeLater(new Runnable()
+          }
+        }
+        // refresh the sequence colours for the new structure(s)
+        jmb.updateColours(ap);
+        // do superposition if asked to
+        if (alignAddedStructures)
+        {
+          javax.swing.SwingUtilities.invokeLater(new Runnable()
           {
             public void run()
             {
@@ -787,7 +790,8 @@ public class AppJmol extends GStructureViewer implements Runnable,
     {
     }
   }
-public void showConsole(boolean showConsole)
+
+  public void showConsole(boolean showConsole)
   {
 
     if (showConsole)
@@ -808,9 +812,9 @@ public void showConsole(boolean showConsole)
     else
     {
       if (splitPane != null)
-        {
-          splitPane.setVisible(false);
-        }
+      {
+        splitPane.setVisible(false);
+      }
 
       splitPane = null;
 
@@ -819,6 +823,7 @@ public void showConsole(boolean showConsole)
 
     validate();
   }
+
   class RenderPanel extends JPanel
   {
     final Dimension currentSize = new Dimension();
index 38c9e70..ed56ebb 100644 (file)
@@ -35,7 +35,7 @@ import org.jmol.api.JmolViewer;
 import org.jmol.popup.JmolPopup;
 import org.openscience.jmol.app.jmolpanel.AppConsole;
 
-public class AppJmolBinding extends jalview.ext.jmol.JalviewJmolBinding 
+public class AppJmolBinding extends jalview.ext.jmol.JalviewJmolBinding
 {
 
   /**
@@ -110,11 +110,14 @@ public class AppJmolBinding extends jalview.ext.jmol.JalviewJmolBinding
   public void refreshGUI()
   {
     // appJmolWindow.repaint();
-    javax.swing.SwingUtilities.invokeLater(new Runnable() {
-      public void run() {
+    javax.swing.SwingUtilities.invokeLater(new Runnable()
+    {
+      public void run()
+      {
         appJmolWindow.updateTitleAndMenus();
         appJmolWindow.revalidate();
-      }});
+      }
+    });
   }
 
   public void updateColours(Object source)
@@ -129,9 +132,9 @@ public class AppJmolBinding extends jalview.ext.jmol.JalviewJmolBinding
   public void notifyScriptTermination(String strStatus, int msWalltime)
   {
     // todo - script termination doesn't happen ?
-    //if (console != null)
-      //console.notifyScriptTermination(strStatus,
-      //        msWalltime);
+    // if (console != null)
+    // console.notifyScriptTermination(strStatus,
+    // msWalltime);
   }
 
   public void showUrl(String url)
@@ -159,7 +162,8 @@ public class AppJmolBinding extends jalview.ext.jmol.JalviewJmolBinding
 
   }
 
-  public void showConsole(boolean b) {
+  public void showConsole(boolean b)
+  {
     appJmolWindow.showConsole(b);
   }
 
@@ -193,12 +197,19 @@ public class AppJmolBinding extends jalview.ext.jmol.JalviewJmolBinding
   protected void releaseUIResources()
   {
     appJmolWindow = null;
-    if (console!=null) {
-      try {
+    if (console != null)
+    {
+      try
+      {
         console.setVisible(false);
-      } catch (Error e) {} catch (Exception x) {};
-      console=null;
+      } catch (Error e)
+      {
+      } catch (Exception x)
+      {
+      }
+      ;
+      console = null;
     }
-    
+
   }
 }
index 20c672a..823b594 100644 (file)
@@ -39,11 +39,12 @@ public class Console extends WindowAdapter implements WindowListener,
   private JFrame frame;
 
   private JTextArea textArea;
-/* unused - tally and limit for lines in console window
-  int lines = 0;
 
-  int lim = 1000;
-*/
+  /*
+   * unused - tally and limit for lines in console window int lines = 0;
+   * 
+   * int lim = 1000;
+   */
   int byteslim = 102400, bytescut = 76800; // 100k and 75k cut point.
 
   private Thread reader, reader2, textAppender;
@@ -76,11 +77,13 @@ public class Console extends WindowAdapter implements WindowListener,
   {
     initConsole(visible, true);
   }
-  
+
   /**
    * 
-   * @param visible - open the window
-   * @param redirect - redirect std*
+   * @param visible
+   *          - open the window
+   * @param redirect
+   *          - redirect std*
    */
   private void initConsole(boolean visible, boolean redirect)
   {
@@ -102,7 +105,9 @@ public class Console extends WindowAdapter implements WindowListener,
     if (redirect)
     {
       redirectStreams();
-    } else {
+    }
+    else
+    {
       unredirectStreams();
     }
     quit = false; // signals the Threads that they should exit
@@ -121,45 +126,50 @@ public class Console extends WindowAdapter implements WindowListener,
     textAppender.setDaemon(true);
     textAppender.start();
   }
-  PipedOutputStream pout=null,perr=null;
-  public void redirectStreams() {
-    if (pout==null)
+
+  PipedOutputStream pout = null, perr = null;
+
+  public void redirectStreams()
+  {
+    if (pout == null)
     {
       try
       {
         pout = new PipedOutputStream(this.pin);
         System.setOut(new PrintStream(pout, true));
-    } catch (java.io.IOException io)
-    {
-      textArea.append("Couldn't redirect STDOUT to this console\n"
-              + io.getMessage());
-      io.printStackTrace(stderr);
-    } catch (SecurityException se)
-    {
-      textArea.append("Couldn't redirect STDOUT to this console\n"
-              + se.getMessage());
-      se.printStackTrace(stderr);
-    }
+      } catch (java.io.IOException io)
+      {
+        textArea.append("Couldn't redirect STDOUT to this console\n"
+                + io.getMessage());
+        io.printStackTrace(stderr);
+      } catch (SecurityException se)
+      {
+        textArea.append("Couldn't redirect STDOUT to this console\n"
+                + se.getMessage());
+        se.printStackTrace(stderr);
+      }
 
-    try
-    {
-      perr = new PipedOutputStream(this.pin2);
-      System.setErr(new PrintStream(perr, true));
-    } catch (java.io.IOException io)
-    {
-      textArea.append("Couldn't redirect STDERR to this console\n"
-              + io.getMessage());
-      io.printStackTrace(stderr);
-    } catch (SecurityException se)
-    {
-      textArea.append("Couldn't redirect STDERR to this console\n"
-              + se.getMessage());
-      se.printStackTrace(stderr);
-    }
+      try
+      {
+        perr = new PipedOutputStream(this.pin2);
+        System.setErr(new PrintStream(perr, true));
+      } catch (java.io.IOException io)
+      {
+        textArea.append("Couldn't redirect STDERR to this console\n"
+                + io.getMessage());
+        io.printStackTrace(stderr);
+      } catch (SecurityException se)
+      {
+        textArea.append("Couldn't redirect STDERR to this console\n"
+                + se.getMessage());
+        se.printStackTrace(stderr);
+      }
     }
   }
-  public void unredirectStreams() {
-    if (pout!=null)
+
+  public void unredirectStreams()
+  {
+    if (pout != null)
     {
       try
       {
@@ -167,37 +177,37 @@ public class Console extends WindowAdapter implements WindowListener,
         pout.flush();
         pout.close();
         pin = new PipedInputStream();
-        pout=null;
-    } catch (java.io.IOException io)
-    {
-      textArea.append("Couldn't unredirect STDOUT to this console\n"
-              + io.getMessage());
-      io.printStackTrace(stderr);
-    } catch (SecurityException se)
-    {
-      textArea.append("Couldn't unredirect STDOUT to this console\n"
-              + se.getMessage());
-      se.printStackTrace(stderr);
-    }
+        pout = null;
+      } catch (java.io.IOException io)
+      {
+        textArea.append("Couldn't unredirect STDOUT to this console\n"
+                + io.getMessage());
+        io.printStackTrace(stderr);
+      } catch (SecurityException se)
+      {
+        textArea.append("Couldn't unredirect STDOUT to this console\n"
+                + se.getMessage());
+        se.printStackTrace(stderr);
+      }
 
-    try
-    {
-      System.setErr(stderr);
-      perr.flush();
-      perr.close();
-      pin2 = new PipedInputStream();
-      perr = null;
-    } catch (java.io.IOException io)
-    {
-      textArea.append("Couldn't unredirect STDERR to this console\n"
-              + io.getMessage());
+      try
+      {
+        System.setErr(stderr);
+        perr.flush();
+        perr.close();
+        pin2 = new PipedInputStream();
+        perr = null;
+      } catch (java.io.IOException io)
+      {
+        textArea.append("Couldn't unredirect STDERR to this console\n"
+                + io.getMessage());
         io.printStackTrace(stderr);
-    } catch (SecurityException se)
-    {
-      textArea.append("Couldn't unredirect STDERR to this console\n"
-              + se.getMessage());
-      se.printStackTrace(stderr);
-    }
+      } catch (SecurityException se)
+      {
+        textArea.append("Couldn't unredirect STDERR to this console\n"
+                + se.getMessage());
+        se.printStackTrace(stderr);
+      }
     }
   }
 
@@ -205,7 +215,7 @@ public class Console extends WindowAdapter implements WindowListener,
   {
     // testing part
     // you may omit this part for your application
-    // 
+    //
 
     System.out.println("Hello World 2");
     System.out.println("All fonts available to Graphic2D:\n");
@@ -245,11 +255,13 @@ public class Console extends WindowAdapter implements WindowListener,
   {
     this(desktop, true);
   }
+
   /**
    * attach a console to the desktop - the desktop will open it if requested.
    * 
    * @param desktop
-   * @param showjconsole - if true, then redirect stdout immediately
+   * @param showjconsole
+   *          - if true, then redirect stdout immediately
    */
   public Console(Desktop desktop, boolean showjconsole)
   {
@@ -274,40 +286,37 @@ public class Console extends WindowAdapter implements WindowListener,
     org.apache.log4j.Logger.getRootLogger().addAppender(jappender);
   }
 
-
   public synchronized void stopConsole()
   {
     quit = true;
     this.notifyAll();
-    /*reader.notify(); 
-    reader2.notify(); 
-    if (errorThrower!=null) 
-      errorThrower.notify(); // stop all threads
-    if (textAppender!=null)
-      textAppender.notify();
-    */
-    if (pout!=null)
-    {
-    try
-    {
-      reader.join(10);
-      pin.close();
-    } catch (Exception e)
-    {
-    }
-    try
-    {
-      reader2.join(10);
-      pin2.close();
-    } catch (Exception e)
+    /*
+     * reader.notify(); reader2.notify(); if (errorThrower!=null)
+     * errorThrower.notify(); // stop all threads if (textAppender!=null)
+     * textAppender.notify();
+     */
+    if (pout != null)
     {
-    }
-    try
-    {
-      textAppender.join(10);
-    } catch (Exception e)
-    {
-    }
+      try
+      {
+        reader.join(10);
+        pin.close();
+      } catch (Exception e)
+      {
+      }
+      try
+      {
+        reader2.join(10);
+        pin2.close();
+      } catch (Exception e)
+      {
+      }
+      try
+      {
+        textAppender.join(10);
+      } catch (Exception e)
+      {
+      }
     }
     if (!frame.isVisible())
     {
@@ -321,7 +330,9 @@ public class Console extends WindowAdapter implements WindowListener,
     frame.setVisible(false);
     closeConsoleGui();
   }
-  private void closeConsoleGui() {
+
+  private void closeConsoleGui()
+  {
     updateConsole = false;
     if (parent == null)
     {
@@ -338,7 +349,7 @@ public class Console extends WindowAdapter implements WindowListener,
   {
     frame.setVisible(false); // default behaviour of JFrame
     closeConsoleGui();
-    
+
     // frame.dispose();
   }
 
@@ -354,7 +365,7 @@ public class Console extends WindowAdapter implements WindowListener,
     {
       while (Thread.currentThread() == reader)
       {
-        if (pin==null || pin.available() == 0)
+        if (pin == null || pin.available() == 0)
         {
           try
           {
@@ -374,8 +385,8 @@ public class Console extends WindowAdapter implements WindowListener,
           stdout.print(input);
           long time = System.nanoTime();
           appendToTextArea(input);
-          //stderr.println("Time taken to stdout append:\t"
-          //        + (System.nanoTime() - time) + " ns");
+          // stderr.println("Time taken to stdout append:\t"
+          // + (System.nanoTime() - time) + " ns");
           // lines++;
         }
         if (quit)
@@ -403,8 +414,8 @@ public class Console extends WindowAdapter implements WindowListener,
           stderr.print(input);
           long time = System.nanoTime();
           appendToTextArea(input);
-          //stderr.println("Time taken to stderr append:\t"
-          //        + (System.nanoTime() - time) + " ns");
+          // stderr.println("Time taken to stderr append:\t"
+          // + (System.nanoTime() - time) + " ns");
           // lines++;
         }
         if (quit)
@@ -541,8 +552,8 @@ public class Console extends WindowAdapter implements WindowListener,
           {
             long time = System.nanoTime();
             textArea.replaceRange(header, 0, tlength - bytescut);
-            //stderr.println("Time taken to cut:\t"
-            //        + (System.nanoTime() - time) + " ns");
+            // stderr.println("Time taken to cut:\t"
+            // + (System.nanoTime() - time) + " ns");
           }
           else
           {
@@ -612,19 +623,23 @@ public class Console extends WindowAdapter implements WindowListener,
   }
 
   /**
-   * set the banner that appears at the top of the console output 
+   * set the banner that appears at the top of the console output
+   * 
    * @param string
    */
   public void setHeader(String string)
   {
     header = string;
-    if (header.charAt(header.length()-1)!='\n') {
-      header+="\n";
+    if (header.charAt(header.length() - 1) != '\n')
+    {
+      header += "\n";
     }
     textArea.insert(header, 0);
   }
+
   /**
    * get the banner
+   * 
    * @return
    */
   public String getHeader()
index 4432d89..f608a52 100755 (executable)
@@ -91,8 +91,8 @@ public class CutAndPasteTransfer extends GCutAndPasteTransfer
 
   public void save_actionPerformed(ActionEvent e)
   {
-    JalviewFileChooser chooser = new JalviewFileChooser(jalview.bin.Cache
-            .getProperty("LAST_DIRECTORY"));
+    JalviewFileChooser chooser = new JalviewFileChooser(
+            jalview.bin.Cache.getProperty("LAST_DIRECTORY"));
 
     chooser.setAcceptAllFileFilterUsed(false);
     chooser.setFileView(new JalviewFileView());
index adcb924..8ce0995 100755 (executable)
@@ -107,7 +107,9 @@ public class DasSourceBrowser extends GDasSourceBrowser implements
       init();\r
     }\r
   }\r
+\r
   FeatureSettings fs = null;\r
+\r
   public DasSourceBrowser()\r
   {\r
     this(null);\r
@@ -189,11 +191,10 @@ public class DasSourceBrowser extends GDasSourceBrowser implements
       text.append("<font color=\"#0000FF\">URL:</font> "\r
               + dasSources[i].getUrl() + "<br>");\r
 \r
-      text\r
-              .append("<font color=\"#0000FF\">Admin Email:</font> <a href=\"mailto:"\r
-                      + dasSources[i].getAdminemail()\r
-                      + "\">"\r
-                      + dasSources[i].getAdminemail() + "</a>" + "<br>");\r
+      text.append("<font color=\"#0000FF\">Admin Email:</font> <a href=\"mailto:"\r
+              + dasSources[i].getAdminemail()\r
+              + "\">"\r
+              + dasSources[i].getAdminemail() + "</a>" + "<br>");\r
 \r
       text.append("<font color=\"#0000FF\">Registered at:</font> "\r
               + dasSources[i].getRegisterDate() + "<br>");\r
@@ -291,7 +292,7 @@ public class DasSourceBrowser extends GDasSourceBrowser implements
 \r
   private void setParentGuiEnabled(boolean b)\r
   {\r
-    if (fs!=null)\r
+    if (fs != null)\r
     {\r
       fs.fetchDAS.setEnabled(b);\r
       fs.saveDAS.setEnabled(b);\r
@@ -587,8 +588,8 @@ public class DasSourceBrowser extends GDasSourceBrowser implements
         {\r
           tmp[index] = dasSources[i];\r
           data[index][0] = dasSources[i].getNickname();\r
-          data[index][1] = new Boolean(selectedSources\r
-                  .contains(dasSources[i].getNickname()));\r
+          data[index][1] = new Boolean(\r
+                  selectedSources.contains(dasSources[i].getNickname()));\r
           index++;\r
         }\r
       }\r
@@ -688,14 +689,13 @@ public class DasSourceBrowser extends GDasSourceBrowser implements
         // HAVE COORDINATE SYSTEMS, INFO WHICH AT PRESENT\r
         // IS ADDED FROM THE REGISTRY\r
         names.add(ds.getNickname());\r
-        selected\r
-                .add(new Boolean(selectedSources.contains(ds.getNickname())));\r
+        selected.add(new Boolean(selectedSources.contains(ds.getNickname())));\r
         continue;\r
       }\r
 \r
       if (!selectedInList(dummyFeatureList, ds.getCapabilities())\r
-              || !selectedInList(filter3.getSelectedValues(), ds\r
-                      .getLabels()))\r
+              || !selectedInList(filter3.getSelectedValues(),\r
+                      ds.getLabels()))\r
       {\r
         continue;\r
       }\r
@@ -805,8 +805,8 @@ public class DasSourceBrowser extends GDasSourceBrowser implements
       }\r
     }\r
 \r
-    properties.setProperty(jalview.bin.Cache.DAS_ACTIVE_SOURCE, sb\r
-            .toString());\r
+    properties.setProperty(jalview.bin.Cache.DAS_ACTIVE_SOURCE,\r
+            sb.toString());\r
 \r
     if (localSources != null)\r
     {\r
@@ -822,8 +822,8 @@ public class DasSourceBrowser extends GDasSourceBrowser implements
                 + ((DasSource) localSources.get(token)).getUrl() + "\t");\r
       }\r
 \r
-      properties.setProperty(jalview.bin.Cache.DAS_LOCAL_SOURCE, sb\r
-              .toString());\r
+      properties.setProperty(jalview.bin.Cache.DAS_LOCAL_SOURCE,\r
+              sb.toString());\r
     }\r
 \r
   }\r
@@ -951,6 +951,7 @@ public class DasSourceBrowser extends GDasSourceBrowser implements
 \r
   /**\r
    * disable or enable the buttons on the source browser\r
+   * \r
    * @param b\r
    */\r
   public void setGuiEnabled(boolean b)\r
index 6910f28..3205dab 100755 (executable)
@@ -83,8 +83,7 @@ public class Desktop extends jalview.jbgui.GDesktop implements
 
     /**
      * @param listener
-     * @see java.beans.PropertyChangeSupport#addPropertyChangeListener(
-     *      java.beans.PropertyChangeListener)
+     * @see java.beans.PropertyChangeSupport#addPropertyChangeListener(java.beans.PropertyChangeListener)
      */
     public void addJalviewPropertyChangeListener(
             PropertyChangeListener listener)
@@ -414,13 +413,17 @@ public class Desktop extends jalview.jbgui.GDesktop implements
         iw = (int) (iw * sw);
         iy = (int) (iy * sh);
         ih = (int) (ih * sh);
-        while (ix>=screenSize.width) {
-          jalview.bin.Cache.log.debug("Window geometry location recall error: shifting horizontal to within screenbounds.");
-          ix-=screenSize.width;
+        while (ix >= screenSize.width)
+        {
+          jalview.bin.Cache.log
+                  .debug("Window geometry location recall error: shifting horizontal to within screenbounds.");
+          ix -= screenSize.width;
         }
-        while (iy>=screenSize.height) {
-          jalview.bin.Cache.log.debug("Window geometry location recall error: shifting vertical to within screenbounds.");
-                    iy-=screenSize.height;
+        while (iy >= screenSize.height)
+        {
+          jalview.bin.Cache.log
+                  .debug("Window geometry location recall error: shifting vertical to within screenbounds.");
+          iy -= screenSize.height;
         }
         jalview.bin.Cache.log.debug("Got last known dimensions for "
                 + windowName + ": x:" + ix + " y:" + iy + " width:" + iw
@@ -584,34 +587,33 @@ public class Desktop extends jalview.jbgui.GDesktop implements
     }
 
     final JMenuItem menuItem = new JMenuItem(title);
-    frame
-            .addInternalFrameListener(new javax.swing.event.InternalFrameAdapter()
-            {
-              public void internalFrameActivated(
-                      javax.swing.event.InternalFrameEvent evt)
-              {
-                JInternalFrame itf = desktop.getSelectedFrame();
-                if (itf != null)
-                {
-                  itf.requestFocus();
-                }
+    frame.addInternalFrameListener(new javax.swing.event.InternalFrameAdapter()
+    {
+      public void internalFrameActivated(
+              javax.swing.event.InternalFrameEvent evt)
+      {
+        JInternalFrame itf = desktop.getSelectedFrame();
+        if (itf != null)
+        {
+          itf.requestFocus();
+        }
 
-              }
+      }
 
-              public void internalFrameClosed(
-                      javax.swing.event.InternalFrameEvent evt)
-              {
-                PaintRefresher.RemoveComponent(frame);
-                openFrameCount--;
-                windowMenu.remove(menuItem);
-                JInternalFrame itf = desktop.getSelectedFrame();
-                if (itf != null)
-                {
-                  itf.requestFocus();
-                }
-                System.gc();
-              };
-            });
+      public void internalFrameClosed(
+              javax.swing.event.InternalFrameEvent evt)
+      {
+        PaintRefresher.RemoveComponent(frame);
+        openFrameCount--;
+        windowMenu.remove(menuItem);
+        JInternalFrame itf = desktop.getSelectedFrame();
+        if (itf != null)
+        {
+          itf.requestFocus();
+        }
+        System.gc();
+      };
+    });
 
     menuItem.addActionListener(new ActionListener()
     {
@@ -763,8 +765,8 @@ public class Desktop extends jalview.jbgui.GDesktop implements
    */
   public void inputLocalFileMenuItem_actionPerformed(AlignViewport viewport)
   {
-    JalviewFileChooser chooser = new JalviewFileChooser(jalview.bin.Cache
-            .getProperty("LAST_DIRECTORY"),
+    JalviewFileChooser chooser = new JalviewFileChooser(
+            jalview.bin.Cache.getProperty("LAST_DIRECTORY"),
             jalview.io.AppletFormatAdapter.READABLE_EXTENSIONS,
             jalview.io.AppletFormatAdapter.READABLE_FNAMES,
             jalview.bin.Cache.getProperty("DEFAULT_FILE_FORMAT"));
@@ -944,22 +946,20 @@ public class Desktop extends jalview.jbgui.GDesktop implements
     if (!jalview.bin.Cache.getProperty("LATEST_VERSION").equals(
             jalview.bin.Cache.getProperty("VERSION")))
     {
-      message
-              .append("\n\n!! Jalview version "
-                      + jalview.bin.Cache.getProperty("LATEST_VERSION")
-                      + " is available for download from http://www.jalview.org !!\n");
+      message.append("\n\n!! Jalview version "
+              + jalview.bin.Cache.getProperty("LATEST_VERSION")
+              + " is available for download from http://www.jalview.org !!\n");
 
     }
     // TODO: update this text for each release or centrally store it for lite
     // and application
-    message
-            .append("\nAuthors:  Andrew Waterhouse, Jim Procter, Michele Clamp, James Cuff, Steve Searle,\n    David Martin & Geoff Barton."
-                    + "\nDevelopment managed by The Barton Group, University of Dundee, Scotland, UK.\n"
-                    + "\nFor help, see the FAQ at www.jalview.org and/or join the jalview-discuss@jalview.org mailing list\n"
-                    + "\nIf  you use Jalview, please cite:"
-                    + "\nWaterhouse, A.M., Procter, J.B., Martin, D.M.A, Clamp, M. and Barton, G. J. (2009)"
-                    + "\nJalview Version 2 - a multiple sequence alignment editor and analysis workbench"
-                    + "\nBioinformatics doi: 10.1093/bioinformatics/btp033");
+    message.append("\nAuthors:  Andrew Waterhouse, Jim Procter, Michele Clamp, James Cuff, Steve Searle,\n    David Martin & Geoff Barton."
+            + "\nDevelopment managed by The Barton Group, University of Dundee, Scotland, UK.\n"
+            + "\nFor help, see the FAQ at www.jalview.org and/or join the jalview-discuss@jalview.org mailing list\n"
+            + "\nIf  you use Jalview, please cite:"
+            + "\nWaterhouse, A.M., Procter, J.B., Martin, D.M.A, Clamp, M. and Barton, G. J. (2009)"
+            + "\nJalview Version 2 - a multiple sequence alignment editor and analysis workbench"
+            + "\nBioinformatics doi: 10.1093/bioinformatics/btp033");
     JOptionPane.showInternalMessageDialog(Desktop.desktop,
 
     message.toString(), "About Jalview", JOptionPane.INFORMATION_MESSAGE);
@@ -1172,10 +1172,10 @@ public class Desktop extends jalview.jbgui.GDesktop implements
    */
   public void saveState_actionPerformed(ActionEvent e)
   {
-    JalviewFileChooser chooser = new JalviewFileChooser(jalview.bin.Cache
-            .getProperty("LAST_DIRECTORY"), new String[]
-    { "jar" }, new String[]
-    { "Jalview Project" }, "Jalview Project");
+    JalviewFileChooser chooser = new JalviewFileChooser(
+            jalview.bin.Cache.getProperty("LAST_DIRECTORY"), new String[]
+            { "jar" }, new String[]
+            { "Jalview Project" }, "Jalview Project");
 
     chooser.setFileView(new JalviewFileView());
     chooser.setDialogTitle("Save State");
@@ -1185,23 +1185,28 @@ public class Desktop extends jalview.jbgui.GDesktop implements
     if (value == JalviewFileChooser.APPROVE_OPTION)
     {
       java.io.File choice = chooser.getSelectedFile();
-      setProgressBar("Saving jalview project "
-              + choice.getName(), choice.hashCode());
+      setProgressBar("Saving jalview project " + choice.getName(),
+              choice.hashCode());
       jalview.bin.Cache.setProperty("LAST_DIRECTORY", choice.getParent());
       // TODO catch and handle errors for savestate
-      try {
+      try
+      {
         new Jalview2XML().SaveState(choice);
       } catch (OutOfMemoryError oom)
       {
-        new OOMWarning("Whilst saving current state to "+choice.getName(), oom);
-      }
-      catch (Exception ex)
+        new OOMWarning(
+                "Whilst saving current state to " + choice.getName(), oom);
+      } catch (Exception ex)
       {
-        Cache.log.error("Problems whilst trying to save to "+choice.getName(),ex);
-        JOptionPane.showMessageDialog(this, "Error whilst saving current state to "+choice.getName(), "Couldn't save project", JOptionPane.WARNING_MESSAGE);
+        Cache.log
+                .error("Problems whilst trying to save to "
+                        + choice.getName(), ex);
+        JOptionPane.showMessageDialog(this,
+                "Error whilst saving current state to " + choice.getName(),
+                "Couldn't save project", JOptionPane.WARNING_MESSAGE);
       }
       setProgressBar(null, choice.hashCode());
-      
+
     }
   }
 
@@ -1213,10 +1218,10 @@ public class Desktop extends jalview.jbgui.GDesktop implements
    */
   public void loadState_actionPerformed(ActionEvent e)
   {
-    JalviewFileChooser chooser = new JalviewFileChooser(jalview.bin.Cache
-            .getProperty("LAST_DIRECTORY"), new String[]
-    { "jar" }, new String[]
-    { "Jalview Project" }, "Jalview Project");
+    JalviewFileChooser chooser = new JalviewFileChooser(
+            jalview.bin.Cache.getProperty("LAST_DIRECTORY"), new String[]
+            { "jar" }, new String[]
+            { "Jalview Project" }, "Jalview Project");
     chooser.setFileView(new JalviewFileView());
     chooser.setDialogTitle("Restore state");
 
@@ -1227,22 +1232,27 @@ public class Desktop extends jalview.jbgui.GDesktop implements
       final String choice = chooser.getSelectedFile().getAbsolutePath();
       jalview.bin.Cache.setProperty("LAST_DIRECTORY", chooser
               .getSelectedFile().getParent());
-      new Thread(new Runnable() {
-        public void run() {
-          setProgressBar("loading jalview project "
-              + choice, choice.hashCode());
-          try {
-      new Jalview2XML().LoadJalviewAlign(choice); } 
-      catch (OutOfMemoryError oom)
+      new Thread(new Runnable()
       {
-        new OOMWarning("Whilst loading project from "+choice, oom);
-      }
-      catch (Exception ex)
-      {
-        Cache.log.error("Problems whilst loading project from "+choice,ex);
-        JOptionPane.showMessageDialog(Desktop.desktop, "Error whilst loading project from "+choice, "Couldn't load project", JOptionPane.WARNING_MESSAGE);
-      }
-      setProgressBar(null, choice.hashCode());
+        public void run()
+        {
+          setProgressBar("loading jalview project " + choice,
+                  choice.hashCode());
+          try
+          {
+            new Jalview2XML().LoadJalviewAlign(choice);
+          } catch (OutOfMemoryError oom)
+          {
+            new OOMWarning("Whilst loading project from " + choice, oom);
+          } catch (Exception ex)
+          {
+            Cache.log.error("Problems whilst loading project from "
+                    + choice, ex);
+            JOptionPane.showMessageDialog(Desktop.desktop,
+                    "Error whilst loading project from " + choice,
+                    "Couldn't load project", JOptionPane.WARNING_MESSAGE);
+          }
+          setProgressBar(null, choice.hashCode());
         }
       }).start();
     }
@@ -1487,13 +1497,12 @@ public class Desktop extends jalview.jbgui.GDesktop implements
     if (v_client == null)
     {
       // Load and try to start a session.
-      JalviewFileChooser chooser = new JalviewFileChooser(jalview.bin.Cache
-              .getProperty("LAST_DIRECTORY"));
+      JalviewFileChooser chooser = new JalviewFileChooser(
+              jalview.bin.Cache.getProperty("LAST_DIRECTORY"));
 
       chooser.setFileView(new JalviewFileView());
       chooser.setDialogTitle("Open a saved VAMSAS session");
-      chooser
-              .setToolTipText("select a vamsas session to be opened as a new vamsas session.");
+      chooser.setToolTipText("select a vamsas session to be opened as a new vamsas session.");
 
       int value = chooser.showOpenDialog(this);
 
@@ -1548,8 +1557,8 @@ public class Desktop extends jalview.jbgui.GDesktop implements
       }
       bis.close();
       fos.close();
-      v_client = new jalview.gui.VamsasApplication(this, file, url
-              .toExternalForm());
+      v_client = new jalview.gui.VamsasApplication(this, file,
+              url.toExternalForm());
     } catch (Exception ex)
     {
       jalview.bin.Cache.log.error(
@@ -1578,8 +1587,8 @@ public class Desktop extends jalview.jbgui.GDesktop implements
       return false;
     }
 
-    setProgressBar("Importing VAMSAS session from " + file.getName(), file
-            .hashCode());
+    setProgressBar("Importing VAMSAS session from " + file.getName(),
+            file.hashCode());
     try
     {
       v_client = new jalview.gui.VamsasApplication(this, file, null);
@@ -1593,8 +1602,8 @@ public class Desktop extends jalview.jbgui.GDesktop implements
     }
     setupVamsasConnectedGui();
     v_client.initial_update(); // TODO: thread ?
-    setProgressBar("Importing VAMSAS session from " + file.getName(), file
-            .hashCode());
+    setProgressBar("Importing VAMSAS session from " + file.getName(),
+            file.hashCode());
     return v_client.inSession();
   }
 
@@ -1744,9 +1753,9 @@ public class Desktop extends jalview.jbgui.GDesktop implements
   {
     if (v_client != null)
     {
-      JalviewFileChooser chooser = new JalviewFileChooser(jalview.bin.Cache
-              .getProperty("LAST_DIRECTORY"), new String[]
-      { "vdj" }, // TODO: VAMSAS DOCUMENT EXTENSION is VDJ
+      JalviewFileChooser chooser = new JalviewFileChooser(
+              jalview.bin.Cache.getProperty("LAST_DIRECTORY"), new String[]
+              { "vdj" }, // TODO: VAMSAS DOCUMENT EXTENSION is VDJ
               new String[]
               { "Vamsas Document" }, "Vamsas Document");
 
@@ -1917,10 +1926,11 @@ public class Desktop extends jalview.jbgui.GDesktop implements
         FontMetrics fm = g.getFontMetrics();
         if (fm != null)
         {
-          g.drawString("Total Free Memory: " + df.format(totalFreeMemory)
-                  + "MB; Max Memory: " + df.format(maxMemory) + "MB; "
-                  + df.format(percentUsage) + "%", 10, getHeight()
-                  - fm.getHeight());
+          g.drawString(
+                  "Total Free Memory: " + df.format(totalFreeMemory)
+                          + "MB; Max Memory: " + df.format(maxMemory)
+                          + "MB; " + df.format(percentUsage) + "%", 10,
+                  getHeight() - fm.getHeight());
         }
       }
     }
@@ -2084,8 +2094,10 @@ public class Desktop extends jalview.jbgui.GDesktop implements
         public void actionPerformed(ActionEvent e)
         {
           handler.cancelActivity(id);
-          us.setProgressBar("Cancelled "
-                  + ((JLabel) progressPanel.getComponent(0)).getText(), id);
+          us.setProgressBar(
+                  "Cancelled "
+                          + ((JLabel) progressPanel.getComponent(0))
+                                  .getText(), id);
         }
       });
       progressPanel.add(cancel, BorderLayout.EAST);
@@ -2120,13 +2132,15 @@ public class Desktop extends jalview.jbgui.GDesktop implements
     return v_client;
 
   }
+
   /**
    * flag set if jalview GUI is being operated programmatically
    */
-  private boolean inBatchMode=false;
+  private boolean inBatchMode = false;
 
   /**
    * check if jalview GUI is being operated programmatically
+   * 
    * @return inBatchMode
    */
   public boolean isInBatchMode()
@@ -2136,14 +2150,14 @@ public class Desktop extends jalview.jbgui.GDesktop implements
 
   /**
    * set flag if jalview GUI is being operated programmatically
-   * @param inBatchMode 
+   * 
+   * @param inBatchMode
    */
   public void setInBatchMode(boolean inBatchMode)
   {
     this.inBatchMode = inBatchMode;
   }
 
-
   public void startServiceDiscovery()
   {
     startServiceDiscovery(false);
@@ -2179,8 +2193,7 @@ public class Desktop extends jalview.jbgui.GDesktop implements
     } catch (Exception e)
     {
       Cache.log
-              .info(
-                      "Exception when trying to launch Envision2 workflow discovery.",
+              .info("Exception when trying to launch Envision2 workflow discovery.",
                       e);
       Cache.log.info(e.getStackTrace());
     }
@@ -2209,34 +2222,42 @@ public class Desktop extends jalview.jbgui.GDesktop implements
   }
 
   /**
-   * start a thread to open a URL in the configured browser. Pops up a warning dialog to the user if there is an exception when calling out to the browser to open the URL.
+   * start a thread to open a URL in the configured browser. Pops up a warning
+   * dialog to the user if there is an exception when calling out to the browser
+   * to open the URL.
+   * 
    * @param url
    */
   public static void showUrl(final String url)
   {
-    new Thread(new Runnable() {
-      public void run() {
-        try {
+    new Thread(new Runnable()
+    {
+      public void run()
+      {
+        try
+        {
           jalview.util.BrowserLauncher.openURL(url);
         } catch (Exception ex)
-        {    
+        {
           JOptionPane
                   .showInternalMessageDialog(
                           Desktop.desktop,
                           "Unixers: Couldn't find default web browser."
                                   + "\nAdd the full path to your browser in Preferences.",
-                          "Web browser not found", JOptionPane.WARNING_MESSAGE);
+                          "Web browser not found",
+                          JOptionPane.WARNING_MESSAGE);
 
           ex.printStackTrace();
         }
       }
-    }).start();    
+    }).start();
   }
 
   public static WsParamSetManager wsparamManager = null;
+
   public static ParamManager getUserParameterStore()
   {
-    if (wsparamManager==null)
+    if (wsparamManager == null)
     {
       wsparamManager = new WsParamSetManager();
     }
index 3d1a519..4d3e167 100644 (file)
@@ -68,8 +68,8 @@ public class EditNameDialog
       panel2.add(description, BorderLayout.CENTER);
       panel.add(panel2, BorderLayout.SOUTH);
     }
-    int reply = JOptionPane.showInternalConfirmDialog(parent,
-            panel, title, JOptionPane.OK_CANCEL_OPTION);
+    int reply = JOptionPane.showInternalConfirmDialog(parent, panel, title,
+            JOptionPane.OK_CANCEL_OPTION);
     if (!parent.requestFocusInWindow())
     {
       System.err.println("Bad focus for dialog!");
index 46767f0..38d6f0c 100755 (executable)
@@ -396,16 +396,16 @@ public class FeatureRenderer implements jalview.api.FeatureRenderer
         else if (sequenceFeatures[sfindex].type.equals("disulfide bond"))
         {
 
-          renderFeature(g, seq, seq
-                  .findIndex(sequenceFeatures[sfindex].begin) - 1, seq
-                  .findIndex(sequenceFeatures[sfindex].begin) - 1,
+          renderFeature(g, seq,
+                  seq.findIndex(sequenceFeatures[sfindex].begin) - 1,
+                  seq.findIndex(sequenceFeatures[sfindex].begin) - 1,
                   getColour(sequenceFeatures[sfindex])
                   // new Color(((Integer) av.featuresDisplayed
                   // .get(sequenceFeatures[sfindex].type)).intValue())
                   , start, end, y1);
-          renderFeature(g, seq, seq
-                  .findIndex(sequenceFeatures[sfindex].end) - 1, seq
-                  .findIndex(sequenceFeatures[sfindex].end) - 1,
+          renderFeature(g, seq,
+                  seq.findIndex(sequenceFeatures[sfindex].end) - 1,
+                  seq.findIndex(sequenceFeatures[sfindex].end) - 1,
                   getColour(sequenceFeatures[sfindex])
                   // new Color(((Integer) av.featuresDisplayed
                   // .get(sequenceFeatures[sfindex].type)).intValue())
@@ -417,17 +417,17 @@ public class FeatureRenderer implements jalview.api.FeatureRenderer
           if (av.showSeqFeaturesHeight
                   && sequenceFeatures[sfindex].score != Float.NaN)
           {
-            renderScoreFeature(g, seq, seq
-                    .findIndex(sequenceFeatures[sfindex].begin) - 1, seq
-                    .findIndex(sequenceFeatures[sfindex].end) - 1,
+            renderScoreFeature(g, seq,
+                    seq.findIndex(sequenceFeatures[sfindex].begin) - 1,
+                    seq.findIndex(sequenceFeatures[sfindex].end) - 1,
                     getColour(sequenceFeatures[sfindex]), start, end, y1,
                     normaliseScore(sequenceFeatures[sfindex]));
           }
           else
           {
-            renderFeature(g, seq, seq
-                    .findIndex(sequenceFeatures[sfindex].begin) - 1, seq
-                    .findIndex(sequenceFeatures[sfindex].end) - 1,
+            renderFeature(g, seq,
+                    seq.findIndex(sequenceFeatures[sfindex].begin) - 1,
+                    seq.findIndex(sequenceFeatures[sfindex].end) - 1,
                     getColour(sequenceFeatures[sfindex]), start, end, y1);
           }
         }
index 2139da5..1997dc9 100755 (executable)
@@ -165,21 +165,22 @@ public class FeatureSettings extends JPanel
     frame.setContentPane(this);
     if (new jalview.util.Platform().isAMac())
     {
-       Desktop.addInternalFrame(frame, "Sequence Feature Settings", 475, 480);
-    } else {
-       Desktop.addInternalFrame(frame, "Sequence Feature Settings", 400, 450);
+      Desktop.addInternalFrame(frame, "Sequence Feature Settings", 475, 480);
     }
-    
-    frame
-            .addInternalFrameListener(new javax.swing.event.InternalFrameAdapter()
-            {
-              public void internalFrameClosed(
-                      javax.swing.event.InternalFrameEvent evt)
-              {
-                fr.removePropertyChangeListener(change);
-                dassourceBrowser.fs = null;
-              };
-            });
+    else
+    {
+      Desktop.addInternalFrame(frame, "Sequence Feature Settings", 400, 450);
+    }
+
+    frame.addInternalFrameListener(new javax.swing.event.InternalFrameAdapter()
+    {
+      public void internalFrameClosed(
+              javax.swing.event.InternalFrameEvent evt)
+      {
+        fr.removePropertyChangeListener(change);
+        dassourceBrowser.fs = null;
+      };
+    });
     frame.setLayer(JLayeredPane.PALETTE_LAYER);
   }
 
@@ -279,8 +280,9 @@ public class FeatureSettings extends JPanel
                 // probably the color chooser!
                 table.setValueAt(colorChooser.getColor(), selectedRow, 1);
                 table.validate();
-                me.updateFeatureRenderer(((FeatureTableModel) table
-                        .getModel()).getData(), false);
+                me.updateFeatureRenderer(
+                        ((FeatureTableModel) table.getModel()).getData(),
+                        false);
               }
             }
           }
@@ -404,8 +406,8 @@ public class FeatureSettings extends JPanel
     {
       public void itemStateChanged(ItemEvent evt)
       {
-        fr.featureGroups.put(check.getText(), new Boolean(check
-                .isSelected()));
+        fr.featureGroups.put(check.getText(),
+                new Boolean(check.isSelected()));
         af.alignPanel.seqPanel.seqCanvas.repaint();
         if (af.alignPanel.overviewPanel != null)
         {
@@ -519,8 +521,8 @@ public class FeatureSettings extends JPanel
 
         data[dataIndex][0] = type;
         data[dataIndex][1] = fr.getFeatureStyle(type);
-        data[dataIndex][2] = new Boolean(af.getViewport().featuresDisplayed
-                .containsKey(type));
+        data[dataIndex][2] = new Boolean(
+                af.getViewport().featuresDisplayed.containsKey(type));
         dataIndex++;
         visibleChecks.removeElement(type);
       }
@@ -594,10 +596,10 @@ public class FeatureSettings extends JPanel
 
   void load()
   {
-    JalviewFileChooser chooser = new JalviewFileChooser(jalview.bin.Cache
-            .getProperty("LAST_DIRECTORY"), new String[]
-    { "fc" }, new String[]
-    { "Sequence Feature Colours" }, "Sequence Feature Colours");
+    JalviewFileChooser chooser = new JalviewFileChooser(
+            jalview.bin.Cache.getProperty("LAST_DIRECTORY"), new String[]
+            { "fc" }, new String[]
+            { "Sequence Feature Colours" }, "Sequence Feature Colours");
     chooser.setFileView(new jalview.io.JalviewFileView());
     chooser.setDialogTitle("Load Feature Colours");
     chooser.setToolTipText("Load");
@@ -634,8 +636,8 @@ public class FeatureSettings extends JPanel
               Cache.log.warn("Couldn't parse out graduated feature color.",
                       e);
             }
-            GraduatedColor gcol = new GraduatedColor(mincol, maxcol, newcol
-                    .getMin(), newcol.getMax());
+            GraduatedColor gcol = new GraduatedColor(mincol, maxcol,
+                    newcol.getMin(), newcol.getMax());
             if (newcol.hasAutoScale())
             {
               gcol.setAutoScaled(newcol.getAutoScale());
@@ -658,13 +660,11 @@ public class FeatureSettings extends JPanel
               }
               if (ttyp.equalsIgnoreCase("ABOVE"))
               {
-                gcol
-                        .setThreshType(AnnotationColourGradient.ABOVE_THRESHOLD);
+                gcol.setThreshType(AnnotationColourGradient.ABOVE_THRESHOLD);
               }
               if (ttyp.equalsIgnoreCase("BELOW"))
               {
-                gcol
-                        .setThreshType(AnnotationColourGradient.BELOW_THRESHOLD);
+                gcol.setThreshType(AnnotationColourGradient.BELOW_THRESHOLD);
               }
             }
             fr.setColour(name = newcol.getName(), gcol);
@@ -694,10 +694,10 @@ public class FeatureSettings extends JPanel
 
   void save()
   {
-    JalviewFileChooser chooser = new JalviewFileChooser(jalview.bin.Cache
-            .getProperty("LAST_DIRECTORY"), new String[]
-    { "fc" }, new String[]
-    { "Sequence Feature Colours" }, "Sequence Feature Colours");
+    JalviewFileChooser chooser = new JalviewFileChooser(
+            jalview.bin.Cache.getProperty("LAST_DIRECTORY"), new String[]
+            { "fc" }, new String[]
+            { "Sequence Feature Colours" }, "Sequence Feature Colours");
     chooser.setFileView(new jalview.io.JalviewFileView());
     chooser.setDialogTitle("Save Feature Colour Scheme");
     chooser.setToolTipText("Save");
@@ -1294,7 +1294,7 @@ public class FeatureSettings extends JPanel
     fetchDAS.setEnabled(true);
     cancelDAS.setEnabled(false);
     dassourceBrowser.setGuiEnabled(true);
-    
+
   }
 
   public void cancelDAS_actionPerformed(ActionEvent e)
index 0323b58..12493eb 100755 (executable)
@@ -264,7 +264,7 @@ public class FontChooser extends GFontChooser
     Cache.setProperty("FONT_NAME", fontName.getSelectedItem().toString());
     Cache.setProperty("FONT_STYLE", fontStyle.getSelectedIndex() + "");
     Cache.setProperty("FONT_SIZE", fontSize.getSelectedItem().toString());
-    Cache.setProperty("ANTI_ALIAS", Boolean.toString(smoothFont
-            .isSelected()));
+    Cache.setProperty("ANTI_ALIAS",
+            Boolean.toString(smoothFont.isSelected()));
   }
 }
index 7d8ff70..b713913 100755 (executable)
@@ -357,8 +357,8 @@ public class IdCanvas extends JPanel
           currentTextColor = Color.white;
         }
         else if ((av.getSelectionGroup() != null)
-                && av.getSelectionGroup().getSequences(null).contains(
-                        sequence))
+                && av.getSelectionGroup().getSequences(null)
+                        .contains(sequence))
         {
           currentColor = Color.lightGray;
           currentTextColor = Color.black;
index b28ed0e..a93e84c 100755 (executable)
@@ -2696,16 +2696,18 @@ public class Jalview2XML
                 {
                   public void run()
                   {
-                    AppJmol sview=null;
-                    try {
-                      sview=new AppJmol(pdbf, id, sq, alf.alignPanel, fileloc,
-                    
-                            rect, vid);
-                    }
-                    catch (OutOfMemoryError ex)
+                    AppJmol sview = null;
+                    try
+                    {
+                      sview = new AppJmol(pdbf, id, sq, alf.alignPanel,
+                              fileloc,
+
+                              rect, vid);
+                    } catch (OutOfMemoryError ex)
                     {
-                      new OOMWarning("restoring structure view for PDB id "+id,(OutOfMemoryError) ex.getCause());
-                      if (sview!=null && sview.isVisible())
+                      new OOMWarning("restoring structure view for PDB id "
+                              + id, (OutOfMemoryError) ex.getCause());
+                      if (sview != null && sview.isVisible())
                       {
                         sview.closeViewer();
                         sview.setVisible(false);
@@ -2716,8 +2718,8 @@ public class Jalview2XML
                 });
               } catch (InvocationTargetException ex)
               {
-                warn("Unexpected error when opening Jmol view.",ex);
-                
+                warn("Unexpected error when opening Jmol view.", ex);
+
               } catch (InterruptedException e)
               {
                 // e.printStackTrace();
index 3cde3bb..5d1a89b 100755 (executable)
@@ -238,8 +238,8 @@ public class Jalview2XML_V1
         {\r
           anot[ae[aa].getPosition()] = new jalview.datamodel.Annotation(\r
                   ae[aa].getDisplayCharacter(), ae[aa].getDescription(),\r
-                  ae[aa].getSecondaryStructure().charAt(0), ae[aa]\r
-                          .getValue());\r
+                  ae[aa].getSecondaryStructure().charAt(0),\r
+                  ae[aa].getValue());\r
         }\r
 \r
         jalview.datamodel.AlignmentAnnotation jaa = null;\r
@@ -318,15 +318,13 @@ public class Jalview2XML_V1
                 groups[i].getDisplayText(), groups[i].getColourText(),\r
                 groups[i].getStart(), groups[i].getEnd());\r
 \r
-        sg\r
-                .setOutlineColour(new java.awt.Color(groups[i]\r
-                        .getOutlineColour()));\r
+        sg.setOutlineColour(new java.awt.Color(groups[i].getOutlineColour()));\r
 \r
         if (groups[i].getConsThreshold() != 0)\r
         {\r
           jalview.analysis.Conservation c = new jalview.analysis.Conservation(\r
-                  "All", ResidueProperties.propHash, 3, sg\r
-                          .getSequences(null), 0, sg.getWidth() - 1);\r
+                  "All", ResidueProperties.propHash, 3,\r
+                  sg.getSequences(null), 0, sg.getWidth() - 1);\r
           c.calculate();\r
           c.verdict(false, 25);\r
           sg.cs.setConservation(c);\r
@@ -336,8 +334,8 @@ public class Jalview2XML_V1
       }\r
     }\r
 \r
-    af.setBounds(view.getXpos(), view.getYpos(), view.getWidth(), view\r
-            .getHeight());\r
+    af.setBounds(view.getXpos(), view.getYpos(), view.getWidth(),\r
+            view.getHeight());\r
     af.viewport.setStartRes(view.getStartRes());\r
     af.viewport.setStartSeq(view.getStartSeq());\r
     af.viewport.setShowAnnotation(view.getShowAnnotation());\r
@@ -413,8 +411,8 @@ public class Jalview2XML_V1
 \r
     af.setMenusFromViewport(af.viewport);\r
 \r
-    Desktop.addInternalFrame(af, view.getTitle(), view.getWidth(), view\r
-            .getHeight());\r
+    Desktop.addInternalFrame(af, view.getTitle(), view.getWidth(),\r
+            view.getHeight());\r
 \r
     // LOAD TREES\r
     // /////////////////////////////////////\r
@@ -427,9 +425,10 @@ public class Jalview2XML_V1
 \r
           Tree tree = jms.getTree(t);\r
 \r
-          TreePanel tp = af.ShowNewickTree(new jalview.io.NewickFile(tree\r
-                  .getNewick()), tree.getTitle(), tree.getWidth(), tree\r
-                  .getHeight(), tree.getXpos(), tree.getYpos());\r
+          TreePanel tp = af.ShowNewickTree(\r
+                  new jalview.io.NewickFile(tree.getNewick()),\r
+                  tree.getTitle(), tree.getWidth(), tree.getHeight(),\r
+                  tree.getXpos(), tree.getYpos());\r
 \r
           tp.fitToWindow.setState(tree.getFitToWindow());\r
           tp.fitToWindow_actionPerformed(null);\r
index a98dc4c..f41e85a 100644 (file)
@@ -26,25 +26,34 @@ import javax.swing.SwingConstants;
 
 /**
  * useful functions for building Swing GUIs
+ * 
  * @author JimP
- *
+ * 
  */
 public final class JvSwingUtils
 {
   /**
-   * wrap a bare html safe string to around 60 characters per line using a <table width=350><tr><td></td> field 
+   * wrap a bare html safe string to around 60 characters per line using a
+   * <table width=350>
+   * <tr>
+   * <td></td> field
+   * 
    * @param ttext
    * @return
    */
   public static String wrapTooltip(String ttext)
   {
-    if (ttext.length()<60)
+    if (ttext.length() < 60)
     {
       return ttext;
-    } else {
-      return "<table width=350 border=0><tr><td>"+ttext+"</td></tr></table>";
+    }
+    else
+    {
+      return "<table width=350 border=0><tr><td>" + ttext
+              + "</td></tr></table>";
     }
   }
+
   public static JButton makeButton(String label, String tooltip,
           ActionListener action)
   {
index 324b307..8bcb29c 100644 (file)
@@ -82,7 +82,7 @@ public class OOMWarning implements Runnable
                     "Out of memory",\r
                     javax.swing.JOptionPane.WARNING_MESSAGE);\r
     // hope that there's enough memory left that no more appear.\r
-    oomInprogress=false;\r
+    oomInprogress = false;\r
   }\r
 \r
 }\r
index 4d28163..2426d4d 100755 (executable)
@@ -388,8 +388,7 @@ public class OverviewPanel extends JPanel implements Runnable
   {
     int fullsizeWidth = av.alignment.getWidth() * av.getCharWidth();
     int fullsizeHeight = (av.alignment.getHeight() + av.alignment
-            .getHiddenSequences().getSize())
-            * av.getCharHeight();
+            .getHiddenSequences().getSize()) * av.getCharHeight();
 
     int startRes = av.getStartRes();
     int endRes = av.getEndRes();
index 084311f..2171e08 100755 (executable)
@@ -100,9 +100,7 @@ public class PCAPanel extends GPCAPanel implements Runnable
       return;
     }
 
-    Desktop
-            .addInternalFrame(this, "Principal component analysis", 400,
-                    400);
+    Desktop.addInternalFrame(this, "Principal component analysis", 400, 400);
 
     PaintRefresher.Register(this, av.getSequenceSetId());
 
@@ -244,12 +242,13 @@ public class PCAPanel extends GPCAPanel implements Runnable
   public void outputValues_actionPerformed(ActionEvent e)
   {
     CutAndPasteTransfer cap = new CutAndPasteTransfer();
-    try {
+    try
+    {
       cap.setText(pca.getDetails());
       Desktop.addInternalFrame(cap, "PCA details", 500, 500);
     } catch (OutOfMemoryError oom)
     {
-      new OOMWarning("opening PCA details",oom);
+      new OOMWarning("opening PCA details", oom);
       cap.dispose();
     }
   }
@@ -414,8 +413,8 @@ public class PCAPanel extends GPCAPanel implements Runnable
     else
     {
       im = new jalview.util.ImageMaker(this, jalview.util.ImageMaker.EPS,
-              "Make EPS file from PCA", width, height, null, this
-                      .getTitle());
+              "Make EPS file from PCA", width, height, null,
+              this.getTitle());
     }
 
     if (im.getGraphics() != null)
@@ -492,18 +491,24 @@ public class PCAPanel extends GPCAPanel implements Runnable
     associateViewsMenu.add(itemf);
 
   }
-  /* (non-Javadoc)
-   * @see jalview.jbgui.GPCAPanel#outputPoints_actionPerformed(java.awt.event.ActionEvent)
+
+  /*
+   * (non-Javadoc)
+   * 
+   * @see
+   * jalview.jbgui.GPCAPanel#outputPoints_actionPerformed(java.awt.event.ActionEvent
+   * )
    */
   protected void outputPoints_actionPerformed(ActionEvent e)
   {
     CutAndPasteTransfer cap = new CutAndPasteTransfer();
-    try {
+    try
+    {
       cap.setText(getPointsasCsv(false));
-      Desktop.addInternalFrame(cap, "Points for "+getTitle(), 500, 500);
+      Desktop.addInternalFrame(cap, "Points for " + getTitle(), 500, 500);
     } catch (OutOfMemoryError oom)
     {
-      new OOMWarning("exporting PCA points",oom);
+      new OOMWarning("exporting PCA points", oom);
       cap.dispose();
     }
   }
@@ -512,36 +517,42 @@ public class PCAPanel extends GPCAPanel implements Runnable
   {
     StringBuffer csv = new StringBuffer();
     csv.append("\"Sequence\"");
-    if (transformed) {
+    if (transformed)
+    {
       csv.append(",");
       csv.append(xCombobox.getSelectedIndex());
       csv.append(",");
       csv.append(yCombobox.getSelectedIndex());
       csv.append(",");
       csv.append(zCombobox.getSelectedIndex());
-    } else {
-      for (int d=1,dmax=pca.component(1).length;d<=dmax;d++)
+    }
+    else
+    {
+      for (int d = 1, dmax = pca.component(1).length; d <= dmax; d++)
       {
-        csv.append(","+d);
+        csv.append("," + d);
       }
     }
     csv.append("\n");
-    for (int s=0;s<seqs.length;s++)
+    for (int s = 0; s < seqs.length; s++)
     {
-      csv.append("\""+seqs[s].getName()+"\"");
+      csv.append("\"" + seqs[s].getName() + "\"");
       double fl[];
-      if (!transformed) {
+      if (!transformed)
+      {
         // output pca in correct order
         fl = pca.component(s);
-        for (int d=fl.length-1; d>=0;d--)
+        for (int d = fl.length - 1; d >= 0; d--)
         {
           csv.append(",");
           csv.append(fl[d]);
         }
-    } else {
-      // output current x,y,z coords for points
+      }
+      else
+      {
+        // output current x,y,z coords for points
         fl = rc.getPointPosition(s);
-        for (int d=0; d<fl.length;d++)
+        for (int d = 0; d < fl.length; d++)
         {
           csv.append(",");
           csv.append(fl[d]);
@@ -552,18 +563,24 @@ public class PCAPanel extends GPCAPanel implements Runnable
     return csv.toString();
   }
 
-  /* (non-Javadoc)
-   * @see jalview.jbgui.GPCAPanel#outputProjPoints_actionPerformed(java.awt.event.ActionEvent)
+  /*
+   * (non-Javadoc)
+   * 
+   * @see
+   * jalview.jbgui.GPCAPanel#outputProjPoints_actionPerformed(java.awt.event
+   * .ActionEvent)
    */
   protected void outputProjPoints_actionPerformed(ActionEvent e)
   {
     CutAndPasteTransfer cap = new CutAndPasteTransfer();
-    try {
+    try
+    {
       cap.setText(getPointsasCsv(true));
-      Desktop.addInternalFrame(cap, "Transformed points for "+getTitle(), 500, 500);
+      Desktop.addInternalFrame(cap, "Transformed points for " + getTitle(),
+              500, 500);
     } catch (OutOfMemoryError oom)
     {
-      new OOMWarning("exporting transformed PCA points",oom);
+      new OOMWarning("exporting transformed PCA points", oom);
       cap.dispose();
     }
   }
index 9a0def1..94d22ef 100755 (executable)
@@ -452,9 +452,9 @@ public class PopupMenu extends JPopupMenu
         {
 
           // collect matching db-refs
-          DBRefEntry[] dbr = jalview.util.DBRefUtils.selectRefs(seq
-                  .getDBRef(), new String[]
-          { urlLink.getTarget() });
+          DBRefEntry[] dbr = jalview.util.DBRefUtils.selectRefs(
+                  seq.getDBRef(), new String[]
+                  { urlLink.getTarget() });
           // collect id string too
           String id = seq.getName();
           String descr = seq.getDescription();
@@ -658,8 +658,8 @@ public class PopupMenu extends JPopupMenu
       Object[] urlset = null;
       try
       {
-        urlset = urlLink.makeUrlStubs(ids, seqstr, "FromJalview"
-                + System.currentTimeMillis(), false);
+        urlset = urlLink.makeUrlStubs(ids, seqstr,
+                "FromJalview" + System.currentTimeMillis(), false);
       } catch (UrlStringTooLongException e)
       {
       }
@@ -1175,9 +1175,9 @@ public class PopupMenu extends JPopupMenu
   protected void clustalColour_actionPerformed()
   {
     SequenceGroup sg = getGroup();
-    sg.cs = new ClustalxColourScheme(sg
-            .getSequences(ap.av.hiddenRepSequences), ap.av.alignment
-            .getWidth());
+    sg.cs = new ClustalxColourScheme(
+            sg.getSequences(ap.av.hiddenRepSequences),
+            ap.av.alignment.getWidth());
     refresh();
   }
 
@@ -1293,9 +1293,9 @@ public class PopupMenu extends JPopupMenu
 
     if (abovePIDColour.isSelected())
     {
-      sg.cs.setConsensus(AAFrequency.calculate(sg
-              .getSequences(ap.av.hiddenRepSequences), sg.getStartRes(), sg
-              .getEndRes() + 1));
+      sg.cs.setConsensus(AAFrequency.calculate(
+              sg.getSequences(ap.av.hiddenRepSequences), sg.getStartRes(),
+              sg.getEndRes() + 1));
 
       int threshold = SliderPanel.setPIDSliderSource(ap, sg.cs, getGroup()
               .getName());
@@ -1347,9 +1347,9 @@ public class PopupMenu extends JPopupMenu
   {
     SequenceGroup sg = getGroup();
     sg.cs = new PIDColourScheme();
-    sg.cs.setConsensus(AAFrequency.calculate(sg
-            .getSequences(ap.av.hiddenRepSequences), sg.getStartRes(), sg
-            .getEndRes() + 1));
+    sg.cs.setConsensus(AAFrequency.calculate(
+            sg.getSequences(ap.av.hiddenRepSequences), sg.getStartRes(),
+            sg.getEndRes() + 1));
     refresh();
   }
 
@@ -1365,9 +1365,9 @@ public class PopupMenu extends JPopupMenu
 
     sg.cs = new Blosum62ColourScheme();
 
-    sg.cs.setConsensus(AAFrequency.calculate(sg
-            .getSequences(ap.av.hiddenRepSequences), sg.getStartRes(), sg
-            .getEndRes() + 1));
+    sg.cs.setConsensus(AAFrequency.calculate(
+            sg.getSequences(ap.av.hiddenRepSequences), sg.getStartRes(),
+            sg.getEndRes() + 1));
 
     refresh();
   }
@@ -1401,9 +1401,9 @@ public class PopupMenu extends JPopupMenu
     if (conservationMenuItem.isSelected())
     {
       Conservation c = new Conservation("Group",
-              ResidueProperties.propHash, 3, sg
-                      .getSequences(ap.av.hiddenRepSequences), sg
-                      .getStartRes(), sg.getEndRes() + 1);
+              ResidueProperties.propHash, 3,
+              sg.getSequences(ap.av.hiddenRepSequences), sg.getStartRes(),
+              sg.getEndRes() + 1);
 
       c.calculate();
       c.verdict(false, ap.av.ConsPercGaps);
@@ -1430,8 +1430,8 @@ public class PopupMenu extends JPopupMenu
       return;
     }
 
-    AnnotationColourGradient acg = new AnnotationColourGradient(sequence
-            .getAnnotation()[0], null,
+    AnnotationColourGradient acg = new AnnotationColourGradient(
+            sequence.getAnnotation()[0], null,
             AnnotationColourGradient.NO_THRESHOLD);
 
     acg.predefinedColours = true;
@@ -1450,9 +1450,10 @@ public class PopupMenu extends JPopupMenu
   {
 
     SequenceGroup sg = getGroup();
-    EditNameDialog dialog = new EditNameDialog(sg.getName(), sg
-            .getDescription(), "       Group Name ", "Group Description ",
-            "Edit Group Name/Description", ap.alignFrame);
+    EditNameDialog dialog = new EditNameDialog(sg.getName(),
+            sg.getDescription(), "       Group Name ",
+            "Group Description ", "Edit Group Name/Description",
+            ap.alignFrame);
 
     if (!dialog.accept)
     {
@@ -1489,9 +1490,10 @@ public class PopupMenu extends JPopupMenu
    */
   void sequenceName_actionPerformed()
   {
-    EditNameDialog dialog = new EditNameDialog(sequence.getName(), sequence
-            .getDescription(), "       Sequence Name ",
-            "Sequence Description ", "Edit Sequence Name/Description", ap.alignFrame);
+    EditNameDialog dialog = new EditNameDialog(sequence.getName(),
+            sequence.getDescription(), "       Sequence Name ",
+            "Sequence Description ", "Edit Sequence Name/Description",
+            ap.alignFrame);
 
     if (!dialog.accept)
     {
@@ -1681,8 +1683,8 @@ public class PopupMenu extends JPopupMenu
         caseChange = ChangeCaseCommand.TO_LOWER;
       }
 
-      ChangeCaseCommand caseCommand = new ChangeCaseCommand(description, sg
-              .getSequencesAsArray(ap.av.hiddenRepSequences), startEnd,
+      ChangeCaseCommand caseCommand = new ChangeCaseCommand(description,
+              sg.getSequencesAsArray(ap.av.hiddenRepSequences), startEnd,
               caseChange);
 
       ap.alignFrame.addHistoryItem(caseCommand);
@@ -1697,8 +1699,8 @@ public class PopupMenu extends JPopupMenu
   {
     CutAndPasteTransfer cap = new CutAndPasteTransfer();
     cap.setForInput(null);
-    Desktop.addInternalFrame(cap, "Alignment output - "
-            + e.getActionCommand(), 600, 500);
+    Desktop.addInternalFrame(cap,
+            "Alignment output - " + e.getActionCommand(), 600, 500);
 
     String[] omitHidden = null;
 
@@ -1710,7 +1712,8 @@ public class PopupMenu extends JPopupMenu
     omitHidden = ap.av.getViewAsString(true);
     Alignment oal = new Alignment(ap.av.getSequenceSelection());
     AlignmentAnnotation[] nala = ap.av.alignment.getAlignmentAnnotation();
-    if (nala!=null) {
+    if (nala != null)
+    {
       for (int i = 0; i < nala.length; i++)
       {
         AlignmentAnnotation na = nala[i];
@@ -1880,17 +1883,18 @@ public class PopupMenu extends JPopupMenu
       if (sequence == null)
         sequence = (Sequence) sg.getSequenceAt(0);
 
-      EditNameDialog dialog = new EditNameDialog(sequence
-              .getSequenceAsString(sg.getStartRes(), sg.getEndRes() + 1),
-              null, "Edit Sequence ", null, "Edit Sequence", ap.alignFrame);
+      EditNameDialog dialog = new EditNameDialog(
+              sequence.getSequenceAsString(sg.getStartRes(),
+                      sg.getEndRes() + 1), null, "Edit Sequence ", null,
+              "Edit Sequence", ap.alignFrame);
 
       if (dialog.accept)
       {
         EditCommand editCommand = new EditCommand("Edit Sequences",
                 EditCommand.REPLACE, dialog.getName().replace(' ',
-                        ap.av.getGapCharacter()), sg
-                        .getSequencesAsArray(ap.av.hiddenRepSequences), sg
-                        .getStartRes(), sg.getEndRes() + 1, ap.av.alignment);
+                        ap.av.getGapCharacter()),
+                sg.getSequencesAsArray(ap.av.hiddenRepSequences),
+                sg.getStartRes(), sg.getEndRes() + 1, ap.av.alignment);
 
         ap.alignFrame.addHistoryItem(editCommand);
 
index c9c5f6d..70f8f3e 100755 (executable)
@@ -270,22 +270,22 @@ public class Preferences extends GPreferences
   public void ok_actionPerformed(ActionEvent e)
   {
 
-    Cache.applicationProperties.setProperty("SHOW_JVSUFFIX", Boolean
-            .toString(seqLimit.isSelected()));
-    Cache.applicationProperties.setProperty("RIGHT_ALIGN_IDS", Boolean
-            .toString(rightAlign.isSelected()));
-    Cache.applicationProperties.setProperty("SHOW_FULLSCREEN", Boolean
-            .toString(fullScreen.isSelected()));
-    Cache.applicationProperties.setProperty("SHOW_OVERVIEW", Boolean
-            .toString(openoverv.isSelected()));
-    Cache.applicationProperties.setProperty("SHOW_ANNOTATIONS", Boolean
-            .toString(annotations.isSelected()));
-    Cache.applicationProperties.setProperty("SHOW_CONSERVATION", Boolean
-            .toString(conservation.isSelected()));
-    Cache.applicationProperties.setProperty("SHOW_QUALITY", Boolean
-            .toString(quality.isSelected()));
-    Cache.applicationProperties.setProperty("SHOW_IDENTITY", Boolean
-            .toString(identity.isSelected()));
+    Cache.applicationProperties.setProperty("SHOW_JVSUFFIX",
+            Boolean.toString(seqLimit.isSelected()));
+    Cache.applicationProperties.setProperty("RIGHT_ALIGN_IDS",
+            Boolean.toString(rightAlign.isSelected()));
+    Cache.applicationProperties.setProperty("SHOW_FULLSCREEN",
+            Boolean.toString(fullScreen.isSelected()));
+    Cache.applicationProperties.setProperty("SHOW_OVERVIEW",
+            Boolean.toString(openoverv.isSelected()));
+    Cache.applicationProperties.setProperty("SHOW_ANNOTATIONS",
+            Boolean.toString(annotations.isSelected()));
+    Cache.applicationProperties.setProperty("SHOW_CONSERVATION",
+            Boolean.toString(conservation.isSelected()));
+    Cache.applicationProperties.setProperty("SHOW_QUALITY",
+            Boolean.toString(quality.isSelected()));
+    Cache.applicationProperties.setProperty("SHOW_IDENTITY",
+            Boolean.toString(identity.isSelected()));
 
     Cache.applicationProperties.setProperty("DEFAULT_COLOUR", colour
             .getSelectedItem().toString());
@@ -299,32 +299,32 @@ public class Preferences extends GPreferences
     Cache.applicationProperties.setProperty("FONT_SIZE", fontSizeCB
             .getSelectedItem().toString());
 
-    Cache.applicationProperties.setProperty("ID_ITALICS", Boolean
-            .toString(idItalics.isSelected()));
-    Cache.applicationProperties.setProperty("SHOW_UNCONSERVED", Boolean
-            .toString(showUnconserved.isSelected()));
-    Cache.applicationProperties.setProperty("SHOW_GROUP_CONSENSUS", Boolean
-            .toString(showGroupConsensus.isSelected()));
+    Cache.applicationProperties.setProperty("ID_ITALICS",
+            Boolean.toString(idItalics.isSelected()));
+    Cache.applicationProperties.setProperty("SHOW_UNCONSERVED",
+            Boolean.toString(showUnconserved.isSelected()));
+    Cache.applicationProperties.setProperty("SHOW_GROUP_CONSENSUS",
+            Boolean.toString(showGroupConsensus.isSelected()));
     Cache.applicationProperties.setProperty("SHOW_GROUP_CONSERVATION",
             Boolean.toString(showGroupConservation.isSelected()));
     Cache.applicationProperties.setProperty("SHOW_CONSENSUS_HISTOGRAM",
             Boolean.toString(showConsensHistogram.isSelected()));
-    Cache.applicationProperties.setProperty("SHOW_CONSENSUS_LOGO", Boolean
-            .toString(showConsensLogo.isSelected()));
-    Cache.applicationProperties.setProperty("ANTI_ALIAS", Boolean
-            .toString(smoothFont.isSelected()));
-    Cache.applicationProperties.setProperty("SHOW_NPFEATS_TOOLTIP", Boolean
-            .toString(showNpTooltip.isSelected()));
-    Cache.applicationProperties.setProperty("SHOW_DBREFS_TOOLTIP", Boolean
-            .toString(showDbRefTooltip.isSelected()));
-
-    Cache.applicationProperties.setProperty("WRAP_ALIGNMENT", Boolean
-            .toString(wrap.isSelected()));
+    Cache.applicationProperties.setProperty("SHOW_CONSENSUS_LOGO",
+            Boolean.toString(showConsensLogo.isSelected()));
+    Cache.applicationProperties.setProperty("ANTI_ALIAS",
+            Boolean.toString(smoothFont.isSelected()));
+    Cache.applicationProperties.setProperty("SHOW_NPFEATS_TOOLTIP",
+            Boolean.toString(showNpTooltip.isSelected()));
+    Cache.applicationProperties.setProperty("SHOW_DBREFS_TOOLTIP",
+            Boolean.toString(showDbRefTooltip.isSelected()));
+
+    Cache.applicationProperties.setProperty("WRAP_ALIGNMENT",
+            Boolean.toString(wrap.isSelected()));
 
     Cache.applicationProperties.setProperty("STARTUP_FILE",
             startupFileTextfield.getText());
-    Cache.applicationProperties.setProperty("SHOW_STARTUP_FILE", Boolean
-            .toString(startupCheckbox.isSelected()));
+    Cache.applicationProperties.setProperty("SHOW_STARTUP_FILE",
+            Boolean.toString(startupCheckbox.isSelected()));
 
     Cache.applicationProperties.setProperty("SORT_ALIGNMENT", sortby
             .getSelectedItem().toString());
@@ -364,16 +364,16 @@ public class Preferences extends GPreferences
       }
       // remove last "|"
       links.setLength(links.length() - 1);
-      Cache.applicationProperties.setProperty("SEQUENCE_LINKS", links
-              .toString());
+      Cache.applicationProperties.setProperty("SEQUENCE_LINKS",
+              links.toString());
     }
     else
     {
       Cache.applicationProperties.remove("SEQUENCE_LINKS");
     }
 
-    Cache.applicationProperties.setProperty("USE_PROXY", Boolean
-            .toString(useProxy.isSelected()));
+    Cache.applicationProperties.setProperty("USE_PROXY",
+            Boolean.toString(useProxy.isSelected()));
 
     if (proxyServerTB.getText().trim().length() < 1)
     {
@@ -381,8 +381,8 @@ public class Preferences extends GPreferences
     }
     else
     {
-      Cache.applicationProperties.setProperty("PROXY_SERVER", proxyServerTB
-              .getText());
+      Cache.applicationProperties.setProperty("PROXY_SERVER",
+              proxyServerTB.getText());
     }
 
     if (proxyPortTB.getText().trim().length() < 1)
@@ -391,8 +391,8 @@ public class Preferences extends GPreferences
     }
     else
     {
-      Cache.applicationProperties.setProperty("PROXY_PORT", proxyPortTB
-              .getText());
+      Cache.applicationProperties.setProperty("PROXY_PORT",
+              proxyPortTB.getText());
     }
 
     if (useProxy.isSelected())
@@ -405,13 +405,13 @@ public class Preferences extends GPreferences
       System.setProperty("http.proxyHost", "");
       System.setProperty("http.proxyPort", "");
     }
-    Cache.setProperty("VERSION_CHECK", Boolean.toString(versioncheck
-            .isSelected()));
+    Cache.setProperty("VERSION_CHECK",
+            Boolean.toString(versioncheck.isSelected()));
     if (Cache.getProperty("USAGESTATS") != null || usagestats.isSelected())
     {
       // default is false - we only set this if the user has actively agreed
-      Cache.setProperty("USAGESTATS", Boolean.toString(usagestats
-              .isSelected()));
+      Cache.setProperty("USAGESTATS",
+              Boolean.toString(usagestats.isSelected()));
     }
     if (!questionnaire.isSelected())
     {
@@ -423,28 +423,28 @@ public class Preferences extends GPreferences
       // by just adding the given line
       Cache.removeProperty("NOQUESTIONNAIRES");
     }
-    Cache.applicationProperties.setProperty("BLC_JVSUFFIX", Boolean
-            .toString(blcjv.isSelected()));
-    Cache.applicationProperties.setProperty("CLUSTAL_JVSUFFIX", Boolean
-            .toString(clustaljv.isSelected()));
-    Cache.applicationProperties.setProperty("FASTA_JVSUFFIX", Boolean
-            .toString(fastajv.isSelected()));
-    Cache.applicationProperties.setProperty("MSF_JVSUFFIX", Boolean
-            .toString(msfjv.isSelected()));
-    Cache.applicationProperties.setProperty("PFAM_JVSUFFIX", Boolean
-            .toString(pfamjv.isSelected()));
-    Cache.applicationProperties.setProperty("PILEUP_JVSUFFIX", Boolean
-            .toString(pileupjv.isSelected()));
-    Cache.applicationProperties.setProperty("PIR_JVSUFFIX", Boolean
-            .toString(pirjv.isSelected()));
-    Cache.applicationProperties.setProperty("PIR_MODELLER", Boolean
-            .toString(modellerOutput.isSelected()));
+    Cache.applicationProperties.setProperty("BLC_JVSUFFIX",
+            Boolean.toString(blcjv.isSelected()));
+    Cache.applicationProperties.setProperty("CLUSTAL_JVSUFFIX",
+            Boolean.toString(clustaljv.isSelected()));
+    Cache.applicationProperties.setProperty("FASTA_JVSUFFIX",
+            Boolean.toString(fastajv.isSelected()));
+    Cache.applicationProperties.setProperty("MSF_JVSUFFIX",
+            Boolean.toString(msfjv.isSelected()));
+    Cache.applicationProperties.setProperty("PFAM_JVSUFFIX",
+            Boolean.toString(pfamjv.isSelected()));
+    Cache.applicationProperties.setProperty("PILEUP_JVSUFFIX",
+            Boolean.toString(pileupjv.isSelected()));
+    Cache.applicationProperties.setProperty("PIR_JVSUFFIX",
+            Boolean.toString(pirjv.isSelected()));
+    Cache.applicationProperties.setProperty("PIR_MODELLER",
+            Boolean.toString(modellerOutput.isSelected()));
     jalview.io.PIRFile.useModellerOutput = modellerOutput.isSelected();
 
-    Cache.applicationProperties.setProperty("AUTO_CALC_CONSENSUS", Boolean
-            .toString(autoCalculateConsCheck.isSelected()));
-    Cache.applicationProperties.setProperty("PAD_GAPS", Boolean
-            .toString(padGaps.isSelected()));
+    Cache.applicationProperties.setProperty("AUTO_CALC_CONSENSUS",
+            Boolean.toString(autoCalculateConsCheck.isSelected()));
+    Cache.applicationProperties.setProperty("PAD_GAPS",
+            Boolean.toString(padGaps.isSelected()));
 
     dasSource.saveProperties(Cache.applicationProperties);
     wsPrefs.updateAndRefreshWsMenuConfig(false);
@@ -462,9 +462,10 @@ public class Preferences extends GPreferences
    */
   public void startupFileTextfield_mouseClicked()
   {
-    JalviewFileChooser chooser = new JalviewFileChooser(jalview.bin.Cache
-            .getProperty("LAST_DIRECTORY"), new String[]
-    { "fa, fasta, fastq", "aln", "pfam", "msf", "pir", "blc", "jar" },
+    JalviewFileChooser chooser = new JalviewFileChooser(
+            jalview.bin.Cache.getProperty("LAST_DIRECTORY"),
+            new String[]
+            { "fa, fasta, fastq", "aln", "pfam", "msf", "pir", "blc", "jar" },
             new String[]
             { "Fasta", "Clustal", "PFAM", "MSF", "PIR", "BLC", "Jalview" },
             jalview.bin.Cache.getProperty("DEFAULT_FILE_FORMAT"));
index 67fc95c..60cc19c 100755 (executable)
@@ -460,8 +460,8 @@ public class RotatableCanvas extends JPanel implements MouseListener,
 
       if (av.getSelectionGroup() != null)
       {
-        if (av.getSelectionGroup().getSequences(null).contains(
-                ((SequencePoint) points.elementAt(i)).sequence))
+        if (av.getSelectionGroup().getSequences(null)
+                .contains(((SequencePoint) points.elementAt(i)).sequence))
         {
           g.setColor(Color.gray);
         }
@@ -476,8 +476,9 @@ public class RotatableCanvas extends JPanel implements MouseListener,
       if (showLabels)
       {
         g.setColor(Color.red);
-        g.drawString(((SequencePoint) points.elementAt(i)).sequence
-                .getName(), x - 3, y - 4);
+        g.drawString(
+                ((SequencePoint) points.elementAt(i)).sequence.getName(),
+                x - 3, y - 4);
       }
     }
 
@@ -748,8 +749,8 @@ public class RotatableCanvas extends JPanel implements MouseListener,
       {
         if (av != null)
         {
-          if (!av.getSelectionGroup().getSequences(null).contains(
-                  sp.sequence))
+          if (!av.getSelectionGroup().getSequences(null)
+                  .contains(sp.sequence))
           {
             av.getSelectionGroup().addSequence(sp.sequence, true);
           }
@@ -818,12 +819,13 @@ public class RotatableCanvas extends JPanel implements MouseListener,
 
   /**
    * 
-   * @return x,y,z positions of point s (index into points) under current transform.
+   * @return x,y,z positions of point s (index into points) under current
+   *         transform.
    */
   public double[] getPointPosition(int s)
   {
     double pts[] = new double[3];
-    float[] p = ((SequencePoint)points.elementAt(s)).coord;
+    float[] p = ((SequencePoint) points.elementAt(s)).coord;
     pts[0] = p[0];
     pts[1] = p[1];
     pts[2] = p[2];
index d2ed1d9..c50330b 100755 (executable)
@@ -78,7 +78,9 @@ public class ScalePanel extends JPanel implements MouseMotionListener,
     if (x >= av.alignment.getWidth())
     {
       res = av.alignment.getWidth() - 1;
-    } else {
+    }
+    else
+    {
       res = x;
     }
 
@@ -353,8 +355,7 @@ public class ScalePanel extends JPanel implements MouseMotionListener,
       {
         reveal = region;
         ToolTipManager.sharedInstance().registerComponent(this);
-        this
-                .setToolTipText("Reveal Hidden Columns with Right Mouse Button");
+        this.setToolTipText("Reveal Hidden Columns with Right Mouse Button");
         break;
       }
       else
@@ -455,22 +456,20 @@ public class ScalePanel extends JPanel implements MouseMotionListener,
           maxX = (i - startx + 1) * av.charWidth + fm.stringWidth(string);
         }
 
-        gg
-                .drawLine(
-                        (int) (((i - startx - 1) * av.charWidth) + (av.charWidth / 2)),
-                        y + 2,
-                        (int) (((i - startx - 1) * av.charWidth) + (av.charWidth / 2)),
-                        y + (fm.getDescent() * 2));
+        gg.drawLine(
+                (int) (((i - startx - 1) * av.charWidth) + (av.charWidth / 2)),
+                y + 2,
+                (int) (((i - startx - 1) * av.charWidth) + (av.charWidth / 2)),
+                y + (fm.getDescent() * 2));
 
       }
       else
       {
-        gg
-                .drawLine(
-                        (int) (((i - startx - 1) * av.charWidth) + (av.charWidth / 2)),
-                        y + fm.getDescent(),
-                        (int) (((i - startx - 1) * av.charWidth) + (av.charWidth / 2)),
-                        y + (fm.getDescent() * 2));
+        gg.drawLine(
+                (int) (((i - startx - 1) * av.charWidth) + (av.charWidth / 2)),
+                y + fm.getDescent(),
+                (int) (((i - startx - 1) * av.charWidth) + (av.charWidth / 2)),
+                y + (fm.getDescent() * 2));
       }
     }
 
index 0297fce..f625838 100755 (executable)
@@ -654,11 +654,9 @@ public class SeqCanvas extends JComponent
         {
           g1.setColor(Color.blue);
 
-          g1
-                  .drawLine((blockEnd - blockStart + 1) * av.charWidth - 1,
-                          0 + offset, (blockEnd - blockStart + 1)
-                                  * av.charWidth - 1, (endSeq - startSeq)
-                                  * av.charHeight + offset);
+          g1.drawLine((blockEnd - blockStart + 1) * av.charWidth - 1,
+                  0 + offset, (blockEnd - blockStart + 1) * av.charWidth
+                          - 1, (endSeq - startSeq) * av.charHeight + offset);
         }
 
         g1.translate(-screenY * av.charWidth, 0);
index 8acdcc6..7502812 100755 (executable)
@@ -198,8 +198,8 @@ public class SeqPanel extends JPanel implements MouseListener,
 
       y -= hgap;
 
-      seq = Math.min((y % cHeight) / av.getCharHeight(), av.alignment
-              .getHeight() - 1);
+      seq = Math.min((y % cHeight) / av.getCharHeight(),
+              av.alignment.getHeight() - 1);
     }
     else
     {
@@ -688,8 +688,9 @@ public class SeqPanel extends JPanel implements MouseListener,
     if (av.showSequenceFeatures)
     {
       int rpos;
-      SequenceFeature[] features = findFeaturesAtRes(sequence
-              .getDatasetSequence(), rpos = sequence.findPosition(res));
+      SequenceFeature[] features = findFeaturesAtRes(
+              sequence.getDatasetSequence(),
+              rpos = sequence.findPosition(res));
       appendFeatures(tooltipText, linkImageURL.toString(), rpos, features,
               this.ap.seqPanel.seqCanvas.fr.minmax);
     }
@@ -937,8 +938,7 @@ public class SeqPanel extends JPanel implements MouseListener,
 
       // Which is bigger, left-right or up-down?
       if (Math.abs(evt.getY() - lastMousePress.getY()) > Math.abs(evt
-              .getX()
-              - lastMousePress.getX()))
+              .getX() - lastMousePress.getX()))
       {
         int fontSize = av.font.getSize();
 
@@ -956,9 +956,7 @@ public class SeqPanel extends JPanel implements MouseListener,
           fontSize = 1;
         }
 
-        av
-                .setFont(new Font(av.font.getName(), av.font.getStyle(),
-                        fontSize));
+        av.setFont(new Font(av.font.getName(), av.font.getStyle(), fontSize));
         av.charWidth = oldWidth;
         ap.fontChanged();
       }
@@ -1443,14 +1441,15 @@ public class SeqPanel extends JPanel implements MouseListener,
         av.setSelectionGroup(null);
       }
 
-      SequenceFeature[] features = findFeaturesAtRes(sequence
-              .getDatasetSequence(), sequence.findPosition(findRes(evt)));
+      SequenceFeature[] features = findFeaturesAtRes(
+              sequence.getDatasetSequence(),
+              sequence.findPosition(findRes(evt)));
 
       if (features != null && features.length > 0)
       {
         SearchResults highlight = new SearchResults();
-        highlight.addResult(sequence, features[0].getBegin(), features[0]
-                .getEnd());
+        highlight.addResult(sequence, features[0].getBegin(),
+                features[0].getEnd());
         seqCanvas.highlightSearchResults(highlight);
       }
       if (features != null && features.length > 0)
@@ -1554,8 +1553,8 @@ public class SeqPanel extends JPanel implements MouseListener,
 
     if (javax.swing.SwingUtilities.isRightMouseButton(evt))
     {
-      SequenceFeature[] allFeatures = findFeaturesAtRes(sequence
-              .getDatasetSequence(), sequence.findPosition(res));
+      SequenceFeature[] allFeatures = findFeaturesAtRes(
+              sequence.getDatasetSequence(), sequence.findPosition(res));
       Vector links = new Vector();
       for (int i = 0; i < allFeatures.length; i++)
       {
@@ -1641,20 +1640,20 @@ public class SeqPanel extends JPanel implements MouseListener,
     {
       if (stretchGroup.cs instanceof ClustalxColourScheme)
       {
-        ((ClustalxColourScheme) stretchGroup.cs).resetClustalX(stretchGroup
-                .getSequences(av.hiddenRepSequences), stretchGroup
-                .getWidth());
+        ((ClustalxColourScheme) stretchGroup.cs).resetClustalX(
+                stretchGroup.getSequences(av.hiddenRepSequences),
+                stretchGroup.getWidth());
       }
 
       if (stretchGroup.cs.conservationApplied())
       {
-        SliderPanel.setConservationSlider(ap, stretchGroup.cs, stretchGroup
-                .getName());
+        SliderPanel.setConservationSlider(ap, stretchGroup.cs,
+                stretchGroup.getName());
       }
       else
       {
-        SliderPanel.setPIDSliderSource(ap, stretchGroup.cs, stretchGroup
-                .getName());
+        SliderPanel.setPIDSliderSource(ap, stretchGroup.cs,
+                stretchGroup.getName());
       }
     }
     PaintRefresher.Refresh(this, av.getSequenceSetId());
@@ -1883,8 +1882,9 @@ public class SeqPanel extends JPanel implements MouseListener,
     }
     // do we want to thread this ? (contention with seqsel and colsel locks, I
     // suspect)
-    // rules are: colsel is copied if there is a real intersection between sequence selection
-    boolean repaint = false,copycolsel=true;
+    // rules are: colsel is copied if there is a real intersection between
+    // sequence selection
+    boolean repaint = false, copycolsel = true;
     if (av.selectionGroup == null || !av.isSelectionGroupChanged())
     {
       SequenceGroup sgroup = null;
@@ -1899,10 +1899,11 @@ public class SeqPanel extends JPanel implements MouseListener,
         }
         sgroup = seqsel.intersect(av.alignment,
                 (av.hasHiddenRows) ? av.hiddenRepSequences : null);
-        if ((sgroup==null || sgroup.getSize()==0) && (colsel==null || colsel.size()==0))
+        if ((sgroup == null || sgroup.getSize() == 0)
+                && (colsel == null || colsel.size() == 0))
         {
           // don't copy columns if the region didn't intersect.
-          copycolsel=false;
+          copycolsel = false;
         }
       }
       if (sgroup != null && sgroup.getSize() > 0)
index 44e4ddd..b15851c 100755 (executable)
@@ -466,10 +466,8 @@ public class SequenceRenderer implements jalview.api.SequenceRenderer
         }
 
         charOffset = (av.charWidth - fm.charWidth(s)) / 2;
-        graphics
-                .drawString(String.valueOf(s), charOffset + x1
-                        + (av.charWidth * (i - start)),
-                        (y1 + av.charHeight) - pady);
+        graphics.drawString(String.valueOf(s), charOffset + x1
+                + (av.charWidth * (i - start)), (y1 + av.charHeight) - pady);
       }
     }
   }
index 77fa400..ed3fc52 100755 (executable)
@@ -160,8 +160,8 @@ public class SliderPanel extends GSliderPanel
 
     if (!conservationSlider.isVisible())
     {
-      Desktop.addInternalFrame(conservationSlider, conservationSlider
-              .getTitle(), 420, 90, false);
+      Desktop.addInternalFrame(conservationSlider,
+              conservationSlider.getTitle(), 420, 90, false);
       conservationSlider
               .addInternalFrameListener(new javax.swing.event.InternalFrameAdapter()
               {
index 06c5807..4801051 100755 (executable)
@@ -167,8 +167,9 @@ public class SplashScreen extends JPanel implements Runnable
     int vwidth = fm.stringWidth("Jalview "
             + jalview.bin.Cache.getProperty("VERSION"));
     g.setFont(new Font("Verdana", Font.BOLD, fontSize + 2));
-    g.drawString("Last updated: "
-            + jalview.bin.Cache.getDefault("BUILD_DATE", "unknown"),
+    g.drawString(
+            "Last updated: "
+                    + jalview.bin.Cache.getDefault("BUILD_DATE", "unknown"),
             50 + vwidth + 5, y);
     if (jalview.bin.Cache.getDefault("LATEST_VERSION", "Checking").equals(
             "Checking"))
@@ -181,44 +182,39 @@ public class SplashScreen extends JPanel implements Runnable
     else if (!jalview.bin.Cache.getDefault("LATEST_VERSION", "Checking")
             .equals(jalview.bin.Cache.getProperty("VERSION")))
     {
-      if (jalview.bin.Cache.getProperty("VERSION").toLowerCase().indexOf(
-              "automated build") == -1)
+      if (jalview.bin.Cache.getProperty("VERSION").toLowerCase()
+              .indexOf("automated build") == -1)
       {
         // Displayed when code version and jnlp version do not match and code
         // version is not a development build
         g.setColor(Color.red);
       }
-      g
-              .drawString(
-                      "!! Jalview version "
-                              + jalview.bin.Cache.getDefault(
-                                      "LATEST_VERSION", "..Checking..")
-                              + " is available for download from http://www.jalview.org !!",
-                      50, y += fontSize + 10);
+      g.drawString(
+              "!! Jalview version "
+                      + jalview.bin.Cache.getDefault("LATEST_VERSION",
+                              "..Checking..")
+                      + " is available for download from http://www.jalview.org !!",
+              50, y += fontSize + 10);
       y += 5;
       g.setColor(Color.black);
     }
 
     g.setFont(new Font("Verdana", Font.BOLD, fontSize));
-    g
-            .drawString(
-                    "Authors: Andrew Waterhouse, Jim Procter, Michele Clamp, James Cuff, Steve Searle,",
-                    50, y += fontSize + 4);
+    g.drawString(
+            "Authors: Andrew Waterhouse, Jim Procter, Michele Clamp, James Cuff, Steve Searle,",
+            50, y += fontSize + 4);
     g.drawString("David Martin & Geoff Barton.", 60, y += fontSize + 4);
-    g
-            .drawString(
-                    "Development managed by The Barton Group, University of Dundee.",
-                    50, y += fontSize + 4);
+    g.drawString(
+            "Development managed by The Barton Group, University of Dundee.",
+            50, y += fontSize + 4);
     g.drawString("If  you use Jalview, please cite: ", 50,
             y += fontSize + 4);
-    g
-            .drawString(
-                    "Waterhouse, A.M., Procter, J.B., Martin, D.M.A, Clamp, M. and Barton, G. J. (2009)",
-                    50, y += fontSize + 4);
-    g
-            .drawString(
-                    "Jalview Version 2 - a multiple sequence alignment editor and analysis workbench",
-                    50, y += fontSize + 4);
+    g.drawString(
+            "Waterhouse, A.M., Procter, J.B., Martin, D.M.A, Clamp, M. and Barton, G. J. (2009)",
+            50, y += fontSize + 4);
+    g.drawString(
+            "Jalview Version 2 - a multiple sequence alignment editor and analysis workbench",
+            50, y += fontSize + 4);
     g.drawString("Bioinformatics doi: 10.1093/bioinformatics/btp033", 50,
             y += fontSize + 4);
   }
index 837c42d..bec6823 100644 (file)
@@ -65,12 +65,11 @@ public class TextColourChooser
     final JPanel bigpanel = new JPanel(new BorderLayout());
     JPanel panel = new JPanel();
     bigpanel.add(panel, BorderLayout.CENTER);
-    bigpanel
-            .add(
-                    new JLabel(
-                            "<html><i>Select a dark and light text colour, then set the threshold to"
-                                    + "<br>switch between colours, based on background colour</i></html>"),
-                    BorderLayout.NORTH);
+    bigpanel.add(
+            new JLabel(
+                    "<html><i>Select a dark and light text colour, then set the threshold to"
+                            + "<br>switch between colours, based on background colour</i></html>"),
+            BorderLayout.NORTH);
     panel.add(col1);
     panel.add(slider);
     panel.add(col2);
index e77134e..ea0b791 100755 (executable)
@@ -364,16 +364,16 @@ public class TreePanel extends GTreePanel
       buffer.append("PID");
     }
 
-
-    jalview.io.NewickFile fout = new jalview.io.NewickFile(tree
-            .getTopNode());
-    try {
+    jalview.io.NewickFile fout = new jalview.io.NewickFile(
+            tree.getTopNode());
+    try
+    {
       cap.setText(fout.print(tree.isHasBootstrap(), tree.isHasDistances(),
-            tree.isHasRootDistance()));
+              tree.isHasRootDistance()));
       Desktop.addInternalFrame(cap, buffer.toString(), 500, 100);
     } catch (OutOfMemoryError oom)
     {
-      new OOMWarning("generating newick tree file",oom);
+      new OOMWarning("generating newick tree file", oom);
       cap.dispose();
     }
 
@@ -387,8 +387,8 @@ public class TreePanel extends GTreePanel
    */
   public void saveAsNewick_actionPerformed(ActionEvent e)
   {
-    JalviewFileChooser chooser = new JalviewFileChooser(jalview.bin.Cache
-            .getProperty("LAST_DIRECTORY"));
+    JalviewFileChooser chooser = new JalviewFileChooser(
+            jalview.bin.Cache.getProperty("LAST_DIRECTORY"));
     chooser.setFileView(new JalviewFileView());
     chooser.setDialogTitle("Save tree as newick file");
     chooser.setToolTipText("Save");
@@ -403,10 +403,10 @@ public class TreePanel extends GTreePanel
 
       try
       {
-        jalview.io.NewickFile fout = new jalview.io.NewickFile(tree
-                .getTopNode());
-        String output = fout.print(tree.isHasBootstrap(), tree
-                .isHasDistances(), tree.isHasRootDistance());
+        jalview.io.NewickFile fout = new jalview.io.NewickFile(
+                tree.getTopNode());
+        String output = fout.print(tree.isHasBootstrap(),
+                tree.isHasDistances(), tree.isHasRootDistance());
         java.io.PrintWriter out = new java.io.PrintWriter(
                 new java.io.FileWriter(choice));
         out.println(output);
@@ -725,9 +725,9 @@ public class TreePanel extends GTreePanel
           if (sq != null)
           {
             // search dbrefs, features and annotation
-            DBRefEntry[] refs = jalview.util.DBRefUtils.selectRefs(sq
-                    .getDBRef(), new String[]
-            { labelClass.toUpperCase() });
+            DBRefEntry[] refs = jalview.util.DBRefUtils.selectRefs(
+                    sq.getDBRef(), new String[]
+                    { labelClass.toUpperCase() });
             if (refs != null)
             {
               for (int i = 0; i < refs.length; i++)
index 88bf6e2..f4afe56 100755 (executable)
@@ -297,9 +297,7 @@ public class UserDefinedColours extends GUserDefinedColours implements
         JButton button = (JButton) buttonPanel.getComponent(b);
         if (!selectedButtons.contains(button))
         {
-          button
-                  .setForeground(button.getBackground().brighter()
-                          .brighter());
+          button.setForeground(button.getBackground().brighter().brighter());
           selectedButtons.add(button);
         }
       }
@@ -325,9 +323,7 @@ public class UserDefinedColours extends GUserDefinedColours implements
       }
       else
       {
-        pressed
-                .setForeground(pressed.getBackground().brighter()
-                        .brighter());
+        pressed.setForeground(pressed.getBackground().brighter().brighter());
         selectedButtons.addElement(pressed);
       }
     }
@@ -487,10 +483,10 @@ public class UserDefinedColours extends GUserDefinedColours implements
     upperCaseButtons = new Vector();
     lowerCaseButtons = new Vector();
 
-    JalviewFileChooser chooser = new JalviewFileChooser(jalview.bin.Cache
-            .getProperty("LAST_DIRECTORY"), new String[]
-    { "jc" }, new String[]
-    { "Jalview User Colours" }, "Jalview User Colours");
+    JalviewFileChooser chooser = new JalviewFileChooser(
+            jalview.bin.Cache.getProperty("LAST_DIRECTORY"), new String[]
+            { "jc" }, new String[]
+            { "Jalview User Colours" }, "Jalview User Colours");
     chooser.setFileView(new jalview.io.JalviewFileView());
     chooser.setDialogTitle("Load colour scheme");
     chooser.setToolTipText("Load");
@@ -708,7 +704,8 @@ public class UserDefinedColours extends GUserDefinedColours implements
     if (userColourSchemes != null
             && userColourSchemes.containsKey(schemeName.getText()))
     {
-      int reply = JOptionPane.showInternalConfirmDialog(Desktop.desktop,
+      int reply = JOptionPane.showInternalConfirmDialog(
+              Desktop.desktop,
               "Colour scheme " + schemeName.getText() + " exists."
                       + "\nContinue saving colour scheme as "
                       + schemeName.getText() + "?",
@@ -720,10 +717,10 @@ public class UserDefinedColours extends GUserDefinedColours implements
 
       userColourSchemes.remove(schemeName.getText());
     }
-    JalviewFileChooser chooser = new JalviewFileChooser(jalview.bin.Cache
-            .getProperty("LAST_DIRECTORY"), new String[]
-    { "jc" }, new String[]
-    { "Jalview User Colours" }, "Jalview User Colours");
+    JalviewFileChooser chooser = new JalviewFileChooser(
+            jalview.bin.Cache.getProperty("LAST_DIRECTORY"), new String[]
+            { "jc" }, new String[]
+            { "Jalview User Colours" }, "Jalview User Colours");
 
     chooser.setFileView(new jalview.io.JalviewFileView());
     chooser.setDialogTitle("Save colour scheme");
@@ -856,8 +853,8 @@ public class UserDefinedColours extends GUserDefinedColours implements
     {
       if (coloursFound.toString().length() > 1)
       {
-        jalview.bin.Cache.setProperty("USER_DEFINED_COLOURS", coloursFound
-                .toString());
+        jalview.bin.Cache.setProperty("USER_DEFINED_COLOURS",
+                coloursFound.toString());
       }
       else
       {
@@ -876,8 +873,8 @@ public class UserDefinedColours extends GUserDefinedColours implements
     userColourSchemes = new Hashtable();
 
     StringBuffer coloursFound = new StringBuffer();
-    StringTokenizer st = new StringTokenizer(jalview.bin.Cache
-            .getProperty("USER_DEFINED_COLOURS"), "|");
+    StringTokenizer st = new StringTokenizer(
+            jalview.bin.Cache.getProperty("USER_DEFINED_COLOURS"), "|");
 
     while (st.hasMoreElements())
     {
@@ -902,8 +899,8 @@ public class UserDefinedColours extends GUserDefinedColours implements
 
     if (coloursFound.toString().length() > 1)
     {
-      jalview.bin.Cache.setProperty("USER_DEFINED_COLOURS", coloursFound
-              .toString());
+      jalview.bin.Cache.setProperty("USER_DEFINED_COLOURS",
+              coloursFound.toString());
     }
     else
     {
index 6f566a5..1c08b9b 100644 (file)
@@ -56,8 +56,8 @@ public class UserQuestionnaireCheck implements Runnable
     boolean prompt = false;
     // see if we have already responsed to this questionnaire or get a new
     // qid/rid pair
-    BufferedReader br = new BufferedReader(new InputStreamReader(qurl
-            .openStream()));
+    BufferedReader br = new BufferedReader(new InputStreamReader(
+            qurl.openStream()));
     String qresp;
     while ((qresp = br.readLine()) != null)
     {
@@ -108,8 +108,8 @@ public class UserQuestionnaireCheck implements Runnable
         String qurl = url + (url.indexOf('?') > -1 ? "&" : "?")
                 + "checkresponse=1";
         // query the server with the old qid/id pair
-        String qqid = lastq.indexOf(':') > -1 ? lastq.substring(0, lastq
-                .indexOf(':')) : null;
+        String qqid = lastq.indexOf(':') > -1 ? lastq.substring(0,
+                lastq.indexOf(':')) : null;
         if (qqid != null && qqid != "null" && qqid.length() > 0)
         {
           qurl += "&qid=" + qqid;
index c48c86f..efd94de 100644 (file)
@@ -222,14 +222,12 @@ public class VamsasApplication implements SelectionSource
     } catch (Error e)
     {
       Cache.log
-              .warn(
-                      "Probable SERIOUS VAMSAS client incompatibility - carrying on regardless",
+              .warn("Probable SERIOUS VAMSAS client incompatibility - carrying on regardless",
                       e);
     } catch (Exception e)
     {
       Cache.log
-              .warn(
-                      "Probable VAMSAS client incompatibility - carrying on regardless",
+              .warn("Probable VAMSAS client incompatibility - carrying on regardless",
                       e);
     }
   }
@@ -241,8 +239,8 @@ public class VamsasApplication implements SelectionSource
    */
   private ClientHandle getJalviewHandle()
   {
-    return new ClientHandle("jalview.bin.Jalview", jalview.bin.Cache
-            .getProperty("VERSION"));
+    return new ClientHandle("jalview.bin.Jalview",
+            jalview.bin.Cache.getProperty("VERSION"));
   }
 
   /**
@@ -305,8 +303,7 @@ public class VamsasApplication implements SelectionSource
     } catch (Exception e)
     {
       Cache.log
-              .warn(
-                      "Exception whilst refreshing jalview windows after a vamsas document update.",
+              .warn("Exception whilst refreshing jalview windows after a vamsas document update.",
                       e);
     }
   }
@@ -791,8 +788,8 @@ public class VamsasApplication implements SelectionSource
                 // Cache.log.debug("Handling Mouse over "+mm.getVorbaID()+"
                 // bound to "+jvobj+" at "+mm.getPosition());
                 // position is character position in aligned sequence
-                ssm.mouseOverVamsasSequence((SequenceI) jvobj, mm
-                        .getPosition());
+                ssm.mouseOverVamsasSequence((SequenceI) jvobj,
+                        mm.getPosition());
               }
             }
             if (message instanceof uk.ac.vamsas.client.picking.SelectionMessage)
@@ -1064,8 +1061,8 @@ public class VamsasApplication implements SelectionSource
                   }
                   else
                   {
-                    int[] intervals = colsel.getVisibleContigs(seqsel
-                            .getStartRes(), seqsel.getEndRes() + 1);
+                    int[] intervals = colsel.getVisibleContigs(
+                            seqsel.getStartRes(), seqsel.getEndRes() + 1);
                     for (int iv = 0; iv < intervals.length; iv += 2)
                     {
                       Seg s = new Seg();
index 09499ff..9164cc0 100644 (file)
@@ -125,6 +125,7 @@ public class WsJobParameters extends JPanel implements ItemListener,
         ActionListener, DocumentListener
 {
   URL linkImageURL = getClass().getResource("/images/link.gif");
+
   private static final String SVC_DEF = "Defaults"; // this is the null
                                                     // parameter set as shown to
                                                     // user
@@ -141,8 +142,11 @@ public class WsJobParameters extends JPanel implements ItemListener,
   JSplitPane settingsPanel = new JSplitPane();
 
   JSplitPane jobPanel = new JSplitPane();
-  boolean split=true;
-  JTabbedPane tabpanels=new JTabbedPane();
+
+  boolean split = true;
+
+  JTabbedPane tabpanels = new JTabbedPane();
+
   JPanel jobOptions = new JPanel();
 
   JScrollPane jobOptionsPane = new JScrollPane();
@@ -242,17 +246,23 @@ public class WsJobParameters extends JPanel implements ItemListener,
             (int) (deskr.getCenterY() - 250), 480, 500));
     frame.setContentPane(this);
     // should recover defaults from user prefs.
-    //settingsPanel.setDividerLocation(0.4);
-    //jobPanel.setDividerLocation(0.5);
+    // settingsPanel.setDividerLocation(0.4);
+    // jobPanel.setDividerLocation(0.5);
     frame.validate();
-    if (split) {
-      javax.swing.SwingUtilities.invokeLater(new Runnable() {
-        public void run() {
+    if (split)
+    {
+      javax.swing.SwingUtilities.invokeLater(new Runnable()
+      {
+        public void run()
+        {
           settingsPanel.setDividerLocation(0.5);
-          jobPanel.setDividerLocation(setDescr.getLineCount()>3 ? 0.35 : 0.16 );
+          jobPanel.setDividerLocation(setDescr.getLineCount() > 3 ? 0.35
+                  : 0.16);
         }
       });
-    } else {
+    }
+    else
+    {
       tabpanels.setSelectedComponent(jobOptionsPane);
     }
     frame.setVisible(true);
@@ -264,10 +274,10 @@ public class WsJobParameters extends JPanel implements ItemListener,
     return false;
   }
 
-
   private void jbInit()
   {
-    updatepref = JvSwingUtils.makeButton("Update", "Update this existing user parameter set.",
+    updatepref = JvSwingUtils.makeButton("Update",
+            "Update this existing user parameter set.",
             new ActionListener()
             {
 
@@ -276,7 +286,8 @@ public class WsJobParameters extends JPanel implements ItemListener,
                 update_actionPerformed(e);
               }
             });
-    deletepref = JvSwingUtils.makeButton("Delete", "Delete the currently selected user parameter set.",
+    deletepref = JvSwingUtils.makeButton("Delete",
+            "Delete the currently selected user parameter set.",
             new ActionListener()
             {
 
@@ -285,7 +296,8 @@ public class WsJobParameters extends JPanel implements ItemListener,
                 delete_actionPerformed(e);
               }
             });
-    createpref = JvSwingUtils.makeButton("Create", "Create a new parameter set with the current settings.",
+    createpref = JvSwingUtils.makeButton("Create",
+            "Create a new parameter set with the current settings.",
             new ActionListener()
             {
 
@@ -295,7 +307,8 @@ public class WsJobParameters extends JPanel implements ItemListener,
               }
             });
     revertpref = JvSwingUtils.makeButton("Revert",
-            "Undo all changes to the current parameter set", new ActionListener()
+            "Undo all changes to the current parameter set",
+            new ActionListener()
             {
 
               public void actionPerformed(ActionEvent e)
@@ -303,20 +316,22 @@ public class WsJobParameters extends JPanel implements ItemListener,
                 revert_actionPerformed(e);
               }
             });
-    startjob = JvSwingUtils.makeButton("Start Job", "Start Job with current settings.",new ActionListener()
-    {
-      public void actionPerformed(ActionEvent e)
-      {
-        startjob_actionPerformed(e);
-      }
-    });
-    canceljob = JvSwingUtils.makeButton("Cancel Job", "Close this dialog and cancel job.", new ActionListener()
-    {
-      public void actionPerformed(ActionEvent e)
-      {
-        canceljob_actionPerformed(e);
-      }
-    });
+    startjob = JvSwingUtils.makeButton("Start Job",
+            "Start Job with current settings.", new ActionListener()
+            {
+              public void actionPerformed(ActionEvent e)
+              {
+                startjob_actionPerformed(e);
+              }
+            });
+    canceljob = JvSwingUtils.makeButton("Cancel Job",
+            "Close this dialog and cancel job.", new ActionListener()
+            {
+              public void actionPerformed(ActionEvent e)
+              {
+                canceljob_actionPerformed(e);
+              }
+            });
 
     setDetails.setBorder(new TitledBorder("Details"));
     setDetails.setLayout(new BorderLayout());
@@ -360,7 +375,7 @@ public class WsJobParameters extends JPanel implements ItemListener,
     SetNamePanel.add(setNameInfo);
     SetNamePanel.add(buttonArea);
     setDetails.add(setDescrView, BorderLayout.CENTER);
-    //setDetails.setPreferredSize(new Dimension(360, 100));
+    // setDetails.setPreferredSize(new Dimension(360, 100));
     jobParameters.setBorder(new TitledBorder("Parameters"));
     jobParameters.setLayout(new BorderLayout());
     paramPane.setPreferredSize(new Dimension(360, 300));
@@ -374,23 +389,26 @@ public class WsJobParameters extends JPanel implements ItemListener,
     jobOptionsPanel.setBorder(new TitledBorder("Options"));
     jobOptionsPane.getViewport().setView(jobOptions);
     jobOptionsPanel.add(jobOptionsPane, BorderLayout.CENTER);
-    
+
     setLayout(new BorderLayout());
     jobPanel.setLeftComponent(setDetails);
-    if (split) {
+    if (split)
+    {
       settingsPanel.setLeftComponent(jobOptionsPanel);
       settingsPanel.setRightComponent(jobParameters);
       settingsPanel.setOrientation(JSplitPane.VERTICAL_SPLIT);
       jobPanel.setRightComponent(settingsPanel);
-    } else {
-    jobPanel.setRightComponent(tabpanels);
-    jobOptionsPane.setName("Options");
-    tabpanels.add(jobOptionsPane);
-    paramPane.setName("Parameters");
-    tabpanels.add(paramPane);
+    }
+    else
+    {
+      jobPanel.setRightComponent(tabpanels);
+      jobOptionsPane.setName("Options");
+      tabpanels.add(jobOptionsPane);
+      paramPane.setName("Parameters");
+      tabpanels.add(paramPane);
     }
     jobPanel.setOrientation(JSplitPane.VERTICAL_SPLIT);
-    add(SetNamePanel, BorderLayout.NORTH);    
+    add(SetNamePanel, BorderLayout.NORTH);
     add(jobPanel, BorderLayout.CENTER);
     JPanel dialogpanel = new JPanel();
     dialogpanel.add(startjob);
@@ -886,12 +904,20 @@ public class WsJobParameters extends JPanel implements ItemListener,
       finfo = parm.getFurtherDetails();
       if (finfo != null)
       {
-        showDesc.setToolTipText("<html>"+JvSwingUtils.wrapTooltip("Click to show brief description<br><img src=\"" + linkImageURL + "\"/> Right click for further information.")+"</html>");
+        showDesc.setToolTipText("<html>"
+                + JvSwingUtils
+                        .wrapTooltip("Click to show brief description<br><img src=\""
+                                + linkImageURL
+                                + "\"/> Right click for further information.")
+                + "</html>");
         showDesc.addMouseListener(this);
       }
       else
       {
-        showDesc.setToolTipText("<html>"+JvSwingUtils.wrapTooltip("Click to show brief description.")+"</html>");
+        showDesc.setToolTipText("<html>"
+                + JvSwingUtils
+                        .wrapTooltip("Click to show brief description.")
+                + "</html>");
       }
       showDesc.addActionListener(new ActionListener()
       {
@@ -1239,7 +1265,9 @@ public class WsJobParameters extends JPanel implements ItemListener,
       {
         hasLink = true;
         // optlabel.setToolTipText("<html><p>"+opt.getDescription()+"</p><img src=\""+linkImageURL+"\"/></html>");
-        enabled.setToolTipText("<html>" + JvSwingUtils.wrapTooltip(opt.getDescription()+"<br><img src=\"" + linkImageURL + "\"/>")
+        enabled.setToolTipText("<html>"
+                + JvSwingUtils.wrapTooltip(opt.getDescription()
+                        + "<br><img src=\"" + linkImageURL + "\"/>")
                 + "</html>");
         // optlabel.addMouseListener(this);
         enabled.addMouseListener(this);
@@ -1247,7 +1275,9 @@ public class WsJobParameters extends JPanel implements ItemListener,
       else
       {
         // optlabel.setToolTipText(opt.getDescription());
-        enabled.setToolTipText("<html>"+JvSwingUtils.wrapTooltip(opt.getDescription())+"</html>");
+        enabled.setToolTipText("<html>"
+                + JvSwingUtils.wrapTooltip(opt.getDescription())
+                + "</html>");
       }
       add(enabled, BorderLayout.NORTH);
       if (opt.getPossibleValues().size() > 1)
@@ -1900,17 +1930,22 @@ public class WsJobParameters extends JPanel implements ItemListener,
         String msg = null;
         if (isServicePreset(newname))
         {
-          final String oldname = curSetName!=null ? curSetName : lastParmSet;
-          final Component ourframe=this;
-          settingDialog=true;
+          final String oldname = curSetName != null ? curSetName
+                  : lastParmSet;
+          final Component ourframe = this;
+          settingDialog = true;
           setName.getEditor().setItem(oldname);
-          settingDialog=false;
-          javax.swing.SwingUtilities.invokeLater(new Runnable() {public void run() {
-            JOptionPane.showMessageDialog(ourframe, 
-                    "Invalid name - preset already exists.", "Invalid name",
-                    JOptionPane.WARNING_MESSAGE);
-            }});
-          
+          settingDialog = false;
+          javax.swing.SwingUtilities.invokeLater(new Runnable()
+          {
+            public void run()
+            {
+              JOptionPane.showMessageDialog(ourframe,
+                      "Invalid name - preset already exists.",
+                      "Invalid name", JOptionPane.WARNING_MESSAGE);
+            }
+          });
+
           return;
         }
         curSetName = newname;
index 0812b7b..d6446af 100644 (file)
@@ -40,68 +40,91 @@ public class WsPreferences extends GWsPreferences
     initFromPreferences();
   }
 
-  Vector<String> wsUrls,oldUrls;
+  Vector<String> wsUrls, oldUrls;
+
   private boolean needWsMenuUpdate;
-  private boolean oldJws1,oldJws2,oldIndexByHost,oldIndexByType,oldEnfin;
+
+  private boolean oldJws1, oldJws2, oldIndexByHost, oldIndexByType,
+          oldEnfin;
+
   private void initFromPreferences()
   {
 
     wsUrls = jalview.ws.jws2.Jws2Discoverer.getServiceUrls();
-    if (wsUrls!=null) {
+    if (wsUrls != null)
+    {
       oldUrls = new Vector<String>(wsUrls);
-    } else {
-      oldUrls=null;
-      wsUrls=new Vector<String>();
+    }
+    else
+    {
+      oldUrls = null;
+      wsUrls = new Vector<String>();
     }
     updateList();
-    enableEnfinServices.setSelected(oldEnfin=Cache.getDefault(
+    enableEnfinServices.setSelected(oldEnfin = Cache.getDefault(
             "SHOW_ENFIN_SERVICES", true));
-    enableJws1Services.setSelected(oldJws1=Cache.getDefault("SHOW_JWS1_SERVICES",
-            true));
-    enableJws2Services.setSelected(oldJws2=Cache.getDefault("SHOW_JWS2_SERVICES",
-            true));
-    indexByHost.setSelected(oldIndexByHost=Cache.getDefault("WSMENU_BYHOST", true));
-    indexByType.setSelected(oldIndexByType=Cache.getDefault("WSMENU_BYTYPE", true));
+    enableJws1Services.setSelected(oldJws1 = Cache.getDefault(
+            "SHOW_JWS1_SERVICES", true));
+    enableJws2Services.setSelected(oldJws2 = Cache.getDefault(
+            "SHOW_JWS2_SERVICES", true));
+    indexByHost.setSelected(oldIndexByHost = Cache.getDefault(
+            "WSMENU_BYHOST", true));
+    indexByType.setSelected(oldIndexByType = Cache.getDefault(
+            "WSMENU_BYTYPE", true));
   }
-  private void updateList() {
+
+  private void updateList()
+  {
     wsList.setListData(wsUrls);
   }
-  private void updateServiceList() {
+
+  private void updateServiceList()
+  {
     jalview.ws.jws2.Jws2Discoverer.setServiceUrls(wsUrls);
   }
-  /* (non-Javadoc)
-   * @see jalview.jbgui.GWsPreferences#deleteWsUrl_actionPerformed(java.awt.event.ActionEvent)
+
+  /*
+   * (non-Javadoc)
+   * 
+   * @see
+   * jalview.jbgui.GWsPreferences#deleteWsUrl_actionPerformed(java.awt.event
+   * .ActionEvent)
    */
   @Override
   protected void deleteWsUrl_actionPerformed(ActionEvent e)
   {
     int sel = wsList.getSelectedIndex();
-    if (sel>-1)
+    if (sel > -1)
     {
       wsUrls.removeElementAt(sel);
       updateList();
     }
   }
 
-  /* (non-Javadoc)
-   * @see jalview.jbgui.GWsPreferences#editWsUrl_actionPerformed(java.awt.event.ActionEvent)
+  /*
+   * (non-Javadoc)
+   * 
+   * @see jalview.jbgui.GWsPreferences#editWsUrl_actionPerformed(java.awt.event.
+   * ActionEvent)
    */
   @Override
   protected void editWsUrl_actionPerformed(ActionEvent e)
   {
     int sel = wsList.getSelectedIndex();
-    if (sel>-1)
+    if (sel > -1)
     {
-      String url=editUrl(wsUrls.elementAt(sel),"Edit JWS2 URL");
-      if (url!=null)
+      String url = editUrl(wsUrls.elementAt(sel), "Edit JWS2 URL");
+      if (url != null)
       {
         int present = wsUrls.indexOf(url);
-        if (present==-1)
+        if (present == -1)
         {
-          wsUrls.setElementAt(url,sel);
+          wsUrls.setElementAt(url, sel);
           updateList();
-        } else {
-          if (present!=sel)
+        }
+        else
+        {
+          if (present != sel)
           {
             wsUrls.removeElementAt(sel);
             updateList();
@@ -110,60 +133,88 @@ public class WsPreferences extends GWsPreferences
       }
     }
   }
-  
-  void updateWsMenuConfig(boolean old) {
-    if (old) {
-      wsUrls = (oldUrls==null) ? null : new Vector(oldUrls);
-    } else {
-      
+
+  void updateWsMenuConfig(boolean old)
+  {
+    if (old)
+    {
+      wsUrls = (oldUrls == null) ? null : new Vector(oldUrls);
+    }
+    else
+    {
+
     }
-    Cache.setProperty("SHOW_ENFIN_SERVICES", Boolean.valueOf(old ? oldEnfin : enableEnfinServices.isSelected()).toString());
-    Cache.setProperty("SHOW_JWS1_SERVICES", Boolean.valueOf(old ? oldJws1 : enableJws1Services.isSelected()).toString());
-    Cache.setProperty("SHOW_JWS2_SERVICES", Boolean.valueOf(old ? oldJws2 : enableJws2Services.isSelected()).toString());
-    Cache.setProperty("WSMENU_BYHOST", Boolean.valueOf(old ? oldIndexByHost : indexByHost.isSelected()).toString());
-    Cache.setProperty("WSMENU_BYTYPE", Boolean.valueOf(old ? oldIndexByType : indexByType.isSelected()).toString());
+    Cache.setProperty(
+            "SHOW_ENFIN_SERVICES",
+            Boolean.valueOf(
+                    old ? oldEnfin : enableEnfinServices.isSelected())
+                    .toString());
+    Cache.setProperty(
+            "SHOW_JWS1_SERVICES",
+            Boolean.valueOf(old ? oldJws1 : enableJws1Services.isSelected())
+                    .toString());
+    Cache.setProperty(
+            "SHOW_JWS2_SERVICES",
+            Boolean.valueOf(old ? oldJws2 : enableJws2Services.isSelected())
+                    .toString());
+    Cache.setProperty(
+            "WSMENU_BYHOST",
+            Boolean.valueOf(old ? oldIndexByHost : indexByHost.isSelected())
+                    .toString());
+    Cache.setProperty(
+            "WSMENU_BYTYPE",
+            Boolean.valueOf(old ? oldIndexByType : indexByType.isSelected())
+                    .toString());
     updateServiceList();
   }
-  
-  /* (non-Javadoc)
-   * @see jalview.jbgui.GWsPreferences#moveWsUrlDown_actionPerformed(java.awt.event.ActionEvent)
+
+  /*
+   * (non-Javadoc)
+   * 
+   * @see
+   * jalview.jbgui.GWsPreferences#moveWsUrlDown_actionPerformed(java.awt.event
+   * .ActionEvent)
    */
   @Override
   protected void moveWsUrlDown_actionPerformed(ActionEvent e)
   {
-    int p=wsList.getSelectedIndex();
-    if (p>-1 && p<wsUrls.size()-1)
+    int p = wsList.getSelectedIndex();
+    if (p > -1 && p < wsUrls.size() - 1)
     {
-      String t = wsUrls.get(p+1);
-      wsUrls.setElementAt(wsUrls.elementAt(p), p+1);
+      String t = wsUrls.get(p + 1);
+      wsUrls.setElementAt(wsUrls.elementAt(p), p + 1);
       wsUrls.setElementAt(t, p);
       updateList();
-      wsList.setSelectedIndex(p+1);
+      wsList.setSelectedIndex(p + 1);
     }
   }
 
-  /* (non-Javadoc)
-   * @see jalview.jbgui.GWsPreferences#moveWsUrlUp_actionPerformed(java.awt.event.ActionEvent)
+  /*
+   * (non-Javadoc)
+   * 
+   * @see
+   * jalview.jbgui.GWsPreferences#moveWsUrlUp_actionPerformed(java.awt.event
+   * .ActionEvent)
    */
   @Override
   protected void moveWsUrlUp_actionPerformed(ActionEvent e)
   {
-    int p=wsList.getSelectedIndex();
-    if (p>0)
+    int p = wsList.getSelectedIndex();
+    if (p > 0)
     {
-      String t = wsUrls.get(p-1);
-      wsUrls.setElementAt(wsUrls.elementAt(p), p-1);
+      String t = wsUrls.get(p - 1);
+      wsUrls.setElementAt(wsUrls.elementAt(p), p - 1);
       wsUrls.setElementAt(t, p);
       updateList();
-      wsList.setSelectedIndex(p-1);
+      wsList.setSelectedIndex(p - 1);
     }
   }
 
   private String editUrl(String initUrl, String title)
   {
-    String url=initUrl;
-    URL foo=null;
-    if (url==null)
+    String url = initUrl;
+    URL foo = null;
+    if (url == null)
     {
       url = "";
     }
@@ -173,54 +224,77 @@ public class WsPreferences extends GWsPreferences
     pane12.add(new JLabel("URL: "), BorderLayout.CENTER);
     pane12.add(urltf, BorderLayout.EAST);
     panel.add(pane12, BorderLayout.NORTH);
-    boolean valid=false;
-    int resp=JOptionPane.CANCEL_OPTION;
-    while (!valid && (resp=JOptionPane.showInternalConfirmDialog(Desktop.desktop, panel, title, JOptionPane.OK_CANCEL_OPTION))==JOptionPane.OK_OPTION)
+    boolean valid = false;
+    int resp = JOptionPane.CANCEL_OPTION;
+    while (!valid
+            && (resp = JOptionPane.showInternalConfirmDialog(
+                    Desktop.desktop, panel, title,
+                    JOptionPane.OK_CANCEL_OPTION)) == JOptionPane.OK_OPTION)
     {
-      try {
-        // TODO: do a better job of checking that the url is a valid discovery URL for web services.
+      try
+      {
+        // TODO: do a better job of checking that the url is a valid discovery
+        // URL for web services.
         foo = new URL(urltf.getText().trim());
         valid = true;
       } catch (Exception e)
       {
         valid = false;
-        JOptionPane.showInternalMessageDialog(Desktop.desktop, "Invalid URL !");
+        JOptionPane.showInternalMessageDialog(Desktop.desktop,
+                "Invalid URL !");
       }
     }
-    if (valid && resp==JOptionPane.OK_OPTION)
+    if (valid && resp == JOptionPane.OK_OPTION)
     {
-      int validate = JOptionPane.showInternalConfirmDialog(Desktop.desktop, "Validate JabaWS Server ?\n(Look in console output for results)", "Test Server?", JOptionPane.YES_NO_OPTION);
+      int validate = JOptionPane
+              .showInternalConfirmDialog(
+                      Desktop.desktop,
+                      "Validate JabaWS Server ?\n(Look in console output for results)",
+                      "Test Server?", JOptionPane.YES_NO_OPTION);
       if (validate == JOptionPane.OK_OPTION)
       {
-        if (jalview.ws.jws2.Jws2Discoverer.testServiceUrl(foo)) 
+        if (jalview.ws.jws2.Jws2Discoverer.testServiceUrl(foo))
         {
           return foo.toString();
-        } else {
-          JOptionPane.showInternalMessageDialog(Desktop.desktop, "Service did not pass validation.\nCheck the Jalview Console for more details.");
         }
-      } else {
+        else
+        {
+          JOptionPane
+                  .showInternalMessageDialog(
+                          Desktop.desktop,
+                          "Service did not pass validation.\nCheck the Jalview Console for more details.");
+        }
+      }
+      else
+      {
         // just return the URL anyway
         return foo.toString();
       }
     }
-    return initUrl; 
+    return initUrl;
   }
-  /* (non-Javadoc)
-   * @see jalview.jbgui.GWsPreferences#newWsUrl_actionPerformed(java.awt.event.ActionEvent)
+
+  /*
+   * (non-Javadoc)
+   * 
+   * @see jalview.jbgui.GWsPreferences#newWsUrl_actionPerformed(java.awt.event.
+   * ActionEvent)
    */
   @Override
   protected void newWsUrl_actionPerformed(ActionEvent e)
   {
-    String url=editUrl(null,"Add new JWS2 URL");
-    if (url!=null)
+    String url = editUrl(null, "Add new JWS2 URL");
+    if (url != null)
     {
       if (!wsUrls.contains(url))
       {
         int selind = wsList.getSelectedIndex();
-        if (selind>-1)
+        if (selind > -1)
         {
           wsUrls.insertElementAt(url, selind);
-        } else {
+        }
+        else
+        {
           wsUrls.addElement(url);
         }
         updateList();
@@ -228,83 +302,105 @@ public class WsPreferences extends GWsPreferences
     }
   }
 
-  /* (non-Javadoc)
-   * @see jalview.jbgui.GWsPreferences#refreshWs_actionPerformed(java.awt.event.ActionEvent)
+  /*
+   * (non-Javadoc)
+   * 
+   * @see jalview.jbgui.GWsPreferences#refreshWs_actionPerformed(java.awt.event.
+   * ActionEvent)
    */
   @Override
   protected void refreshWs_actionPerformed(ActionEvent e)
   {
-    new Thread(new Runnable() {
+    new Thread(new Runnable()
+    {
 
       public void run()
       {
         updateWsMenuConfig(false);
         refreshWsMenu(true);
-      }      
+      }
     }).start();
-    
+
   }
+
   /**
    * 
-   * @param showProgress show progress in dialog or on desktop
+   * @param showProgress
+   *          show progress in dialog or on desktop
    */
   protected void refreshWsMenu(boolean showProgress)
   {
     if (showProgress)
     {
-      new Thread(new Runnable() {
+      new Thread(new Runnable()
+      {
 
         public void run()
         {
           progressBar.setVisible(true);
           validate();
           progressBar.setIndeterminate(true);
-          Desktop.instance.startServiceDiscovery(true); // wait around for all threads to complete
+          Desktop.instance.startServiceDiscovery(true); // wait around for all
+                                                        // threads to complete
           progressBar.setIndeterminate(false);
           progressBar.setVisible(false);
           validate();
-        }      
+        }
       }).start();
-      
-    } else {
-      new Thread(new Runnable() {
+
+    }
+    else
+    {
+      new Thread(new Runnable()
+      {
 
         public void run()
         {
           long ct = System.currentTimeMillis();
-          Desktop.instance.setProgressBar("Refreshing Web Service Menus", ct);
+          Desktop.instance.setProgressBar("Refreshing Web Service Menus",
+                  ct);
           Desktop.instance.startServiceDiscovery(true);
-          Desktop.instance.setProgressBar("Refreshing Web Service Menus", ct);
+          Desktop.instance.setProgressBar("Refreshing Web Service Menus",
+                  ct);
         }
-        
+
       }).start();
     }
   }
 
-  /* (non-Javadoc)
-   * @see jalview.jbgui.GWsPreferences#resetWs_actionPerformed(java.awt.event.ActionEvent)
+  /*
+   * (non-Javadoc)
+   * 
+   * @see
+   * jalview.jbgui.GWsPreferences#resetWs_actionPerformed(java.awt.event.ActionEvent
+   * )
    */
   @Override
   protected void resetWs_actionPerformed(ActionEvent e)
   {
     jalview.ws.jws2.Jws2Discoverer.setServiceUrls(null);
-    wsUrls = jalview.ws.jws2.Jws2Discoverer.getServiceUrls(); 
+    wsUrls = jalview.ws.jws2.Jws2Discoverer.getServiceUrls();
     updateList();
   }
-  protected void ok_ActionPerformed(ActionEvent e) {
+
+  protected void ok_ActionPerformed(ActionEvent e)
+  {
     // update everything regardless.
     updateAndRefreshWsMenuConfig(false);
   }
-  public void updateAndRefreshWsMenuConfig(final boolean showProgressInDialog)
+
+  public void updateAndRefreshWsMenuConfig(
+          final boolean showProgressInDialog)
   {
-    new Thread(new Runnable() {
+    new Thread(new Runnable()
+    {
 
       public void run()
       {
         updateWsMenuConfig(false);
         refreshWsMenu(showProgressInDialog);
-      }      
+      }
     }).start();
-    
+
   }
 }
index 581d9cc..ef2673a 100755 (executable)
@@ -508,14 +508,16 @@ public class AnnotationFile
             if (aa[aai].autoCalculated)\r
             {\r
               // make a note of the name and description\r
-              autoAnnots.put(aa[aai].graph\r
-                      + "\t"\r
-                      + aa[aai].label\r
-                      + "\t"\r
-                      + aa[aai].description\r
-                      + "\t"\r
-                      + (aa[aai].sequenceRef != null ? aa[aai].sequenceRef\r
-                              .getDisplayId(true) : ""), new Integer(1));\r
+              autoAnnots\r
+                      .put(aa[aai].graph\r
+                              + "\t"\r
+                              + aa[aai].label\r
+                              + "\t"\r
+                              + aa[aai].description\r
+                              + "\t"\r
+                              + (aa[aai].sequenceRef != null ? aa[aai].sequenceRef\r
+                                      .getDisplayId(true) : ""),\r
+                              new Integer(1));\r
             }\r
           }\r
         }\r
@@ -1121,9 +1123,7 @@ public class AnnotationFile
         }\r
         else\r
         {\r
-          sg\r
-                  .addSequence(al.getSequenceAt(Integer.parseInt(tmp) - 1),\r
-                          false);\r
+          sg.addSequence(al.getSequenceAt(Integer.parseInt(tmp) - 1), false);\r
         }\r
       }\r
     }\r
@@ -1234,8 +1234,8 @@ public class AnnotationFile
         {\r
           sg.cs.setConservationInc(Integer.parseInt(value));\r
           Conservation c = new Conservation("Group",\r
-                  ResidueProperties.propHash, 3, sg.getSequences(null), sg\r
-                          .getStartRes(), sg.getEndRes() + 1);\r
+                  ResidueProperties.propHash, 3, sg.getSequences(null),\r
+                  sg.getStartRes(), sg.getEndRes() + 1);\r
 \r
           c.calculate();\r
           c.verdict(false, 25);\r
@@ -1314,7 +1314,7 @@ public class AnnotationFile
       token = st.nextToken();\r
       if (ala == null)\r
       {\r
-        System.err.print(" "+token);\r
+        System.err.print(" " + token);\r
       }\r
       else\r
       {\r
@@ -1328,7 +1328,7 @@ public class AnnotationFile
         }\r
       }\r
     }\r
-    if (ala==null)\r
+    if (ala == null)\r
     {\r
       System.err.print("\n");\r
     }\r
index ee24238..b1952a9 100755 (executable)
@@ -597,11 +597,14 @@ public class AppletFormatAdapter
       if (!fp.isValid())
       {
         fp = null;
-      } else {
-      if (debug)
+      }
+      else
       {
-        System.out.println("Successful.");
-      }}
+        if (debug)
+        {
+          System.out.println("Successful.");
+        }
+      }
     } catch (Exception e)
     {
       if (debug)
index 4973908..4c700ed 100755 (executable)
@@ -189,9 +189,7 @@ public class ClustalFile extends AlignFile
 
       while ((j < s.length) && (s[j] != null))
       {
-        out
-                .append(new Format("%-" + maxid + "s").form(printId(s[j])
-                        + " "));
+        out.append(new Format("%-" + maxid + "s").form(printId(s[j]) + " "));
 
         int start = i * len;
         int end = start + len;
index cfc08fb..7c70b54 100755 (executable)
@@ -165,24 +165,27 @@ public class FeaturesFile extends AlignFile
               // fifth is either 'above','below', or 'none'.\r
               // sixth is a float value and only required when fifth is either\r
               // 'above' or 'below'.\r
-              StringTokenizer gcol = new StringTokenizer(colscheme, "|", true);\r
+              StringTokenizer gcol = new StringTokenizer(colscheme, "|",\r
+                      true);\r
               // set defaults\r
               int threshtype = AnnotationColourGradient.NO_THRESHOLD;\r
               float min = Float.MIN_VALUE, max = Float.MAX_VALUE, threshval = Float.NaN;\r
               boolean labelCol = false;\r
               // Parse spec line\r
               String mincol = gcol.nextToken();\r
-              if (mincol=="|")\r
+              if (mincol == "|")\r
               {\r
                 System.err\r
-                .println("Expected either 'label' or a colour specification in the line: "+line );\r
+                        .println("Expected either 'label' or a colour specification in the line: "\r
+                                + line);\r
                 continue;\r
               }\r
               String maxcol = null;\r
               if (mincol.toLowerCase().indexOf("label") == 0)\r
               {\r
                 labelCol = true;\r
-                mincol = (gcol.hasMoreTokens() ? gcol.nextToken() : null); // skip '|'\r
+                mincol = (gcol.hasMoreTokens() ? gcol.nextToken() : null); // skip\r
+                                                                           // '|'\r
                 mincol = (gcol.hasMoreTokens() ? gcol.nextToken() : null);\r
               }\r
               String abso = null, minval, maxval;\r
@@ -191,16 +194,20 @@ public class FeaturesFile extends AlignFile
                 // at least four more tokens\r
                 if (mincol.equals("|"))\r
                 {\r
-                  mincol="";\r
-                } else {\r
+                  mincol = "";\r
+                }\r
+                else\r
+                {\r
                   gcol.nextToken(); // skip next '|'\r
                 }\r
                 // continue parsing rest of line\r
                 maxcol = gcol.nextToken();\r
                 if (maxcol.equals("|"))\r
                 {\r
-                  maxcol="";\r
-                } else {\r
+                  maxcol = "";\r
+                }\r
+                else\r
+                {\r
                   gcol.nextToken(); // skip next '|'\r
                 }\r
                 abso = gcol.nextToken();\r
@@ -216,7 +223,8 @@ public class FeaturesFile extends AlignFile
                   gcol.nextToken(); // skip next '|'\r
                 }\r
                 maxval = gcol.nextToken();\r
-                if (gcol.hasMoreTokens()) {\r
+                if (gcol.hasMoreTokens())\r
+                {\r
                   gcol.nextToken(); // skip next '|'\r
                 }\r
                 try\r
index dec784b..79a9190 100755 (executable)
@@ -194,9 +194,9 @@ public class FormatAdapter extends AppletFormatAdapter
   {
     if (omitHidden != null)
     {
-      // 
-      Alignment alv = new Alignment(replaceStrings(alignment
-              .getSequencesArray(), omitHidden));
+      //
+      Alignment alv = new Alignment(replaceStrings(
+              alignment.getSequencesArray(), omitHidden));
       AlignmentAnnotation[] ala = alignment.getAlignmentAnnotation();
       if (ala != null)
       {
@@ -205,8 +205,8 @@ public class FormatAdapter extends AppletFormatAdapter
           AlignmentAnnotation na = new AlignmentAnnotation(ala[i]);
           if (selgp != null)
           {
-            colSel.makeVisibleAnnotation(selgp.getStartRes(), selgp
-                    .getEndRes(), na);
+            colSel.makeVisibleAnnotation(selgp.getStartRes(),
+                    selgp.getEndRes(), na);
           }
           else
           {
index ef917d1..f131ce6 100755 (executable)
@@ -43,10 +43,10 @@ public class HTMLOutput
     fr = new FeatureRenderer(ap);
     fr.transferSettings(fr1);
 
-    JalviewFileChooser chooser = new JalviewFileChooser(jalview.bin.Cache
-            .getProperty("LAST_DIRECTORY"), new String[]
-    { "html" }, new String[]
-    { "HTML files" }, "HTML files");
+    JalviewFileChooser chooser = new JalviewFileChooser(
+            jalview.bin.Cache.getProperty("LAST_DIRECTORY"), new String[]
+            { "html" }, new String[]
+            { "HTML files" }, "HTML files");
 
     chooser.setFileView(new JalviewFileView());
     chooser.setDialogTitle("Save as HTML");
@@ -109,8 +109,7 @@ public class HTMLOutput
   void drawUnwrappedAlignment(PrintWriter out)
   {
     out.println("<table border=\"1\"><tr><td>\n");
-    out
-            .println("<table border=\"0\"  cellpadding=\"0\" cellspacing=\"0\">\n");
+    out.println("<table border=\"0\"  cellpadding=\"0\" cellspacing=\"0\">\n");
 
     // ////////////
     SequenceI seq;
@@ -182,8 +181,7 @@ public class HTMLOutput
     String b;
 
     out.println("<table border=\"1\"><tr><td>\n");
-    out
-            .println("<table border=\"0\"  cellpadding=\"0\" cellspacing=\"0\">\n");
+    out.println("<table border=\"0\"  cellpadding=\"0\" cellspacing=\"0\">\n");
 
     for (int startRes = 0; startRes < al.getWidth(); startRes += av
             .getWrappedWidth())
index 458fbba..f41c2c3 100755 (executable)
@@ -207,8 +207,8 @@ public class JPredFile extends AlignFile
 
           for (int j = 0; j < i; j++)
           {
-            scores.setElementAt((Object) ((Float) scores.elementAt(j))
-                    .toString(), j);
+            scores.setElementAt(
+                    (Object) ((Float) scores.elementAt(j)).toString(), j);
           }
 
           scores.addElement((Object) ascore);
@@ -296,8 +296,7 @@ public class JPredFile extends AlignFile
       }
 
       if ((newSeq.getName().startsWith("QUERY") || newSeq.getName()
-              .startsWith("align;"))
-              && (QuerySeqPosition == -1))
+              .startsWith("align;")) && (QuerySeqPosition == -1))
       {
         QuerySeqPosition = seqs.size();
       }
index 42a5fa9..acd24b3 100755 (executable)
@@ -265,9 +265,7 @@ public class JalviewFileChooser extends JFileChooser
         }
       });
 
-      this
-              .setBorder(new javax.swing.border.TitledBorder(
-                      "Recently Opened"));
+      this.setBorder(new javax.swing.border.TitledBorder("Recently Opened"));
 
       final JScrollPane scroller = new JScrollPane(list);
       scroller.setPreferredSize(new Dimension(130, 200));
index d7e901e..11f05b7 100755 (executable)
@@ -95,8 +95,8 @@ public class JnetAnnotationMaker
           {
             for (int j = 0; j < width; j++)
             {
-              annotations[gapmap[j]] = new Annotation("", "", preds[i]
-                      .getCharAt(j), 0);
+              annotations[gapmap[j]] = new Annotation("", "",
+                      preds[i].getCharAt(j), 0);
             }
           }
           else
@@ -126,9 +126,9 @@ public class JnetAnnotationMaker
             {
               float value = new Float(preds[i].getCharAt(j) + "")
                       .floatValue();
-              annotations[gapmap[delMap[j]]] = new Annotation(preds[i]
-                      .getCharAt(j)
-                      + "", "", preds[i].getCharAt(j), value);
+              annotations[gapmap[delMap[j]]] = new Annotation(
+                      preds[i].getCharAt(j) + "", "",
+                      preds[i].getCharAt(j), value);
             }
           }
         }
@@ -146,9 +146,8 @@ public class JnetAnnotationMaker
           {
             for (int j = 0; j < width; j++)
             {
-              annotations[gapmap[delMap[j]]] = new Annotation(preds[i]
-                      .getCharAt(j)
-                      + "", "", ' ', 0);
+              annotations[gapmap[delMap[j]]] = new Annotation(
+                      preds[i].getCharAt(j) + "", "", ' ', 0);
             }
           }
         }
index 5a5c9ac..b7df38f 100755 (executable)
@@ -215,8 +215,8 @@ public class NewickFile extends FileParse
             + " at position "
             + p
             + " ( "
-            + s.substring(((p - r) < 0) ? 0 : (p - r), ((p + r) > s
-                    .length()) ? s.length() : (p + r)) + " )\n";
+            + s.substring(((p - r) < 0) ? 0 : (p - r),
+                    ((p + r) > s.length()) ? s.length() : (p + r)) + " )\n";
   }
 
   // @tree annotations
@@ -470,8 +470,8 @@ public class NewickFile extends FileParse
             } catch (Exception e)
             {
               Error = ErrorStringrange(Error,
-                      "Can't parse bootstrap value", 4, ncp
-                              + nbootstrap.matchedFrom(), nf);
+                      "Can't parse bootstrap value", 4,
+                      ncp + nbootstrap.matchedFrom(), nf);
             }
           }
         }
@@ -488,8 +488,8 @@ public class NewickFile extends FileParse
           } catch (Exception e)
           {
             Error = ErrorStringrange(Error,
-                    "Can't parse node distance value", 7, ncp
-                            + ndist.matchedFrom(), nf);
+                    "Can't parse node distance value", 7,
+                    ncp + ndist.matchedFrom(), nf);
           }
         }
 
index 6a5b473..ef06b0c 100755 (executable)
@@ -157,10 +157,8 @@ public class PIRFile extends AlignFile
           }
           else
           {
-            out
-                    .append(s[i].getName() + " "
-                            + (s[i].getEnd() - s[i].getStart() + 1)
-                            + " residues\n");
+            out.append(s[i].getName() + " "
+                    + (s[i].getEnd() - s[i].getStart() + 1) + " residues\n");
           }
         }
       }
index 04b1f87..34ce3bf 100644 (file)
@@ -363,8 +363,8 @@ public class StockholmFile extends AlignFile
           if (x.search(annContent))\r
           {\r
             // parse out and create alignment annotation directly.\r
-            parseAnnotationRow(annotations, x.stringMatched(1), x\r
-                    .stringMatched(2));\r
+            parseAnnotationRow(annotations, x.stringMatched(1),\r
+                    x.stringMatched(2));\r
           }\r
         }\r
         else if (annType.equals("GR"))\r
index 108bcb7..06154c8 100644 (file)
@@ -424,8 +424,8 @@ public class VamsasAppDatastore
         {
           boolean modified = false;
           // check existing sequences in local and in document.
-          Vector docseqs = new Vector(alignment
-                  .getAlignmentSequenceAsReference());
+          Vector docseqs = new Vector(
+                  alignment.getAlignmentSequenceAsReference());
           for (int i = 0; i < jal.getHeight(); i++)
           {
             modified |= syncToAlignmentSequence(jal.getSequenceAt(i),
@@ -633,11 +633,9 @@ public class VamsasAppDatastore
                 if (aa[i].annotations[a].secondaryStructure != ' ')
                 {
                   Glyph ss = new Glyph();
-                  ss
-                          .setDict(uk.ac.vamsas.objects.utils.GlyphDictionary.PROTEIN_SS_3STATE);
-                  ss
-                          .setContent(String
-                                  .valueOf(aa[i].annotations[a].secondaryStructure));
+                  ss.setDict(uk.ac.vamsas.objects.utils.GlyphDictionary.PROTEIN_SS_3STATE);
+                  ss.setContent(String
+                          .valueOf(aa[i].annotations[a].secondaryStructure));
                   ae.addGlyph(ss);
                 }
                 an.addAnnotationElement(ae);
@@ -657,10 +655,8 @@ public class VamsasAppDatastore
                 an.setGroup(Integer.toString(aa[i].graphGroup));
                 if (aa[i].threshold != null && aa[i].threshold.displayed)
                 {
-                  an
-                          .addProperty(Properties.newProperty(THRESHOLD,
-                                  Properties.FLOATTYPE, ""
-                                          + aa[i].threshold.value));
+                  an.addProperty(Properties.newProperty(THRESHOLD,
+                          Properties.FLOATTYPE, "" + aa[i].threshold.value));
                   if (aa[i].threshold.label != null)
                   {
                     an.addProperty(Properties.newProperty(THRESHOLD
@@ -708,8 +704,8 @@ public class VamsasAppDatastore
           {
             TreePanel tp = (TreePanel) frames[t];
 
-            if (tp.getViewPort().getSequenceSetId().equals(
-                    av.getSequenceSetId()))
+            if (tp.getViewPort().getSequenceSetId()
+                    .equals(av.getSequenceSetId()))
             {
               DatastoreItem vtree = new jalview.io.vamsas.Tree(this, tp,
                       jal, alignment);
@@ -936,8 +932,8 @@ public class VamsasAppDatastore
     else
     {
       alseq = new jalview.datamodel.Sequence(valseq.getName(), valseq
-              .getSequence().replace(valGapchar, gapChar), (int) valseq
-              .getStart(), (int) valseq.getEnd());
+              .getSequence().replace(valGapchar, gapChar),
+              (int) valseq.getStart(), (int) valseq.getEnd());
 
       Vobject datsetseq = (Vobject) valseq.getRefid();
       if (datsetseq != null)
@@ -1037,8 +1033,7 @@ public class VamsasAppDatastore
       {
         // we only write an annotation where it really exists.
         Glyph ss = new Glyph();
-        ss
-                .setDict(uk.ac.vamsas.objects.utils.GlyphDictionary.PROTEIN_SS_3STATE);
+        ss.setDict(uk.ac.vamsas.objects.utils.GlyphDictionary.PROTEIN_SS_3STATE);
         ss.setContent(String
                 .valueOf(alan.annotations[a].secondaryStructure));
         ae.addGlyph(ss);
@@ -1512,8 +1507,7 @@ public class VamsasAppDatastore
       {
         // TODO raise GUI warning if user requests it.
         jalview.bin.Cache.log
-                .error(
-                        "Couldn't update jalview client application data. Giving up - local settings probably lost.",
+                .error("Couldn't update jalview client application data. Giving up - local settings probably lost.",
                         e);
       }
     }
@@ -1720,8 +1714,7 @@ public class VamsasAppDatastore
               AlignmentSequence valseq = alignment.getAlignmentSequence(i);
               jalview.datamodel.Sequence alseq = (jalview.datamodel.Sequence) getvObj2jv(valseq);
               if (syncFromAlignmentSequence(valseq, valGapchar, gapChar,
-                      dsseqs)
-                      && alseq != null)
+                      dsseqs) && alseq != null)
               {
 
                 // updated to sequence from the document
@@ -1867,8 +1860,10 @@ public class VamsasAppDatastore
                               .toString());
               av = alignFrame.getViewport();
               newAlignmentViews.addElement(av);
-              String title = alignment.getProvenance().getEntry(
-                      alignment.getProvenance().getEntryCount() - 1)
+              String title = alignment
+                      .getProvenance()
+                      .getEntry(
+                              alignment.getProvenance().getEntryCount() - 1)
                       .getAction();
               if (alignment.getPropertyCount() > 0)
               {
@@ -2059,16 +2054,14 @@ public class VamsasAppDatastore
             {
               if (glyphs[g]
                       .getDict()
-                      .equals(
-                              uk.ac.vamsas.objects.utils.GlyphDictionary.PROTEIN_SS_3STATE))
+                      .equals(uk.ac.vamsas.objects.utils.GlyphDictionary.PROTEIN_SS_3STATE))
               {
                 ss = glyphs[g].getContent();
                 AeContent[HASSECSTR] = true;
               }
               else if (glyphs[g]
                       .getDict()
-                      .equals(
-                              uk.ac.vamsas.objects.utils.GlyphDictionary.PROTEIN_HD_HYDRO))
+                      .equals(uk.ac.vamsas.objects.utils.GlyphDictionary.PROTEIN_HD_HYDRO))
               {
                 Cache.log.debug("ignoring hydrophobicity glyph marker.");
                 AeContent[HASHPHOB] = true;
@@ -2107,14 +2100,14 @@ public class VamsasAppDatastore
           if (colour == null)
           {
             anot[row][pos] = new jalview.datamodel.Annotation(
-                    (dc != null) ? dc : "", desc, (ss != null) ? ss
-                            .charAt(0) : ' ', val);
+                    (dc != null) ? dc : "", desc,
+                    (ss != null) ? ss.charAt(0) : ' ', val);
           }
           else
           {
             anot[row][pos] = new jalview.datamodel.Annotation(
-                    (dc != null) ? dc : "", desc, (ss != null) ? ss
-                            .charAt(0) : ' ', val, colour);
+                    (dc != null) ? dc : "", desc,
+                    (ss != null) ? ss.charAt(0) : ' ', val, colour);
           }
         }
         else
index 81b4e55..8fbf002 100755 (executable)
@@ -56,13 +56,12 @@ public class WSWUBlastClient
   {
     this.ap = ap;
     this.al = al;
-    output
-            .setText("To display sequence features an exact Uniprot id with 100% sequence identity match must be entered."
-                    + "\nIn order to display these features, try changing the names of your sequences to the ids suggested below."
-                    + "\n\nRunning WSWUBlast at EBI."
-                    + "\nPlease quote Pillai S., Silventoinen V., Kallio K., Senger M., Sobhany S., Tate J., Velankar S., Golovin A., Henrick K., Rice P., Stoehr P., Lopez R."
-                    + "\nSOAP-based services provided by the European Bioinformatics Institute."
-                    + "\nNucleic Acids Res. 33(1):W25-W28 (2005));");
+    output.setText("To display sequence features an exact Uniprot id with 100% sequence identity match must be entered."
+            + "\nIn order to display these features, try changing the names of your sequences to the ids suggested below."
+            + "\n\nRunning WSWUBlast at EBI."
+            + "\nPlease quote Pillai S., Silventoinen V., Kallio K., Senger M., Sobhany S., Tate J., Velankar S., Golovin A., Henrick K., Rice P., Stoehr P., Lopez R."
+            + "\nSOAP-based services provided by the European Bioinformatics Institute."
+            + "\nNucleic Acids Res. 33(1):W25-W28 (2005));");
 
     Desktop.addInternalFrame(output,
             "BLASTing for unidentified sequences ", 800, 300);
@@ -286,8 +285,8 @@ public class WSWUBlastClient
         Data inputs[] = new Data[1];
         Data input = new Data();
         input.setType("sequence");
-        input.setContent(AlignSeq.extractGaps("-. ", sequence
-                .getSequenceAsString()));
+        input.setContent(AlignSeq.extractGaps("-. ",
+                sequence.getSequenceAsString()));
         inputs[0] = input;
 
         WSWUBlastService service = new WSWUBlastServiceLocator();
index 88caf46..7af8a7b 100644 (file)
@@ -61,8 +61,8 @@ public class Datasetsequence extends DatastoreItem
   public void addFromDocument()\r
   {\r
     Sequence vseq = (Sequence) vobj;\r
-    SequenceI dsseq = new jalview.datamodel.Sequence(vseq.getName(), vseq\r
-            .getSequence(), (int) vseq.getStart(), (int) vseq.getEnd());\r
+    SequenceI dsseq = new jalview.datamodel.Sequence(vseq.getName(),\r
+            vseq.getSequence(), (int) vseq.getStart(), (int) vseq.getEnd());\r
     dsseq.setDescription(vseq.getDescription());\r
     bindjvvobj(dsseq, vseq);\r
     dsseq.setVamsasId(vseq.getVorbaId().getId());\r
@@ -76,8 +76,7 @@ public class Datasetsequence extends DatastoreItem
     SequenceI sequence = (SequenceI) jvobj;\r
     if (!sequence.getSequenceAsString().equals(sq.getSequence()))\r
     {\r
-      log\r
-              .warn("Potential Client Error ! - mismatch of dataset sequence: and jalview internal dataset sequence.");\r
+      log.warn("Potential Client Error ! - mismatch of dataset sequence: and jalview internal dataset sequence.");\r
     }\r
     else\r
     {\r
@@ -217,8 +216,7 @@ public class Datasetsequence extends DatastoreItem
 \r
   public void conflict()\r
   {\r
-    log\r
-            .warn("Conflict in dataset sequence update to document. Overwriting document");\r
+    log.warn("Conflict in dataset sequence update to document. Overwriting document");\r
     // TODO: could try to import from document data to jalview first. and then\r
     updateToDoc();\r
   }\r
index d37e845..f2d49e7 100644 (file)
@@ -381,8 +381,8 @@ public abstract class DatastoreItem
   {
     datastore = ds;
     dsReg = ds.getDatastoreRegisty();
-    initDatastoreItem(ds.getProvEntry(), ds.getClientDocument(), ds
-            .getVamsasObjectBinding(), ds.getJvObjectBinding());
+    initDatastoreItem(ds.getProvEntry(), ds.getClientDocument(),
+            ds.getVamsasObjectBinding(), ds.getJvObjectBinding());
   }
 
   private void initDatastoreItem(Entry provEntry, IClientDocument cdoc,
index e247d9c..28ae762 100644 (file)
@@ -103,8 +103,7 @@ public class Dbref extends Rangetype
    */
   private void updateMapTo(jalview.datamodel.Mapping mp)
   {
-    log
-            .info("Performing updateMapTo remove this message when we know what we're doing.");
+    log.info("Performing updateMapTo remove this message when we know what we're doing.");
     // TODO determine how sequences associated with database mappings are stored
     // in the document
     if (mp != null && mp.getTo() != null)
@@ -127,7 +126,7 @@ public class Dbref extends Rangetype
                                   : uk.ac.vamsas.objects.utils.SymbolDictionary.STANDARD_AA),
                   ds);
         }
-        // 
+        //
         // TODO: NOW add a mapping between new dataset sequence and sequence
         // associated with the database reference
 
index f044abc..0525cf9 100644 (file)
@@ -250,8 +250,7 @@ public class Sequencefeature extends Rangetype
           else if (vlu instanceof Integer)\r
           {\r
             valid = true;\r
-            nprop\r
-                    .setType(uk.ac.vamsas.objects.utils.Properties.INTEGERTYPE);\r
+            nprop.setType(uk.ac.vamsas.objects.utils.Properties.INTEGERTYPE);\r
           }\r
           else if (vlu instanceof Float)\r
           {\r
@@ -279,9 +278,9 @@ public class Sequencefeature extends Rangetype
   private SequenceFeature getJalviewSeqFeature(RangeAnnotation dseta)\r
   {\r
     int[] se = getBounds(dseta);\r
-    SequenceFeature sf = new jalview.datamodel.SequenceFeature(dseta\r
-            .getType(), dseta.getDescription(), dseta.getStatus(), se[0],\r
-            se[1], dseta.getGroup());\r
+    SequenceFeature sf = new jalview.datamodel.SequenceFeature(\r
+            dseta.getType(), dseta.getDescription(), dseta.getStatus(),\r
+            se[0], se[1], dseta.getGroup());\r
     if (dseta.getLinkCount() > 0)\r
     {\r
       Link[] links = dseta.getLink();\r
index 8223123..9263690 100644 (file)
@@ -346,9 +346,9 @@ public class Sequencemapping extends Rangetype
       if (!sense)
       {
         mapping = this.parsemapType(sequenceMapping, 1, 3); // invert sense
-        mapping = new jalview.util.MapList(mapping.getToRanges(), mapping
-                .getFromRanges(), mapping.getToRatio(), mapping
-                .getFromRatio());
+        mapping = new jalview.util.MapList(mapping.getToRanges(),
+                mapping.getFromRanges(), mapping.getToRatio(),
+                mapping.getFromRatio());
         afc.addMap(to, from, mapping);
       }
       else
index 2a62df4..9b76f91 100644 (file)
@@ -155,8 +155,7 @@ public class Tree extends DatastoreItem
     else
     {
       // handle conflict
-      log
-              .info("TODO: Add the locally modified tree in Jalview as a new tree in document, leaving locked tree unchanged.");
+      log.info("TODO: Add the locally modified tree in Jalview as a new tree in document, leaving locked tree unchanged.");
     }
   }
 
@@ -220,8 +219,8 @@ public class Tree extends DatastoreItem
       // or just correctly resolve the tree's seqData to the correct alignment
       // in
       // the document.
-      Vector alsqrefs = getjv2vObjs(findAlignmentSequences(jal, tp
-              .getTree().seqData.getSequences()));
+      Vector alsqrefs = getjv2vObjs(findAlignmentSequences(jal,
+              tp.getTree().seqData.getSequences()));
       Object[] alsqs = new Object[alsqrefs.size()];
       alsqrefs.copyInto(alsqs);
       vInput.setObjRef(alsqs);
@@ -347,9 +346,7 @@ public class Tree extends DatastoreItem
         else
         {
           leaf.setPlaceholder(true);
-          leaf
-                  .setElement(new Sequence(leaf.getName(),
-                          "THISISAPLACEHLDER"));
+          leaf.setElement(new Sequence(leaf.getName(), "THISISAPLACEHLDER"));
         }
       }
     }
index af7766a..9260b23 100755 (executable)
@@ -363,8 +363,7 @@ public class GAlignFrame extends JInternalFrame
             if (evt.isControlDown()
                     || SwingUtilities.isRightMouseButton(evt))
             {
-              radioItem
-                      .removeActionListener(radioItem.getActionListeners()[0]);
+              radioItem.removeActionListener(radioItem.getActionListeners()[0]);
 
               int option = JOptionPane.showInternalConfirmDialog(
                       jalview.gui.Desktop.desktop,
@@ -492,7 +491,7 @@ public class GAlignFrame extends JInternalFrame
       default:
         noColourmenuItem.setSelected(true);
         break;
-        
+
       }
     }
 
index d45edd6..e4b20a0 100755 (executable)
@@ -56,8 +56,9 @@ public class GPCAPanel extends JInternalFrame
   JMenuItem print = new JMenuItem();
 
   JMenuItem outputValues = new JMenuItem();
-  
+
   JMenuItem outputPoints = new JMenuItem();
+
   JMenuItem outputProjPoints = new JMenuItem();
 
   protected JMenu viewMenu = new JMenu();
@@ -242,13 +243,13 @@ public class GPCAPanel extends JInternalFrame
   protected void outputPoints_actionPerformed(ActionEvent e)
   {
     // TODO Auto-generated method stub
-    
+
   }
 
   protected void outputProjPoints_actionPerformed(ActionEvent e)
   {
     // TODO Auto-generated method stub
-    
+
   }
 
   protected void xCombobox_actionPerformed(ActionEvent e)
index 7205773..aaa73a1 100755 (executable)
@@ -186,7 +186,7 @@ public class GPreferences extends JPanel
   protected JCheckBox modellerOutput = new JCheckBox();
 
   protected JPanel dasPanel = new JPanel();
-  
+
   BorderLayout borderLayout4 = new BorderLayout();
 
   protected JPanel wsPanel = new JPanel();
@@ -228,9 +228,6 @@ public class GPreferences extends JPanel
   protected JCheckBox shareSelections = new JCheckBox();
 
   protected JCheckBox followHighlight = new JCheckBox();
-  
-  
-
 
   /**
    * Creates a new GPreferences object.
index 0fb2c4c..26bdad2 100644 (file)
@@ -227,7 +227,7 @@ public class GStructureViewer extends JInternalFrame
     colourButtons.add(turnColour);
     colourButtons.add(buriedColour);
     colourButtons.add(userColour);
-    
+
     helpMenu.add(jmolHelp);
     jmolActionMenu.add(alignStructs);
   }
index e213f01..6085b64 100755 (executable)
@@ -177,9 +177,8 @@ public class GUserDefinedColours extends JPanel
     label.setFont(new java.awt.Font("Verdana", Font.ITALIC, 10));
     label.setOpaque(false);
     label.setPreferredSize(new Dimension(260, 34));
-    label
-            .setText("<html>Save your colour scheme with a unique name and it will be added "
-                    + "to the Colour menu.</html>");
+    label.setText("<html>Save your colour scheme with a unique name and it will be added "
+            + "to the Colour menu.</html>");
     caseSensitive.setText("Case Sensitive");
     caseSensitive.addActionListener(new ActionListener()
     {
index 9505457..2b30f47 100644 (file)
@@ -72,18 +72,19 @@ public class GWsPreferences extends JPanel
   protected JCheckBox enableEnfinServices = new JCheckBox();
 
   protected JButton refreshWs = new JButton();
+
   protected JButton resetWs = new JButton();
-  
+
   protected JProgressBar progressBar = new JProgressBar();
 
   JScrollPane wsListPane = new JScrollPane();
-  
+
   JPanel wsListUrlPanel = new JPanel();
-  
+
   JPanel wsListPanel = new JPanel();
 
   JPanel wsListButtons = new JPanel();
-  
+
   JPanel wsListNavButs = new JPanel();
 
   BorderLayout myBorderlayout = new BorderLayout();
@@ -97,7 +98,9 @@ public class GWsPreferences extends JPanel
   GridBagLayout wsMenuLayout = new GridBagLayout();
 
   JPanel wsMenuButtons = new JPanel();
+
   JPanel wsMenuRefreshButs = new JPanel();
+
   public GWsPreferences()
   {
     jbInit();
@@ -117,7 +120,7 @@ public class GWsPreferences extends JPanel
     });
     resetWs.setFont(new java.awt.Font("Verdana", Font.PLAIN, 10));
     resetWs.setText("Reset Services");
-    
+
     resetWs.addActionListener(new ActionListener()
     {
       public void actionPerformed(ActionEvent e)
@@ -225,30 +228,31 @@ public class GWsPreferences extends JPanel
     });
 
     setLayout(myBorderlayout);
-    setPreferredSize(new Dimension(500,400));
+    setPreferredSize(new Dimension(500, 400));
     progressBar.setPreferredSize(new Dimension(450, 20));
     progressBar.setString("");
     wsListUrlPanel.setBorder(BorderFactory.createEtchedBorder());
     wsListUrlPanel.setLayout(new BorderLayout());
-//    wsListUrlPanel.setPreferredSize(new Dimension(482,202));
+    // wsListUrlPanel.setPreferredSize(new Dimension(482,202));
     wsListPane.setBorder(BorderFactory.createEtchedBorder());
     wsListPane.getViewport().add(wsList);
     wsListPane.setPreferredSize(new Dimension(380, 200));
     wsList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
-    wsList.addMouseListener(new MouseListener() {
+    wsList.addMouseListener(new MouseListener()
+    {
 
       public void mouseClicked(MouseEvent e)
       {
-        if (e.getClickCount()>1)
+        if (e.getClickCount() > 1)
         {
           editWsUrl_actionPerformed(null);
         }
-        
+
       }
 
       public void mouseEntered(MouseEvent e)
       {
-        
+
       }
 
       public void mouseExited(MouseEvent e)
@@ -257,54 +261,54 @@ public class GWsPreferences extends JPanel
 
       public void mousePressed(MouseEvent e)
       {
-        
+
       }
 
       public void mouseReleased(MouseEvent e)
       {
-        
+
       }
-      
+
     });
-//    wsListButtons.setPreferredSize(new Dimension(480, 60));
+    // wsListButtons.setPreferredSize(new Dimension(480, 60));
     wsListButtons.setLayout(new FlowLayout());
-    //wsListButtons.add(moveWsUrlUp);
-    //wsListButtons.add(moveWsUrlDown);
+    // wsListButtons.add(moveWsUrlUp);
+    // wsListButtons.add(moveWsUrlDown);
     wsListButtons.add(newWsUrl);
     wsListButtons.add(editWsUrl);
     wsListButtons.add(deleteWsUrl);
-    wsListNavButs.setSize(new Dimension(80,80));
-    wsListNavButs.setPreferredSize(new Dimension(80,80));
+    wsListNavButs.setSize(new Dimension(80, 80));
+    wsListNavButs.setPreferredSize(new Dimension(80, 80));
     wsListNavButs.setLayout(new FlowLayout());
     wsListNavButs.add(moveWsUrlUp);
     wsListNavButs.add(moveWsUrlDown);
-    wsListUrlPanel.add(wsListPane,BorderLayout.EAST);
-    wsListUrlPanel.add(wsListNavButs,BorderLayout.WEST);
+    wsListUrlPanel.add(wsListPane, BorderLayout.EAST);
+    wsListUrlPanel.add(wsListNavButs, BorderLayout.WEST);
     wsListPanel.setBorder(wsListTitleBorder);
     wsListPanel.setLayout(new BorderLayout());
     wsListPanel.add(wsListUrlPanel, BorderLayout.NORTH);
     wsListPanel.add(wsListButtons, BorderLayout.SOUTH);
-    wsMenuButtons.setLayout(new GridLayout(2,3));
+    wsMenuButtons.setLayout(new GridLayout(2, 3));
     wsMenuButtons.add(indexByHost);
     wsMenuButtons.add(indexByType);
     wsMenuButtons.add(enableJws1Services);
     wsMenuButtons.add(enableJws2Services);
     wsMenuButtons.add(enableEnfinServices);
     wsMenuRefreshButs.setLayout(new FlowLayout());
-    wsMenuRefreshButs.setPreferredSize(new Dimension(480,30));
-    wsMenuRefreshButs.setSize(new Dimension(480,30));
-    wsMenuRefreshButs.add(refreshWs,null);
-    wsMenuRefreshButs.add(resetWs,null);
-    wsMenuRefreshButs.add(progressBar,null);
+    wsMenuRefreshButs.setPreferredSize(new Dimension(480, 30));
+    wsMenuRefreshButs.setSize(new Dimension(480, 30));
+    wsMenuRefreshButs.add(refreshWs, null);
+    wsMenuRefreshButs.add(resetWs, null);
+    wsMenuRefreshButs.add(progressBar, null);
     myBorderlayout.setHgap(3);
-    add(wsListPanel,BorderLayout.NORTH);
-    add(wsMenuButtons,BorderLayout.CENTER);
+    add(wsListPanel, BorderLayout.NORTH);
+    add(wsMenuButtons, BorderLayout.CENTER);
     add(wsMenuRefreshButs, BorderLayout.SOUTH);
   }
 
   protected void resetWs_actionPerformed(ActionEvent e)
   {
-    
+
   }
 
   protected void indexByType_actionPerformed(ActionEvent e)
index 7120203..6c7c211 100644 (file)
@@ -17,8 +17,8 @@
  */
 package jalview.schemabinding.version2;
 
-  //---------------------------------/
- //- Imported classes and packages -/
+//---------------------------------/
+//- Imported classes and packages -/
 //---------------------------------/
 
 import org.exolab.castor.xml.Marshaller;
@@ -29,421 +29,418 @@ import org.exolab.castor.xml.Unmarshaller;
  * 
  * @version $Revision$ $Date$
  */
-public class WebServiceParameterSet implements java.io.Serializable {
-
-
-      //--------------------------/
-     //- Class/Member Variables -/
-    //--------------------------/
-
-    /**
-     * The short name for the parameter set. This will be shown
-     * amongst the
-     *  other presets for the web service.
-     *  
-     */
-    private java.lang.String _name;
-
-    /**
-     * A Jalview Web Service Parameter Set container
-     *  version number.
-     *  Version 1 created for storing Jaba user presets.
-     *  
-     */
-    private java.lang.String _version;
-
-    /**
-     * Short description - as utf8 encoded text. This is
-     *  usually displayed
-     *  in the body of an HTML capable tooltip, so HTML tags may be
-     * embedded
-     *  using standard UTF8 encoding.
-     *  
-     */
-    private java.lang.String _description;
-
-    /**
-     * URL for which the parameter set is valid. Jalview will use
-     * it to
-     *  match up parameter sets to service instances that can parse
-     * the
-     *  parameter set payload.
-     *  
-     */
-    private java.util.Vector _serviceURLList;
-
-    /**
-     * UTF8 encoded string to be processed into a specific web
-     * services'
-     *  parameter set. Note - newlines may be important to the
-     * structure
-     *  of this file.
-     *  
-     */
-    private java.lang.String _parameters;
-
-
-      //----------------/
-     //- Constructors -/
-    //----------------/
-
-    public WebServiceParameterSet() {
-        super();
-        this._serviceURLList = new java.util.Vector();
-    }
-
-
-      //-----------/
-     //- Methods -/
-    //-----------/
-
-    /**
-     * 
-     * 
-     * @param vServiceURL
-     * @throws java.lang.IndexOutOfBoundsException if the index
-     * given is outside the bounds of the collection
-     */
-    public void addServiceURL(
-            final java.lang.String vServiceURL)
-    throws java.lang.IndexOutOfBoundsException {
-        this._serviceURLList.addElement(vServiceURL);
+public class WebServiceParameterSet implements java.io.Serializable
+{
+
+  // --------------------------/
+  // - Class/Member Variables -/
+  // --------------------------/
+
+  /**
+   * The short name for the parameter set. This will be shown amongst the other
+   * presets for the web service.
+   * 
+   */
+  private java.lang.String _name;
+
+  /**
+   * A Jalview Web Service Parameter Set container version number. Version 1
+   * created for storing Jaba user presets.
+   * 
+   */
+  private java.lang.String _version;
+
+  /**
+   * Short description - as utf8 encoded text. This is usually displayed in the
+   * body of an HTML capable tooltip, so HTML tags may be embedded using
+   * standard UTF8 encoding.
+   * 
+   */
+  private java.lang.String _description;
+
+  /**
+   * URL for which the parameter set is valid. Jalview will use it to match up
+   * parameter sets to service instances that can parse the parameter set
+   * payload.
+   * 
+   */
+  private java.util.Vector _serviceURLList;
+
+  /**
+   * UTF8 encoded string to be processed into a specific web services' parameter
+   * set. Note - newlines may be important to the structure of this file.
+   * 
+   */
+  private java.lang.String _parameters;
+
+  // ----------------/
+  // - Constructors -/
+  // ----------------/
+
+  public WebServiceParameterSet()
+  {
+    super();
+    this._serviceURLList = new java.util.Vector();
+  }
+
+  // -----------/
+  // - Methods -/
+  // -----------/
+
+  /**
+   * 
+   * 
+   * @param vServiceURL
+   * @throws java.lang.IndexOutOfBoundsException
+   *           if the index given is outside the bounds of the collection
+   */
+  public void addServiceURL(final java.lang.String vServiceURL)
+          throws java.lang.IndexOutOfBoundsException
+  {
+    this._serviceURLList.addElement(vServiceURL);
+  }
+
+  /**
+   * 
+   * 
+   * @param index
+   * @param vServiceURL
+   * @throws java.lang.IndexOutOfBoundsException
+   *           if the index given is outside the bounds of the collection
+   */
+  public void addServiceURL(final int index,
+          final java.lang.String vServiceURL)
+          throws java.lang.IndexOutOfBoundsException
+  {
+    this._serviceURLList.add(index, vServiceURL);
+  }
+
+  /**
+   * Method enumerateServiceURL.
+   * 
+   * @return an Enumeration over all java.lang.String elements
+   */
+  public java.util.Enumeration enumerateServiceURL()
+  {
+    return this._serviceURLList.elements();
+  }
+
+  /**
+   * Returns the value of field 'description'. The field 'description' has the
+   * following description: Short description - as utf8 encoded text. This is
+   * usually displayed in the body of an HTML capable tooltip, so HTML tags may
+   * be embedded using standard UTF8 encoding.
+   * 
+   * 
+   * @return the value of field 'Description'.
+   */
+  public java.lang.String getDescription()
+  {
+    return this._description;
+  }
+
+  /**
+   * Returns the value of field 'name'. The field 'name' has the following
+   * description: The short name for the parameter set. This will be shown
+   * amongst the other presets for the web service.
+   * 
+   * 
+   * @return the value of field 'Name'.
+   */
+  public java.lang.String getName()
+  {
+    return this._name;
+  }
+
+  /**
+   * Returns the value of field 'parameters'. The field 'parameters' has the
+   * following description: UTF8 encoded string to be processed into a specific
+   * web services' parameter set. Note - newlines may be important to the
+   * structure of this file.
+   * 
+   * 
+   * @return the value of field 'Parameters'.
+   */
+  public java.lang.String getParameters()
+  {
+    return this._parameters;
+  }
+
+  /**
+   * Method getServiceURL.
+   * 
+   * @param index
+   * @throws java.lang.IndexOutOfBoundsException
+   *           if the index given is outside the bounds of the collection
+   * @return the value of the java.lang.String at the given index
+   */
+  public java.lang.String getServiceURL(final int index)
+          throws java.lang.IndexOutOfBoundsException
+  {
+    // check bounds for index
+    if (index < 0 || index >= this._serviceURLList.size())
+    {
+      throw new IndexOutOfBoundsException("getServiceURL: Index value '"
+              + index + "' not in range [0.."
+              + (this._serviceURLList.size() - 1) + "]");
     }
 
-    /**
-     * 
-     * 
-     * @param index
-     * @param vServiceURL
-     * @throws java.lang.IndexOutOfBoundsException if the index
-     * given is outside the bounds of the collection
-     */
-    public void addServiceURL(
-            final int index,
-            final java.lang.String vServiceURL)
-    throws java.lang.IndexOutOfBoundsException {
-        this._serviceURLList.add(index, vServiceURL);
+    return (java.lang.String) _serviceURLList.get(index);
+  }
+
+  /**
+   * Method getServiceURL.Returns the contents of the collection in an Array.
+   * <p>
+   * Note: Just in case the collection contents are changing in another thread,
+   * we pass a 0-length Array of the correct type into the API call. This way we
+   * <i>know</i> that the Array returned is of exactly the correct length.
+   * 
+   * @return this collection as an Array
+   */
+  public java.lang.String[] getServiceURL()
+  {
+    java.lang.String[] array = new java.lang.String[0];
+    return (java.lang.String[]) this._serviceURLList.toArray(array);
+  }
+
+  /**
+   * Method getServiceURLCount.
+   * 
+   * @return the size of this collection
+   */
+  public int getServiceURLCount()
+  {
+    return this._serviceURLList.size();
+  }
+
+  /**
+   * Returns the value of field 'version'. The field 'version' has the following
+   * description: A Jalview Web Service Parameter Set container version number.
+   * Version 1 created for storing Jaba user presets.
+   * 
+   * 
+   * @return the value of field 'Version'.
+   */
+  public java.lang.String getVersion()
+  {
+    return this._version;
+  }
+
+  /**
+   * Method isValid.
+   * 
+   * @return true if this object is valid according to the schema
+   */
+  public boolean isValid()
+  {
+    try
+    {
+      validate();
+    } catch (org.exolab.castor.xml.ValidationException vex)
+    {
+      return false;
     }
-
-    /**
-     * Method enumerateServiceURL.
-     * 
-     * @return an Enumeration over all java.lang.String elements
-     */
-    public java.util.Enumeration enumerateServiceURL(
-    ) {
-        return this._serviceURLList.elements();
-    }
-
-    /**
-     * Returns the value of field 'description'. The field
-     * 'description' has the following description: Short
-     * description - as utf8 encoded text. This is
-     *  usually displayed
-     *  in the body of an HTML capable tooltip, so HTML tags may be
-     * embedded
-     *  using standard UTF8 encoding.
-     *  
-     * 
-     * @return the value of field 'Description'.
-     */
-    public java.lang.String getDescription(
-    ) {
-        return this._description;
-    }
-
-    /**
-     * Returns the value of field 'name'. The field 'name' has the
-     * following description: The short name for the parameter set.
-     * This will be shown amongst the
-     *  other presets for the web service.
-     *  
-     * 
-     * @return the value of field 'Name'.
-     */
-    public java.lang.String getName(
-    ) {
-        return this._name;
-    }
-
-    /**
-     * Returns the value of field 'parameters'. The field
-     * 'parameters' has the following description: UTF8 encoded
-     * string to be processed into a specific web services'
-     *  parameter set. Note - newlines may be important to the
-     * structure
-     *  of this file.
-     *  
-     * 
-     * @return the value of field 'Parameters'.
-     */
-    public java.lang.String getParameters(
-    ) {
-        return this._parameters;
-    }
-
-    /**
-     * Method getServiceURL.
-     * 
-     * @param index
-     * @throws java.lang.IndexOutOfBoundsException if the index
-     * given is outside the bounds of the collection
-     * @return the value of the java.lang.String at the given index
-     */
-    public java.lang.String getServiceURL(
-            final int index)
-    throws java.lang.IndexOutOfBoundsException {
-        // check bounds for index
-        if (index < 0 || index >= this._serviceURLList.size()) {
-            throw new IndexOutOfBoundsException("getServiceURL: Index value '" + index + "' not in range [0.." + (this._serviceURLList.size() - 1) + "]");
-        }
-        
-        return (java.lang.String) _serviceURLList.get(index);
-    }
-
-    /**
-     * Method getServiceURL.Returns the contents of the collection
-     * in an Array.  <p>Note:  Just in case the collection contents
-     * are changing in another thread, we pass a 0-length Array of
-     * the correct type into the API call.  This way we <i>know</i>
-     * that the Array returned is of exactly the correct length.
-     * 
-     * @return this collection as an Array
-     */
-    public java.lang.String[] getServiceURL(
-    ) {
-        java.lang.String[] array = new java.lang.String[0];
-        return (java.lang.String[]) this._serviceURLList.toArray(array);
-    }
-
-    /**
-     * Method getServiceURLCount.
-     * 
-     * @return the size of this collection
-     */
-    public int getServiceURLCount(
-    ) {
-        return this._serviceURLList.size();
-    }
-
-    /**
-     * Returns the value of field 'version'. The field 'version'
-     * has the following description: A Jalview Web Service
-     * Parameter Set container
-     *  version number.
-     *  Version 1 created for storing Jaba user presets.
-     *  
-     * 
-     * @return the value of field 'Version'.
+    return true;
+  }
+
+  /**
+   * 
+   * 
+   * @param out
+   * @throws org.exolab.castor.xml.MarshalException
+   *           if object is null or if any SAXException is thrown during
+   *           marshaling
+   * @throws org.exolab.castor.xml.ValidationException
+   *           if this object is an invalid instance according to the schema
+   */
+  public void marshal(final java.io.Writer out)
+          throws org.exolab.castor.xml.MarshalException,
+          org.exolab.castor.xml.ValidationException
+  {
+    Marshaller.marshal(this, out);
+  }
+
+  /**
+   * 
+   * 
+   * @param handler
+   * @throws java.io.IOException
+   *           if an IOException occurs during marshaling
+   * @throws org.exolab.castor.xml.ValidationException
+   *           if this object is an invalid instance according to the schema
+   * @throws org.exolab.castor.xml.MarshalException
+   *           if object is null or if any SAXException is thrown during
+   *           marshaling
+   */
+  public void marshal(final org.xml.sax.ContentHandler handler)
+          throws java.io.IOException,
+          org.exolab.castor.xml.MarshalException,
+          org.exolab.castor.xml.ValidationException
+  {
+    Marshaller.marshal(this, handler);
+  }
+
+  /**
      */
-    public java.lang.String getVersion(
-    ) {
-        return this._version;
+  public void removeAllServiceURL()
+  {
+    this._serviceURLList.clear();
+  }
+
+  /**
+   * Method removeServiceURL.
+   * 
+   * @param vServiceURL
+   * @return true if the object was removed from the collection.
+   */
+  public boolean removeServiceURL(final java.lang.String vServiceURL)
+  {
+    boolean removed = _serviceURLList.remove(vServiceURL);
+    return removed;
+  }
+
+  /**
+   * Method removeServiceURLAt.
+   * 
+   * @param index
+   * @return the element removed from the collection
+   */
+  public java.lang.String removeServiceURLAt(final int index)
+  {
+    java.lang.Object obj = this._serviceURLList.remove(index);
+    return (java.lang.String) obj;
+  }
+
+  /**
+   * Sets the value of field 'description'. The field 'description' has the
+   * following description: Short description - as utf8 encoded text. This is
+   * usually displayed in the body of an HTML capable tooltip, so HTML tags may
+   * be embedded using standard UTF8 encoding.
+   * 
+   * 
+   * @param description
+   *          the value of field 'description'.
+   */
+  public void setDescription(final java.lang.String description)
+  {
+    this._description = description;
+  }
+
+  /**
+   * Sets the value of field 'name'. The field 'name' has the following
+   * description: The short name for the parameter set. This will be shown
+   * amongst the other presets for the web service.
+   * 
+   * 
+   * @param name
+   *          the value of field 'name'.
+   */
+  public void setName(final java.lang.String name)
+  {
+    this._name = name;
+  }
+
+  /**
+   * Sets the value of field 'parameters'. The field 'parameters' has the
+   * following description: UTF8 encoded string to be processed into a specific
+   * web services' parameter set. Note - newlines may be important to the
+   * structure of this file.
+   * 
+   * 
+   * @param parameters
+   *          the value of field 'parameters'.
+   */
+  public void setParameters(final java.lang.String parameters)
+  {
+    this._parameters = parameters;
+  }
+
+  /**
+   * 
+   * 
+   * @param index
+   * @param vServiceURL
+   * @throws java.lang.IndexOutOfBoundsException
+   *           if the index given is outside the bounds of the collection
+   */
+  public void setServiceURL(final int index,
+          final java.lang.String vServiceURL)
+          throws java.lang.IndexOutOfBoundsException
+  {
+    // check bounds for index
+    if (index < 0 || index >= this._serviceURLList.size())
+    {
+      throw new IndexOutOfBoundsException("setServiceURL: Index value '"
+              + index + "' not in range [0.."
+              + (this._serviceURLList.size() - 1) + "]");
     }
 
-    /**
-     * Method isValid.
-     * 
-     * @return true if this object is valid according to the schema
-     */
-    public boolean isValid(
-    ) {
-        try {
-            validate();
-        } catch (org.exolab.castor.xml.ValidationException vex) {
-            return false;
-        }
-        return true;
-    }
-
-    /**
-     * 
-     * 
-     * @param out
-     * @throws org.exolab.castor.xml.MarshalException if object is
-     * null or if any SAXException is thrown during marshaling
-     * @throws org.exolab.castor.xml.ValidationException if this
-     * object is an invalid instance according to the schema
-     */
-    public void marshal(
-            final java.io.Writer out)
-    throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
-        Marshaller.marshal(this, out);
-    }
-
-    /**
-     * 
-     * 
-     * @param handler
-     * @throws java.io.IOException if an IOException occurs during
-     * marshaling
-     * @throws org.exolab.castor.xml.ValidationException if this
-     * object is an invalid instance according to the schema
-     * @throws org.exolab.castor.xml.MarshalException if object is
-     * null or if any SAXException is thrown during marshaling
-     */
-    public void marshal(
-            final org.xml.sax.ContentHandler handler)
-    throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
-        Marshaller.marshal(this, handler);
-    }
-
-    /**
-     */
-    public void removeAllServiceURL(
-    ) {
-        this._serviceURLList.clear();
-    }
-
-    /**
-     * Method removeServiceURL.
-     * 
-     * @param vServiceURL
-     * @return true if the object was removed from the collection.
-     */
-    public boolean removeServiceURL(
-            final java.lang.String vServiceURL) {
-        boolean removed = _serviceURLList.remove(vServiceURL);
-        return removed;
-    }
-
-    /**
-     * Method removeServiceURLAt.
-     * 
-     * @param index
-     * @return the element removed from the collection
-     */
-    public java.lang.String removeServiceURLAt(
-            final int index) {
-        java.lang.Object obj = this._serviceURLList.remove(index);
-        return (java.lang.String) obj;
-    }
-
-    /**
-     * Sets the value of field 'description'. The field
-     * 'description' has the following description: Short
-     * description - as utf8 encoded text. This is
-     *  usually displayed
-     *  in the body of an HTML capable tooltip, so HTML tags may be
-     * embedded
-     *  using standard UTF8 encoding.
-     *  
-     * 
-     * @param description the value of field 'description'.
-     */
-    public void setDescription(
-            final java.lang.String description) {
-        this._description = description;
-    }
-
-    /**
-     * Sets the value of field 'name'. The field 'name' has the
-     * following description: The short name for the parameter set.
-     * This will be shown amongst the
-     *  other presets for the web service.
-     *  
-     * 
-     * @param name the value of field 'name'.
-     */
-    public void setName(
-            final java.lang.String name) {
-        this._name = name;
-    }
-
-    /**
-     * Sets the value of field 'parameters'. The field 'parameters'
-     * has the following description: UTF8 encoded string to be
-     * processed into a specific web services'
-     *  parameter set. Note - newlines may be important to the
-     * structure
-     *  of this file.
-     *  
-     * 
-     * @param parameters the value of field 'parameters'.
-     */
-    public void setParameters(
-            final java.lang.String parameters) {
-        this._parameters = parameters;
-    }
-
-    /**
-     * 
-     * 
-     * @param index
-     * @param vServiceURL
-     * @throws java.lang.IndexOutOfBoundsException if the index
-     * given is outside the bounds of the collection
-     */
-    public void setServiceURL(
-            final int index,
-            final java.lang.String vServiceURL)
-    throws java.lang.IndexOutOfBoundsException {
-        // check bounds for index
-        if (index < 0 || index >= this._serviceURLList.size()) {
-            throw new IndexOutOfBoundsException("setServiceURL: Index value '" + index + "' not in range [0.." + (this._serviceURLList.size() - 1) + "]");
-        }
-        
-        this._serviceURLList.set(index, vServiceURL);
-    }
-
-    /**
-     * 
-     * 
-     * @param vServiceURLArray
-     */
-    public void setServiceURL(
-            final java.lang.String[] vServiceURLArray) {
-        //-- copy array
-        _serviceURLList.clear();
-        
-        for (int i = 0; i < vServiceURLArray.length; i++) {
-                this._serviceURLList.add(vServiceURLArray[i]);
-        }
-    }
-
-    /**
-     * Sets the value of field 'version'. The field 'version' has
-     * the following description: A Jalview Web Service Parameter
-     * Set container
-     *  version number.
-     *  Version 1 created for storing Jaba user presets.
-     *  
-     * 
-     * @param version the value of field 'version'.
-     */
-    public void setVersion(
-            final java.lang.String version) {
-        this._version = version;
-    }
-
-    /**
-     * Method unmarshal.
-     * 
-     * @param reader
-     * @throws org.exolab.castor.xml.MarshalException if object is
-     * null or if any SAXException is thrown during marshaling
-     * @throws org.exolab.castor.xml.ValidationException if this
-     * object is an invalid instance according to the schema
-     * @return the unmarshaled
-     * jalview.schemabinding.version2.WebServiceParameterSet
-     */
-    public static jalview.schemabinding.version2.WebServiceParameterSet unmarshal(
-            final java.io.Reader reader)
-    throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
-        return (jalview.schemabinding.version2.WebServiceParameterSet) Unmarshaller.unmarshal(jalview.schemabinding.version2.WebServiceParameterSet.class, reader);
-    }
-
-    /**
-     * 
-     * 
-     * @throws org.exolab.castor.xml.ValidationException if this
-     * object is an invalid instance according to the schema
-     */
-    public void validate(
-    )
-    throws org.exolab.castor.xml.ValidationException {
-        org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
-        validator.validate(this);
+    this._serviceURLList.set(index, vServiceURL);
+  }
+
+  /**
+   * 
+   * 
+   * @param vServiceURLArray
+   */
+  public void setServiceURL(final java.lang.String[] vServiceURLArray)
+  {
+    // -- copy array
+    _serviceURLList.clear();
+
+    for (int i = 0; i < vServiceURLArray.length; i++)
+    {
+      this._serviceURLList.add(vServiceURLArray[i]);
     }
+  }
+
+  /**
+   * Sets the value of field 'version'. The field 'version' has the following
+   * description: A Jalview Web Service Parameter Set container version number.
+   * Version 1 created for storing Jaba user presets.
+   * 
+   * 
+   * @param version
+   *          the value of field 'version'.
+   */
+  public void setVersion(final java.lang.String version)
+  {
+    this._version = version;
+  }
+
+  /**
+   * Method unmarshal.
+   * 
+   * @param reader
+   * @throws org.exolab.castor.xml.MarshalException
+   *           if object is null or if any SAXException is thrown during
+   *           marshaling
+   * @throws org.exolab.castor.xml.ValidationException
+   *           if this object is an invalid instance according to the schema
+   * @return the unmarshaled
+   *         jalview.schemabinding.version2.WebServiceParameterSet
+   */
+  public static jalview.schemabinding.version2.WebServiceParameterSet unmarshal(
+          final java.io.Reader reader)
+          throws org.exolab.castor.xml.MarshalException,
+          org.exolab.castor.xml.ValidationException
+  {
+    return (jalview.schemabinding.version2.WebServiceParameterSet) Unmarshaller
+            .unmarshal(
+                    jalview.schemabinding.version2.WebServiceParameterSet.class,
+                    reader);
+  }
+
+  /**
+   * 
+   * 
+   * @throws org.exolab.castor.xml.ValidationException
+   *           if this object is an invalid instance according to the schema
+   */
+  public void validate() throws org.exolab.castor.xml.ValidationException
+  {
+    org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
+    validator.validate(this);
+  }
 
 }
index 8f64616..5c646ca 100644 (file)
@@ -150,8 +150,7 @@ public class AlcodonFrameDescriptor extends
         try\r
         {\r
           AlcodonFrame target = (AlcodonFrame) object;\r
-          target\r
-                  .addAlcodMap((jalview.schemabinding.version2.AlcodMap) value);\r
+          target.addAlcodMap((jalview.schemabinding.version2.AlcodMap) value);\r
         } catch (java.lang.Exception ex)\r
         {\r
           throw new IllegalStateException(ex.toString());\r
index 184216e..c30ef18 100644 (file)
@@ -835,8 +835,7 @@ public class AnnotationDescriptor extends
         try\r
         {\r
           Annotation target = (Annotation) object;\r
-          target\r
-                  .addAnnotationElement((jalview.schemabinding.version2.AnnotationElement) value);\r
+          target.addAnnotationElement((jalview.schemabinding.version2.AnnotationElement) value);\r
         } catch (java.lang.Exception ex)\r
         {\r
           throw new IllegalStateException(ex.toString());\r
@@ -986,8 +985,7 @@ public class AnnotationDescriptor extends
         try\r
         {\r
           Annotation target = (Annotation) object;\r
-          target\r
-                  .setThresholdLine((jalview.schemabinding.version2.ThresholdLine) value);\r
+          target.setThresholdLine((jalview.schemabinding.version2.ThresholdLine) value);\r
         } catch (java.lang.Exception ex)\r
         {\r
           throw new IllegalStateException(ex.toString());\r
index 40de2ea..e50fc8c 100644 (file)
@@ -447,8 +447,7 @@ public class FeatureDescriptor extends
         try\r
         {\r
           Feature target = (Feature) object;\r
-          target\r
-                  .addOtherData((jalview.schemabinding.version2.OtherData) value);\r
+          target.addOtherData((jalview.schemabinding.version2.OtherData) value);\r
         } catch (java.lang.Exception ex)\r
         {\r
           throw new IllegalStateException(ex.toString());\r
index 5fc6aef..08b9aea 100644 (file)
@@ -469,9 +469,7 @@ public class JGroupDescriptor extends
             target.deleteDisplayBoxes();\r
             return;\r
           }\r
-          target\r
-                  .setDisplayBoxes(((java.lang.Boolean) value)\r
-                          .booleanValue());\r
+          target.setDisplayBoxes(((java.lang.Boolean) value).booleanValue());\r
         } catch (java.lang.Exception ex)\r
         {\r
           throw new IllegalStateException(ex.toString());\r
@@ -742,9 +740,7 @@ public class JGroupDescriptor extends
             target.deleteTextColThreshold();\r
             return;\r
           }\r
-          target\r
-                  .setTextColThreshold(((java.lang.Integer) value)\r
-                          .intValue());\r
+          target.setTextColThreshold(((java.lang.Integer) value).intValue());\r
         } catch (java.lang.Exception ex)\r
         {\r
           throw new IllegalStateException(ex.toString());\r
index 5283afe..b33eda7 100644 (file)
@@ -365,8 +365,7 @@ public class JSeqDescriptor extends
         try\r
         {\r
           JSeq target = (JSeq) object;\r
-          target\r
-                  .addFeatures((jalview.schemabinding.version2.Features) value);\r
+          target.addFeatures((jalview.schemabinding.version2.Features) value);\r
         } catch (java.lang.Exception ex)\r
         {\r
           throw new IllegalStateException(ex.toString());\r
index 0c2bf40..4480ea9 100644 (file)
@@ -192,8 +192,7 @@ public class JalviewModelDescriptor extends
         try\r
         {\r
           JalviewModel target = (JalviewModel) object;\r
-          target\r
-                  .setVamsasModel((jalview.schemabinding.version2.VamsasModel) value);\r
+          target.setVamsasModel((jalview.schemabinding.version2.VamsasModel) value);\r
         } catch (java.lang.Exception ex)\r
         {\r
           throw new IllegalStateException(ex.toString());\r
@@ -237,8 +236,7 @@ public class JalviewModelDescriptor extends
         try\r
         {\r
           JalviewModel target = (JalviewModel) object;\r
-          target\r
-                  .setJalviewModelSequence((jalview.schemabinding.version2.JalviewModelSequence) value);\r
+          target.setJalviewModelSequence((jalview.schemabinding.version2.JalviewModelSequence) value);\r
         } catch (java.lang.Exception ex)\r
         {\r
           throw new IllegalStateException(ex.toString());\r
@@ -252,8 +250,7 @@ public class JalviewModelDescriptor extends
     };\r
     desc.setHandler(handler);\r
     desc.setContainer(true);\r
-    desc\r
-            .setClassDescriptor(new jalview.schemabinding.version2.descriptors.JalviewModelSequenceDescriptor());\r
+    desc.setClassDescriptor(new jalview.schemabinding.version2.descriptors.JalviewModelSequenceDescriptor());\r
     desc.setNameSpaceURI("www.jalview.org");\r
     desc.setRequired(true);\r
     desc.setMultivalued(false);\r
index ee2e00e..4ea81bc 100644 (file)
@@ -205,8 +205,7 @@ public class JalviewModelSequenceDescriptor extends
         try\r
         {\r
           JalviewModelSequence target = (JalviewModelSequence) object;\r
-          target\r
-                  .addViewport((jalview.schemabinding.version2.Viewport) value);\r
+          target.addViewport((jalview.schemabinding.version2.Viewport) value);\r
         } catch (java.lang.Exception ex)\r
         {\r
           throw new IllegalStateException(ex.toString());\r
@@ -263,8 +262,7 @@ public class JalviewModelSequenceDescriptor extends
         try\r
         {\r
           JalviewModelSequence target = (JalviewModelSequence) object;\r
-          target\r
-                  .addUserColours((jalview.schemabinding.version2.UserColours) value);\r
+          target.addUserColours((jalview.schemabinding.version2.UserColours) value);\r
         } catch (java.lang.Exception ex)\r
         {\r
           throw new IllegalStateException(ex.toString());\r
@@ -375,8 +373,7 @@ public class JalviewModelSequenceDescriptor extends
         try\r
         {\r
           JalviewModelSequence target = (JalviewModelSequence) object;\r
-          target\r
-                  .setFeatureSettings((jalview.schemabinding.version2.FeatureSettings) value);\r
+          target.setFeatureSettings((jalview.schemabinding.version2.FeatureSettings) value);\r
         } catch (java.lang.Exception ex)\r
         {\r
           throw new IllegalStateException(ex.toString());\r
index b860d9f..858753f 100644 (file)
@@ -208,8 +208,7 @@ public class MapListTypeDescriptor extends
         try\r
         {\r
           MapListType target = (MapListType) object;\r
-          target\r
-                  .addMapListFrom((jalview.schemabinding.version2.MapListFrom) value);\r
+          target.addMapListFrom((jalview.schemabinding.version2.MapListFrom) value);\r
         } catch (java.lang.Exception ex)\r
         {\r
           throw new IllegalStateException(ex.toString());\r
@@ -265,8 +264,7 @@ public class MapListTypeDescriptor extends
         try\r
         {\r
           MapListType target = (MapListType) object;\r
-          target\r
-                  .addMapListTo((jalview.schemabinding.version2.MapListTo) value);\r
+          target.addMapListTo((jalview.schemabinding.version2.MapListTo) value);\r
         } catch (java.lang.Exception ex)\r
         {\r
           throw new IllegalStateException(ex.toString());\r
index 89488a1..92aac5e 100644 (file)
@@ -94,8 +94,7 @@ public class MappingChoiceDescriptor extends
         try\r
         {\r
           MappingChoice target = (MappingChoice) object;\r
-          target\r
-                  .setSequence((jalview.schemabinding.version2.Sequence) value);\r
+          target.setSequence((jalview.schemabinding.version2.Sequence) value);\r
         } catch (java.lang.Exception ex)\r
         {\r
           throw new IllegalStateException(ex.toString());\r
index 6dd524c..9c748cf 100644 (file)
@@ -97,8 +97,7 @@ public class MappingDescriptor extends
         try\r
         {\r
           Mapping target = (Mapping) object;\r
-          target\r
-                  .setMappingChoice((jalview.schemabinding.version2.MappingChoice) value);\r
+          target.setMappingChoice((jalview.schemabinding.version2.MappingChoice) value);\r
         } catch (java.lang.Exception ex)\r
         {\r
           throw new IllegalStateException(ex.toString());\r
@@ -112,8 +111,7 @@ public class MappingDescriptor extends
     };\r
     desc.setHandler(handler);\r
     desc.setContainer(true);\r
-    desc\r
-            .setClassDescriptor(new jalview.schemabinding.version2.descriptors.MappingChoiceDescriptor());\r
+    desc.setClassDescriptor(new jalview.schemabinding.version2.descriptors.MappingChoiceDescriptor());\r
     desc.setNameSpaceURI("www.vamsas.ac.uk/jalview/version2");\r
     desc.setMultivalued(false);\r
     addFieldDescriptor(desc);\r
index f04892b..f892f79 100644 (file)
@@ -228,8 +228,7 @@ public class PdbentryDescriptor extends
         try\r
         {\r
           Pdbentry target = (Pdbentry) object;\r
-          target\r
-                  .addPdbentryItem((jalview.schemabinding.version2.PdbentryItem) value);\r
+          target.addPdbentryItem((jalview.schemabinding.version2.PdbentryItem) value);\r
         } catch (java.lang.Exception ex)\r
         {\r
           throw new IllegalStateException(ex.toString());\r
@@ -256,8 +255,7 @@ public class PdbentryDescriptor extends
     };\r
     desc.setHandler(handler);\r
     desc.setContainer(true);\r
-    desc\r
-            .setClassDescriptor(new jalview.schemabinding.version2.descriptors.PdbentryItemDescriptor());\r
+    desc.setClassDescriptor(new jalview.schemabinding.version2.descriptors.PdbentryItemDescriptor());\r
     desc.setMultivalued(true);\r
     addFieldDescriptor(desc);\r
 \r
index c1eff63..0a043d7 100644 (file)
@@ -95,8 +95,7 @@ public class PdbentryItemDescriptor extends
         try\r
         {\r
           PdbentryItem target = (PdbentryItem) object;\r
-          target\r
-                  .addProperty((jalview.schemabinding.version2.Property) value);\r
+          target.addProperty((jalview.schemabinding.version2.Property) value);\r
         } catch (java.lang.Exception ex)\r
         {\r
           throw new IllegalStateException(ex.toString());\r
index d53e400..cf746cd 100644 (file)
@@ -97,8 +97,7 @@ public class PdbidsDescriptor extends
         try\r
         {\r
           Pdbids target = (Pdbids) object;\r
-          target\r
-                  .addStructureState((jalview.schemabinding.version2.StructureState) value);\r
+          target.addStructureState((jalview.schemabinding.version2.StructureState) value);\r
         } catch (java.lang.Exception ex)\r
         {\r
           throw new IllegalStateException(ex.toString());\r
index 2dfc594..ab0d2b8 100644 (file)
@@ -187,8 +187,7 @@ public class SequenceSetDescriptor extends
         try\r
         {\r
           SequenceSet target = (SequenceSet) object;\r
-          target\r
-                  .addSequence((jalview.schemabinding.version2.Sequence) value);\r
+          target.addSequence((jalview.schemabinding.version2.Sequence) value);\r
         } catch (java.lang.Exception ex)\r
         {\r
           throw new IllegalStateException(ex.toString());\r
@@ -244,8 +243,7 @@ public class SequenceSetDescriptor extends
         try\r
         {\r
           SequenceSet target = (SequenceSet) object;\r
-          target\r
-                  .addAnnotation((jalview.schemabinding.version2.Annotation) value);\r
+          target.addAnnotation((jalview.schemabinding.version2.Annotation) value);\r
         } catch (java.lang.Exception ex)\r
         {\r
           throw new IllegalStateException(ex.toString());\r
@@ -301,8 +299,7 @@ public class SequenceSetDescriptor extends
         try\r
         {\r
           SequenceSet target = (SequenceSet) object;\r
-          target\r
-                  .addSequenceSetProperties((jalview.schemabinding.version2.SequenceSetProperties) value);\r
+          target.addSequenceSetProperties((jalview.schemabinding.version2.SequenceSetProperties) value);\r
         } catch (java.lang.Exception ex)\r
         {\r
           throw new IllegalStateException(ex.toString());\r
@@ -358,8 +355,7 @@ public class SequenceSetDescriptor extends
         try\r
         {\r
           SequenceSet target = (SequenceSet) object;\r
-          target\r
-                  .addAlcodonFrame((jalview.schemabinding.version2.AlcodonFrame) value);\r
+          target.addAlcodonFrame((jalview.schemabinding.version2.AlcodonFrame) value);\r
         } catch (java.lang.Exception ex)\r
         {\r
           throw new IllegalStateException(ex.toString());\r
index 1d0d139..9d70d62 100644 (file)
@@ -644,9 +644,7 @@ public class TreeDescriptor extends
             target.deleteMarkUnlinked();\r
             return;\r
           }\r
-          target\r
-                  .setMarkUnlinked(((java.lang.Boolean) value)\r
-                          .booleanValue());\r
+          target.setMarkUnlinked(((java.lang.Boolean) value).booleanValue());\r
         } catch (java.lang.Exception ex)\r
         {\r
           throw new IllegalStateException(ex.toString());\r
index 11d4455..e98dffb 100644 (file)
@@ -141,8 +141,7 @@ public class UserColoursDescriptor extends
         try\r
         {\r
           UserColours target = (UserColours) object;\r
-          target\r
-                  .setUserColourScheme((jalview.schemabinding.version2.UserColourScheme) value);\r
+          target.setUserColourScheme((jalview.schemabinding.version2.UserColourScheme) value);\r
         } catch (java.lang.Exception ex)\r
         {\r
           throw new IllegalStateException(ex.toString());\r
index 3308a28..b46ab62 100644 (file)
@@ -156,8 +156,7 @@ public class VAMSASDescriptor extends
         try\r
         {\r
           VAMSAS target = (VAMSAS) object;\r
-          target\r
-                  .addSequenceSet((jalview.schemabinding.version2.SequenceSet) value);\r
+          target.addSequenceSet((jalview.schemabinding.version2.SequenceSet) value);\r
         } catch (java.lang.Exception ex)\r
         {\r
           throw new IllegalStateException(ex.toString());\r
index 41831f4..254b785 100644 (file)
@@ -2254,9 +2254,7 @@ public class ViewportDescriptor extends
             target.deleteTextColThreshold();\r
             return;\r
           }\r
-          target\r
-                  .setTextColThreshold(((java.lang.Integer) value)\r
-                          .intValue());\r
+          target.setTextColThreshold(((java.lang.Integer) value).intValue());\r
         } catch (java.lang.Exception ex)\r
         {\r
           throw new IllegalStateException(ex.toString());\r
@@ -2348,8 +2346,7 @@ public class ViewportDescriptor extends
         try\r
         {\r
           Viewport target = (Viewport) object;\r
-          target\r
-                  .setAnnotationColours((jalview.schemabinding.version2.AnnotationColours) value);\r
+          target.setAnnotationColours((jalview.schemabinding.version2.AnnotationColours) value);\r
         } catch (java.lang.Exception ex)\r
         {\r
           throw new IllegalStateException(ex.toString());\r
@@ -2391,8 +2388,7 @@ public class ViewportDescriptor extends
         try\r
         {\r
           Viewport target = (Viewport) object;\r
-          target\r
-                  .addHiddenColumns((jalview.schemabinding.version2.HiddenColumns) value);\r
+          target.addHiddenColumns((jalview.schemabinding.version2.HiddenColumns) value);\r
         } catch (java.lang.Exception ex)\r
         {\r
           throw new IllegalStateException(ex.toString());\r
index ca64e21..bf029a2 100644 (file)
@@ -17,8 +17,8 @@
  */
 package jalview.schemabinding.version2.descriptors;
 
-  //---------------------------------/
- //- Imported classes and packages -/
+//---------------------------------/
+//- Imported classes and packages -/
 //---------------------------------/
 
 import jalview.schemabinding.version2.WebServiceParameterSet;
@@ -28,337 +28,379 @@ import jalview.schemabinding.version2.WebServiceParameterSet;
  * 
  * @version $Revision$ $Date$
  */
-public class WebServiceParameterSetDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl {
-
-
-      //--------------------------/
-     //- Class/Member Variables -/
-    //--------------------------/
-
-    /**
-     * Field _elementDefinition.
-     */
-    private boolean _elementDefinition;
-
-    /**
-     * Field _nsPrefix.
-     */
-    private java.lang.String _nsPrefix;
-
-    /**
-     * Field _nsURI.
-     */
-    private java.lang.String _nsURI;
-
-    /**
-     * Field _xmlName.
-     */
-    private java.lang.String _xmlName;
-
-
-      //----------------/
-     //- Constructors -/
-    //----------------/
-
-    public WebServiceParameterSetDescriptor() {
-        super();
-        _nsURI = "www.jalview.org/xml/wsparamset";
-        _xmlName = "WebServiceParameterSet";
-        _elementDefinition = false;
-        
-        //-- set grouping compositor
-        setCompositorAsSequence();
-        org.exolab.castor.xml.util.XMLFieldDescriptorImpl  desc           = null;
-        org.exolab.castor.mapping.FieldHandler             handler        = null;
-        org.exolab.castor.xml.FieldValidator               fieldValidator = null;
-        //-- initialize attribute descriptors
-        
-        //-- _name
-        desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_name", "name", org.exolab.castor.xml.NodeType.Attribute);
-        desc.setImmutable(true);
-        handler = new org.exolab.castor.xml.XMLFieldHandler() {
-            public java.lang.Object getValue( java.lang.Object object ) 
-                throws IllegalStateException
-            {
-                WebServiceParameterSet target = (WebServiceParameterSet) object;
-                return target.getName();
-            }
-            public void setValue( java.lang.Object object, java.lang.Object value) 
-                throws IllegalStateException, IllegalArgumentException
-            {
-                try {
-                    WebServiceParameterSet target = (WebServiceParameterSet) object;
-                    target.setName( (java.lang.String) value);
-                } catch (java.lang.Exception ex) {
-                    throw new IllegalStateException(ex.toString());
-                }
-            }
-            public java.lang.Object newInstance(java.lang.Object parent) {
-                return null;
-            }
-        };
-        desc.setHandler(handler);
-        desc.setRequired(true);
-        desc.setMultivalued(false);
-        addFieldDescriptor(desc);
-        
-        //-- validation code for: _name
-        fieldValidator = new org.exolab.castor.xml.FieldValidator();
-        fieldValidator.setMinOccurs(1);
-        { //-- local scope
-            org.exolab.castor.xml.validators.StringValidator typeValidator;
-            typeValidator = new org.exolab.castor.xml.validators.StringValidator();
-            fieldValidator.setValidator(typeValidator);
-            typeValidator.setWhiteSpace("preserve");
-        }
-        desc.setValidator(fieldValidator);
-        //-- initialize element descriptors
-        
-        //-- _version
-        desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_version", "Version", org.exolab.castor.xml.NodeType.Element);
-        desc.setImmutable(true);
-        handler = new org.exolab.castor.xml.XMLFieldHandler() {
-            public java.lang.Object getValue( java.lang.Object object ) 
-                throws IllegalStateException
-            {
-                WebServiceParameterSet target = (WebServiceParameterSet) object;
-                return target.getVersion();
-            }
-            public void setValue( java.lang.Object object, java.lang.Object value) 
-                throws IllegalStateException, IllegalArgumentException
-            {
-                try {
-                    WebServiceParameterSet target = (WebServiceParameterSet) object;
-                    target.setVersion( (java.lang.String) value);
-                } catch (java.lang.Exception ex) {
-                    throw new IllegalStateException(ex.toString());
-                }
-            }
-            public java.lang.Object newInstance(java.lang.Object parent) {
-                return null;
-            }
-        };
-        desc.setHandler(handler);
-        desc.setMultivalued(false);
-        addFieldDescriptor(desc);
-        
-        //-- validation code for: _version
-        fieldValidator = new org.exolab.castor.xml.FieldValidator();
-        { //-- local scope
-            org.exolab.castor.xml.validators.StringValidator typeValidator;
-            typeValidator = new org.exolab.castor.xml.validators.StringValidator();
-            fieldValidator.setValidator(typeValidator);
-            typeValidator.setWhiteSpace("preserve");
-        }
-        desc.setValidator(fieldValidator);
-        //-- _description
-        desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_description", "description", org.exolab.castor.xml.NodeType.Element);
-        desc.setImmutable(true);
-        handler = new org.exolab.castor.xml.XMLFieldHandler() {
-            public java.lang.Object getValue( java.lang.Object object ) 
-                throws IllegalStateException
-            {
-                WebServiceParameterSet target = (WebServiceParameterSet) object;
-                return target.getDescription();
-            }
-            public void setValue( java.lang.Object object, java.lang.Object value) 
-                throws IllegalStateException, IllegalArgumentException
-            {
-                try {
-                    WebServiceParameterSet target = (WebServiceParameterSet) object;
-                    target.setDescription( (java.lang.String) value);
-                } catch (java.lang.Exception ex) {
-                    throw new IllegalStateException(ex.toString());
-                }
-            }
-            public java.lang.Object newInstance(java.lang.Object parent) {
-                return null;
-            }
-        };
-        desc.setHandler(handler);
-        desc.setMultivalued(false);
-        addFieldDescriptor(desc);
-        
-        //-- validation code for: _description
-        fieldValidator = new org.exolab.castor.xml.FieldValidator();
-        { //-- local scope
-            org.exolab.castor.xml.validators.StringValidator typeValidator;
-            typeValidator = new org.exolab.castor.xml.validators.StringValidator();
-            fieldValidator.setValidator(typeValidator);
-            typeValidator.setWhiteSpace("preserve");
-        }
-        desc.setValidator(fieldValidator);
-        //-- _serviceURLList
-        desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_serviceURLList", "serviceURL", org.exolab.castor.xml.NodeType.Element);
-        handler = new org.exolab.castor.xml.XMLFieldHandler() {
-            public java.lang.Object getValue( java.lang.Object object ) 
-                throws IllegalStateException
-            {
-                WebServiceParameterSet target = (WebServiceParameterSet) object;
-                return target.getServiceURL();
-            }
-            public void setValue( java.lang.Object object, java.lang.Object value) 
-                throws IllegalStateException, IllegalArgumentException
-            {
-                try {
-                    WebServiceParameterSet target = (WebServiceParameterSet) object;
-                    target.addServiceURL( (java.lang.String) value);
-                } catch (java.lang.Exception ex) {
-                    throw new IllegalStateException(ex.toString());
-                }
-            }
-            public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException {
-                try {
-                    WebServiceParameterSet target = (WebServiceParameterSet) object;
-                    target.removeAllServiceURL();
-                } catch (java.lang.Exception ex) {
-                    throw new IllegalStateException(ex.toString());
-                }
-            }
-            public java.lang.Object newInstance(java.lang.Object parent) {
-                return new java.lang.String();
-            }
-        };
-        desc.setHandler(handler);
-        desc.setRequired(true);
-        desc.setMultivalued(true);
-        addFieldDescriptor(desc);
-        
-        //-- validation code for: _serviceURLList
-        fieldValidator = new org.exolab.castor.xml.FieldValidator();
-        fieldValidator.setMinOccurs(1);
-        { //-- local scope
-        }
-        desc.setValidator(fieldValidator);
-        //-- _parameters
-        desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_parameters", "parameters", org.exolab.castor.xml.NodeType.Element);
-        desc.setImmutable(true);
-        handler = new org.exolab.castor.xml.XMLFieldHandler() {
-            public java.lang.Object getValue( java.lang.Object object ) 
-                throws IllegalStateException
-            {
-                WebServiceParameterSet target = (WebServiceParameterSet) object;
-                return target.getParameters();
-            }
-            public void setValue( java.lang.Object object, java.lang.Object value) 
-                throws IllegalStateException, IllegalArgumentException
-            {
-                try {
-                    WebServiceParameterSet target = (WebServiceParameterSet) object;
-                    target.setParameters( (java.lang.String) value);
-                } catch (java.lang.Exception ex) {
-                    throw new IllegalStateException(ex.toString());
-                }
-            }
-            public java.lang.Object newInstance(java.lang.Object parent) {
-                return null;
-            }
-        };
-        desc.setHandler(handler);
-        desc.setRequired(true);
-        desc.setMultivalued(false);
-        addFieldDescriptor(desc);
-        
-        //-- validation code for: _parameters
-        fieldValidator = new org.exolab.castor.xml.FieldValidator();
-        fieldValidator.setMinOccurs(1);
-        { //-- local scope
-            org.exolab.castor.xml.validators.StringValidator typeValidator;
-            typeValidator = new org.exolab.castor.xml.validators.StringValidator();
-            fieldValidator.setValidator(typeValidator);
-            typeValidator.setWhiteSpace("preserve");
+public class WebServiceParameterSetDescriptor extends
+        org.exolab.castor.xml.util.XMLClassDescriptorImpl
+{
+
+  // --------------------------/
+  // - Class/Member Variables -/
+  // --------------------------/
+
+  /**
+   * Field _elementDefinition.
+   */
+  private boolean _elementDefinition;
+
+  /**
+   * Field _nsPrefix.
+   */
+  private java.lang.String _nsPrefix;
+
+  /**
+   * Field _nsURI.
+   */
+  private java.lang.String _nsURI;
+
+  /**
+   * Field _xmlName.
+   */
+  private java.lang.String _xmlName;
+
+  // ----------------/
+  // - Constructors -/
+  // ----------------/
+
+  public WebServiceParameterSetDescriptor()
+  {
+    super();
+    _nsURI = "www.jalview.org/xml/wsparamset";
+    _xmlName = "WebServiceParameterSet";
+    _elementDefinition = false;
+
+    // -- set grouping compositor
+    setCompositorAsSequence();
+    org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null;
+    org.exolab.castor.mapping.FieldHandler handler = null;
+    org.exolab.castor.xml.FieldValidator fieldValidator = null;
+    // -- initialize attribute descriptors
+
+    // -- _name
+    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
+            java.lang.String.class, "_name", "name",
+            org.exolab.castor.xml.NodeType.Attribute);
+    desc.setImmutable(true);
+    handler = new org.exolab.castor.xml.XMLFieldHandler()
+    {
+      public java.lang.Object getValue(java.lang.Object object)
+              throws IllegalStateException
+      {
+        WebServiceParameterSet target = (WebServiceParameterSet) object;
+        return target.getName();
+      }
+
+      public void setValue(java.lang.Object object, java.lang.Object value)
+              throws IllegalStateException, IllegalArgumentException
+      {
+        try
+        {
+          WebServiceParameterSet target = (WebServiceParameterSet) object;
+          target.setName((java.lang.String) value);
+        } catch (java.lang.Exception ex)
+        {
+          throw new IllegalStateException(ex.toString());
         }
-        desc.setValidator(fieldValidator);
+      }
+
+      public java.lang.Object newInstance(java.lang.Object parent)
+      {
+        return null;
+      }
+    };
+    desc.setHandler(handler);
+    desc.setRequired(true);
+    desc.setMultivalued(false);
+    addFieldDescriptor(desc);
+
+    // -- validation code for: _name
+    fieldValidator = new org.exolab.castor.xml.FieldValidator();
+    fieldValidator.setMinOccurs(1);
+    { // -- local scope
+      org.exolab.castor.xml.validators.StringValidator typeValidator;
+      typeValidator = new org.exolab.castor.xml.validators.StringValidator();
+      fieldValidator.setValidator(typeValidator);
+      typeValidator.setWhiteSpace("preserve");
     }
+    desc.setValidator(fieldValidator);
+    // -- initialize element descriptors
 
+    // -- _version
+    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
+            java.lang.String.class, "_version", "Version",
+            org.exolab.castor.xml.NodeType.Element);
+    desc.setImmutable(true);
+    handler = new org.exolab.castor.xml.XMLFieldHandler()
+    {
+      public java.lang.Object getValue(java.lang.Object object)
+              throws IllegalStateException
+      {
+        WebServiceParameterSet target = (WebServiceParameterSet) object;
+        return target.getVersion();
+      }
 
-      //-----------/
-     //- Methods -/
-    //-----------/
+      public void setValue(java.lang.Object object, java.lang.Object value)
+              throws IllegalStateException, IllegalArgumentException
+      {
+        try
+        {
+          WebServiceParameterSet target = (WebServiceParameterSet) object;
+          target.setVersion((java.lang.String) value);
+        } catch (java.lang.Exception ex)
+        {
+          throw new IllegalStateException(ex.toString());
+        }
+      }
 
-    /**
-     * Method getAccessMode.
-     * 
-     * @return the access mode specified for this class.
-     */
-    public org.exolab.castor.mapping.AccessMode getAccessMode(
-    ) {
+      public java.lang.Object newInstance(java.lang.Object parent)
+      {
         return null;
-    }
+      }
+    };
+    desc.setHandler(handler);
+    desc.setMultivalued(false);
+    addFieldDescriptor(desc);
 
-    /**
-     * Method getIdentity.
-     * 
-     * @return the identity field, null if this class has no
-     * identity.
-     */
-    public org.exolab.castor.mapping.FieldDescriptor getIdentity(
-    ) {
-        return super.getIdentity();
+    // -- validation code for: _version
+    fieldValidator = new org.exolab.castor.xml.FieldValidator();
+    { // -- local scope
+      org.exolab.castor.xml.validators.StringValidator typeValidator;
+      typeValidator = new org.exolab.castor.xml.validators.StringValidator();
+      fieldValidator.setValidator(typeValidator);
+      typeValidator.setWhiteSpace("preserve");
     }
+    desc.setValidator(fieldValidator);
+    // -- _description
+    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
+            java.lang.String.class, "_description", "description",
+            org.exolab.castor.xml.NodeType.Element);
+    desc.setImmutable(true);
+    handler = new org.exolab.castor.xml.XMLFieldHandler()
+    {
+      public java.lang.Object getValue(java.lang.Object object)
+              throws IllegalStateException
+      {
+        WebServiceParameterSet target = (WebServiceParameterSet) object;
+        return target.getDescription();
+      }
 
-    /**
-     * Method getJavaClass.
-     * 
-     * @return the Java class represented by this descriptor.
-     */
-    public java.lang.Class getJavaClass(
-    ) {
-        return jalview.schemabinding.version2.WebServiceParameterSet.class;
-    }
+      public void setValue(java.lang.Object object, java.lang.Object value)
+              throws IllegalStateException, IllegalArgumentException
+      {
+        try
+        {
+          WebServiceParameterSet target = (WebServiceParameterSet) object;
+          target.setDescription((java.lang.String) value);
+        } catch (java.lang.Exception ex)
+        {
+          throw new IllegalStateException(ex.toString());
+        }
+      }
 
-    /**
-     * Method getNameSpacePrefix.
-     * 
-     * @return the namespace prefix to use when marshaling as XML.
-     */
-    public java.lang.String getNameSpacePrefix(
-    ) {
-        return _nsPrefix;
-    }
+      public java.lang.Object newInstance(java.lang.Object parent)
+      {
+        return null;
+      }
+    };
+    desc.setHandler(handler);
+    desc.setMultivalued(false);
+    addFieldDescriptor(desc);
 
-    /**
-     * Method getNameSpaceURI.
-     * 
-     * @return the namespace URI used when marshaling and
-     * unmarshaling as XML.
-     */
-    public java.lang.String getNameSpaceURI(
-    ) {
-        return _nsURI;
+    // -- validation code for: _description
+    fieldValidator = new org.exolab.castor.xml.FieldValidator();
+    { // -- local scope
+      org.exolab.castor.xml.validators.StringValidator typeValidator;
+      typeValidator = new org.exolab.castor.xml.validators.StringValidator();
+      fieldValidator.setValidator(typeValidator);
+      typeValidator.setWhiteSpace("preserve");
     }
+    desc.setValidator(fieldValidator);
+    // -- _serviceURLList
+    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
+            java.lang.String.class, "_serviceURLList", "serviceURL",
+            org.exolab.castor.xml.NodeType.Element);
+    handler = new org.exolab.castor.xml.XMLFieldHandler()
+    {
+      public java.lang.Object getValue(java.lang.Object object)
+              throws IllegalStateException
+      {
+        WebServiceParameterSet target = (WebServiceParameterSet) object;
+        return target.getServiceURL();
+      }
 
-    /**
-     * Method getValidator.
-     * 
-     * @return a specific validator for the class described by this
-     * ClassDescriptor.
-     */
-    public org.exolab.castor.xml.TypeValidator getValidator(
-    ) {
-        return this;
-    }
+      public void setValue(java.lang.Object object, java.lang.Object value)
+              throws IllegalStateException, IllegalArgumentException
+      {
+        try
+        {
+          WebServiceParameterSet target = (WebServiceParameterSet) object;
+          target.addServiceURL((java.lang.String) value);
+        } catch (java.lang.Exception ex)
+        {
+          throw new IllegalStateException(ex.toString());
+        }
+      }
 
-    /**
-     * Method getXMLName.
-     * 
-     * @return the XML Name for the Class being described.
-     */
-    public java.lang.String getXMLName(
-    ) {
-        return _xmlName;
+      public void resetValue(Object object) throws IllegalStateException,
+              IllegalArgumentException
+      {
+        try
+        {
+          WebServiceParameterSet target = (WebServiceParameterSet) object;
+          target.removeAllServiceURL();
+        } catch (java.lang.Exception ex)
+        {
+          throw new IllegalStateException(ex.toString());
+        }
+      }
+
+      public java.lang.Object newInstance(java.lang.Object parent)
+      {
+        return new java.lang.String();
+      }
+    };
+    desc.setHandler(handler);
+    desc.setRequired(true);
+    desc.setMultivalued(true);
+    addFieldDescriptor(desc);
+
+    // -- validation code for: _serviceURLList
+    fieldValidator = new org.exolab.castor.xml.FieldValidator();
+    fieldValidator.setMinOccurs(1);
+    { // -- local scope
     }
+    desc.setValidator(fieldValidator);
+    // -- _parameters
+    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
+            java.lang.String.class, "_parameters", "parameters",
+            org.exolab.castor.xml.NodeType.Element);
+    desc.setImmutable(true);
+    handler = new org.exolab.castor.xml.XMLFieldHandler()
+    {
+      public java.lang.Object getValue(java.lang.Object object)
+              throws IllegalStateException
+      {
+        WebServiceParameterSet target = (WebServiceParameterSet) object;
+        return target.getParameters();
+      }
 
-    /**
-     * Method isElementDefinition.
-     * 
-     * @return true if XML schema definition of this Class is that
-     * of a global
-     * element or element with anonymous type definition.
-     */
-    public boolean isElementDefinition(
-    ) {
-        return _elementDefinition;
+      public void setValue(java.lang.Object object, java.lang.Object value)
+              throws IllegalStateException, IllegalArgumentException
+      {
+        try
+        {
+          WebServiceParameterSet target = (WebServiceParameterSet) object;
+          target.setParameters((java.lang.String) value);
+        } catch (java.lang.Exception ex)
+        {
+          throw new IllegalStateException(ex.toString());
+        }
+      }
+
+      public java.lang.Object newInstance(java.lang.Object parent)
+      {
+        return null;
+      }
+    };
+    desc.setHandler(handler);
+    desc.setRequired(true);
+    desc.setMultivalued(false);
+    addFieldDescriptor(desc);
+
+    // -- validation code for: _parameters
+    fieldValidator = new org.exolab.castor.xml.FieldValidator();
+    fieldValidator.setMinOccurs(1);
+    { // -- local scope
+      org.exolab.castor.xml.validators.StringValidator typeValidator;
+      typeValidator = new org.exolab.castor.xml.validators.StringValidator();
+      fieldValidator.setValidator(typeValidator);
+      typeValidator.setWhiteSpace("preserve");
     }
+    desc.setValidator(fieldValidator);
+  }
+
+  // -----------/
+  // - Methods -/
+  // -----------/
+
+  /**
+   * Method getAccessMode.
+   * 
+   * @return the access mode specified for this class.
+   */
+  public org.exolab.castor.mapping.AccessMode getAccessMode()
+  {
+    return null;
+  }
+
+  /**
+   * Method getIdentity.
+   * 
+   * @return the identity field, null if this class has no identity.
+   */
+  public org.exolab.castor.mapping.FieldDescriptor getIdentity()
+  {
+    return super.getIdentity();
+  }
+
+  /**
+   * Method getJavaClass.
+   * 
+   * @return the Java class represented by this descriptor.
+   */
+  public java.lang.Class getJavaClass()
+  {
+    return jalview.schemabinding.version2.WebServiceParameterSet.class;
+  }
+
+  /**
+   * Method getNameSpacePrefix.
+   * 
+   * @return the namespace prefix to use when marshaling as XML.
+   */
+  public java.lang.String getNameSpacePrefix()
+  {
+    return _nsPrefix;
+  }
+
+  /**
+   * Method getNameSpaceURI.
+   * 
+   * @return the namespace URI used when marshaling and unmarshaling as XML.
+   */
+  public java.lang.String getNameSpaceURI()
+  {
+    return _nsURI;
+  }
+
+  /**
+   * Method getValidator.
+   * 
+   * @return a specific validator for the class described by this
+   *         ClassDescriptor.
+   */
+  public org.exolab.castor.xml.TypeValidator getValidator()
+  {
+    return this;
+  }
+
+  /**
+   * Method getXMLName.
+   * 
+   * @return the XML Name for the Class being described.
+   */
+  public java.lang.String getXMLName()
+  {
+    return _xmlName;
+  }
+
+  /**
+   * Method isElementDefinition.
+   * 
+   * @return true if XML schema definition of this Class is that of a global
+   *         element or element with anonymous type definition.
+   */
+  public boolean isElementDefinition()
+  {
+    return _elementDefinition;
+  }
 
 }
index 3459690..8822567 100755 (executable)
@@ -51,9 +51,7 @@ public class ClustalxColourScheme extends ResidueColourScheme // implements
     colhash.put("ORANGE", new Color((float) 0.9, (float) 0.6, (float) 0.3));
     colhash.put("CYAN", new Color((float) 0.1, (float) 0.7, (float) 0.7));
     colhash.put("PINK", new Color((float) 0.9, (float) 0.5, (float) 0.5));
-    colhash
-            .put("MAGENTA",
-                    new Color((float) 0.8, (float) 0.3, (float) 0.8));
+    colhash.put("MAGENTA", new Color((float) 0.8, (float) 0.3, (float) 0.8));
     colhash.put("YELLOW", new Color((float) 0.8, (float) 0.8, (float) 0.0));
   }
 
@@ -216,7 +214,7 @@ public class ClustalxColourScheme extends ResidueColourScheme // implements
     tmp6[0] = conses[3]; // -
     tmp6[1] = conses[29]; // D
     tmp6[2] = conses[10]; // E
-    tmp6[3] = conses[6]; //  QE
+    tmp6[3] = conses[6]; // QE
     tmp6[4] = conses[19]; // Q
     tmp6[5] = conses[2]; // DE
     colours[5] = new ConsensusColour((Color) colhash.get("MAGENTA"), tmp6);
index 67211cd..9115681 100755 (executable)
@@ -540,7 +540,7 @@ public class ResidueProperties
 
   public static final Color[] pidColours =
   { midBlue, new Color(153, 153, 255),
-  // Color.lightGray,
+      // Color.lightGray,
       new Color(204, 204, 255), };
 
   public static final float[] pidThresholds =
index 63aea1e..14f23a9 100644 (file)
@@ -118,7 +118,7 @@ public class AWTConsole extends WindowAdapter implements WindowListener,
 
     // testing part
     // you may omit this part for your application
-    // 
+    //
     System.out.println("Hello World 2");
     System.out.println("All fonts available to Graphic2D:\n");
     GraphicsEnvironment ge = GraphicsEnvironment
index d7d5835..b772305 100755 (executable)
@@ -303,8 +303,8 @@ public class DBRefUtils
             if ((refb.getMap().getMap() == null && refa.getMap().getMap() == null)
                     || (refb.getMap().getMap() != null
                             && refa.getMap().getMap() != null && refb
-                            .getMap().getMap().getInverse().equals(
-                                    refa.getMap().getMap())))
+                            .getMap().getMap().getInverse()
+                            .equals(refa.getMap().getMap())))
             {
               return true;
             }
index c6348b2..97a97ac 100755 (executable)
@@ -205,66 +205,63 @@ public class Format
     }
   }
 
-/**
+  /**
    * Formats the number following printf conventions. Main limitation: Can only
    * handle one format parameter at a time Use multiple Format objects to format
    * more than one number
    * 
    * @param s
-   *                the format string following printf conventions The string
-   *                has a prefix, a format code and a suffix. The prefix and
-   *                suffix become part of the formatted output. The format code
-   *                directs the formatting of the (single) parameter to be
-   *                formatted. The code has the following structure
-   *                <ul>
-   *                <li> a % (required)
-   *                <li> a modifier (optional)
-   *                <dl>
-   *                <dt> +
-   *                <dd> forces display of + for positive numbers
-   *                <dt> 0
-   *                <dd> show leading zeroes
-   *                <dt> -
-   *                <dd> align left in the field
-   *                <dt> space
-   *                <dd> prepend a space in front of positive numbers
-   *                <dt> #
-   *                <dd> use "alternate" format. Add 0 or 0x for octal or
-   *                hexadecimal numbers. Don't suppress trailing zeroes in
-   *                general floating point format.
-   *                </dl>
-   *                <li> an integer denoting field width (optional)
-   *                <li> a period followed by an integer denoting precision
-   *                (optional)
-   *                <li> a format descriptor (required)
-   *                <dl>
-   *                <dt>f
-   *                <dd> floating point number in fixed format
-   *                <dt>e, E
-   *                <dd> floating point number in exponential notation
-   *                (scientific format). The E format results in an uppercase E
-   *                for the exponent (1.14130E+003), the e format in a lowercase
-   *                e.
-   *                <dt>g, G
-   *                <dd> floating point number in general format (fixed format
-   *                for small numbers, exponential format for large numbers).
-   *                Trailing zeroes are suppressed. The G format results in an
-   *                uppercase E for the exponent (if any), the g format in a
-   *                lowercase e.
-   *                <dt>d, i
-   *                <dd> integer in decimal
-   *                <dt>x
-   *                <dd> integer in hexadecimal
-   *                <dt>o
-   *                <dd> integer in octal
-   *                <dt>s
-   *                <dd> string
-   *                <dt>c
-   *                <dd> character
-   *                </dl>
-   *                </ul>
+   *          the format string following printf conventions The string has a
+   *          prefix, a format code and a suffix. The prefix and suffix become
+   *          part of the formatted output. The format code directs the
+   *          formatting of the (single) parameter to be formatted. The code has
+   *          the following structure
+   *          <ul>
+   *          <li>a % (required)
+   *          <li>a modifier (optional)
+   *          <dl>
+   *          <dt>+
+   *          <dd>forces display of + for positive numbers
+   *          <dt>0
+   *          <dd>show leading zeroes
+   *          <dt>-
+   *          <dd>align left in the field
+   *          <dt>space
+   *          <dd>prepend a space in front of positive numbers
+   *          <dt>#
+   *          <dd>use "alternate" format. Add 0 or 0x for octal or hexadecimal
+   *          numbers. Don't suppress trailing zeroes in general floating point
+   *          format.
+   *          </dl>
+   *          <li>an integer denoting field width (optional)
+   *          <li>a period followed by an integer denoting precision (optional)
+   *          <li>a format descriptor (required)
+   *          <dl>
+   *          <dt>f
+   *          <dd>floating point number in fixed format
+   *          <dt>e, E
+   *          <dd>floating point number in exponential notation (scientific
+   *          format). The E format results in an uppercase E for the exponent
+   *          (1.14130E+003), the e format in a lowercase e.
+   *          <dt>g, G
+   *          <dd>floating point number in general format (fixed format for
+   *          small numbers, exponential format for large numbers). Trailing
+   *          zeroes are suppressed. The G format results in an uppercase E for
+   *          the exponent (if any), the g format in a lowercase e.
+   *          <dt>d, i
+   *          <dd>integer in decimal
+   *          <dt>x
+   *          <dd>integer in hexadecimal
+   *          <dt>o
+   *          <dd>integer in octal
+   *          <dt>s
+   *          <dd>string
+   *          <dt>c
+   *          <dd>character
+   *          </dl>
+   *          </ul>
    * @exception IllegalArgumentException
-   *                    if bad format
+   *              if bad format
    * 
    */
   public static String getHexString(java.awt.Color color)
index 53384ba..01632c9 100755 (executable)
@@ -169,17 +169,17 @@ public class ImageMaker
 
   JalviewFileChooser getPNGChooser()
   {
-    return new jalview.io.JalviewFileChooser(jalview.bin.Cache
-            .getProperty("LAST_DIRECTORY"), new String[]
-    { "png" }, new String[]
-    { "Portable network graphics" }, "Portable network graphics");
+    return new jalview.io.JalviewFileChooser(
+            jalview.bin.Cache.getProperty("LAST_DIRECTORY"), new String[]
+            { "png" }, new String[]
+            { "Portable network graphics" }, "Portable network graphics");
   }
 
   JalviewFileChooser getEPSChooser()
   {
-    return new jalview.io.JalviewFileChooser(jalview.bin.Cache
-            .getProperty("LAST_DIRECTORY"), new String[]
-    { "eps" }, new String[]
-    { "Encapsulated Postscript" }, "Encapsulated Postscript");
+    return new jalview.io.JalviewFileChooser(
+            jalview.bin.Cache.getProperty("LAST_DIRECTORY"), new String[]
+            { "eps" }, new String[]
+            { "Encapsulated Postscript" }, "Encapsulated Postscript");
   }
 }
index bf6a7e7..495fb21 100755 (executable)
@@ -576,9 +576,7 @@ public class TableSorter extends AbstractTableModel
         JLabel l = (JLabel) c;\r
         l.setHorizontalTextPosition(JLabel.LEFT);\r
         int modelColumn = table.convertColumnIndexToModel(column);\r
-        l\r
-                .setIcon(getHeaderRendererIcon(modelColumn, l.getFont()\r
-                        .getSize()));\r
+        l.setIcon(getHeaderRendererIcon(modelColumn, l.getFont().getSize()));\r
       }\r
       return c;\r
     }\r
index 11556b2..a40d27a 100644 (file)
@@ -34,47 +34,57 @@ public abstract class AWSThread extends Thread
    * view that this job was associated with
    */
   protected AlignmentI currentView = null;
+
   /**
    * feature settings from view that job was associated with
    */
   protected FeatureRendererSettings featureSettings = null;
+
   /**
    * metadata about this web service
    */
   protected WebserviceInfo wsInfo = null;
+
   /**
    * original input data for this job
    */
   protected AlignmentView input = null;
+
   /**
    * dataset sequence relationships to be propagated onto new results
    */
   protected AlignedCodonFrame[] codonframe = null;
+
   /**
    * are there jobs still running in this thread.
    */
   protected boolean jobComplete = false;
+
   /**
    * one or more jobs being managed by this thread.
    */
   protected AWsJob jobs[] = null;
+
   /**
    * full name of service
    */
   protected String WebServiceName = null;
+
   protected char defGapChar = '-';
+
   /**
    * header prepended to all output from job
    */
   protected String OutputHeader;
 
   /**
-   * only used when reporting a web service out of memory error - the job ID will be concatenated to the URL
+   * only used when reporting a web service out of memory error - the job ID
+   * will be concatenated to the URL
    */
   protected String WsUrl = null;
 
   /**
-   * generic web service job/subjob poll loop 
+   * generic web service job/subjob poll loop
    */
   public void run()
   {
@@ -202,7 +212,6 @@ public abstract class AWSThread extends Thread
     }
   }
 
-
   public AWSThread()
   {
     super();
@@ -264,8 +273,8 @@ public abstract class AWSThread extends Thread
   /**
    * helper function to conserve dataset references to sequence objects returned
    * from web services 1. Propagates AlCodonFrame data from
-   * <code>codonframe</code> to <code>al</code>
-   * TODO: refactor to datamodel
+   * <code>codonframe</code> to <code>al</code> TODO: refactor to datamodel
+   * 
    * @param al
    */
   public void propagateDatasetMappings(Alignment al)
index 17d361b..e653539 100644 (file)
@@ -29,7 +29,8 @@ public abstract class AWsJob
   protected String jobId;
 
   /**
-   * @param jobId the jobId to set
+   * @param jobId
+   *          the jobId to set
    */
   public void setJobId(String jobId)
   {
@@ -47,7 +48,8 @@ public abstract class AWsJob
   int allowedServerExceptions = 3;
 
   /**
-   * @param allowedServerExceptions the allowedServerExceptions to set
+   * @param allowedServerExceptions
+   *          the allowedServerExceptions to set
    */
   public void setAllowedServerExceptions(int allowedServerExceptions)
   {
@@ -61,7 +63,8 @@ public abstract class AWsJob
   protected boolean submitted = false;
 
   /**
-   * @param jobnum the jobnum to set
+   * @param jobnum
+   *          the jobnum to set
    */
   public void setJobnum(int jobnum)
   {
@@ -69,7 +72,8 @@ public abstract class AWsJob
   }
 
   /**
-   * @param submitted the submitted to set
+   * @param submitted
+   *          the submitted to set
    */
   public void setSubmitted(boolean submitted)
   {
@@ -77,7 +81,8 @@ public abstract class AWsJob
   }
 
   /**
-   * @param subjobComplete the subjobComplete to set
+   * @param subjobComplete
+   *          the subjobComplete to set
    */
   public void setSubjobComplete(boolean subjobComplete)
   {
@@ -203,14 +208,19 @@ public abstract class AWsJob
   abstract public String getStatus();
 
   abstract public boolean hasResponse();
+
   abstract public void clearResponse();
+
   abstract public String getState();
+
   /**
    * generates response using the abstract service flags.
-   * @return a standard state response 
+   * 
+   * @return a standard state response
    */
-  protected String _defaultState() {
-    
+  protected String _defaultState()
+  {
+
     String state = "";
     return state;
   }
index ad8c0f0..c1fe276 100644 (file)
@@ -126,8 +126,8 @@ public class DBRefFetcher implements Runnable
       String[] defdb = null, otherdb = sfetcher\r
               .getDbInstances(jalview.ws.dbsources.DasSequenceSource.class);\r
       Vector selsources = new Vector(), dasselsrc = (af.featureSettings != null) ? af.featureSettings\r
-              .getSelectedSources()\r
-              : new jalview.gui.DasSourceBrowser().getSelectedSources();\r
+              .getSelectedSources() : new jalview.gui.DasSourceBrowser()\r
+              .getSelectedSources();\r
       Enumeration en = dasselsrc.elements();\r
       while (en.hasMoreElements())\r
       {\r
@@ -193,9 +193,7 @@ public class DBRefFetcher implements Runnable
     {\r
       String[] newsrc = new String[dbSources.length + otherdb.length];\r
       System.arraycopy(dbSources, 0, newsrc, 0, dbSources.length);\r
-      System\r
-              .arraycopy(otherdb, 0, newsrc, dbSources.length,\r
-                      otherdb.length);\r
+      System.arraycopy(otherdb, 0, newsrc, dbSources.length, otherdb.length);\r
       dbSources = newsrc;\r
     }\r
   }\r
@@ -387,9 +385,7 @@ public class DBRefFetcher implements Runnable
               for (int j = 0; j < uprefs.length; j++)\r
               {\r
                 addSeqId(sequence, uprefs[j].getAccessionId());\r
-                queries\r
-                        .addElement(uprefs[j].getAccessionId()\r
-                                .toUpperCase());\r
+                queries.addElement(uprefs[j].getAccessionId().toUpperCase());\r
               }\r
             }\r
             else\r
@@ -407,8 +403,9 @@ public class DBRefFetcher implements Runnable
                   try\r
                   {\r
                     presp = picrClient\r
-                            .getUPIForAccession(token, null, picrClient\r
-                                    .getMappedDatabaseNames(), null, true);\r
+                            .getUPIForAccession(token, null,\r
+                                    picrClient.getMappedDatabaseNames(),\r
+                                    null, true);\r
                   } catch (Exception e)\r
                   {\r
                     System.err.println("Exception with Picr for '" + token\r
@@ -447,11 +444,10 @@ public class DBRefFetcher implements Runnable
     } // all databases have been queries.\r
     if (sbuffer.length() > 0)\r
     {\r
-      output\r
-              .setText("Your sequences have been verified against known sequence databases. Some of the ids have been\n"\r
-                      + "altered, most likely the start/end residue will have been updated.\n"\r
-                      + "Save your alignment to maintain the updated id.\n\n"\r
-                      + sbuffer.toString());\r
+      output.setText("Your sequences have been verified against known sequence databases. Some of the ids have been\n"\r
+              + "altered, most likely the start/end residue will have been updated.\n"\r
+              + "Save your alignment to maintain the updated id.\n\n"\r
+              + sbuffer.toString());\r
       Desktop.addInternalFrame(output, "Sequence names updated ", 600, 300);\r
       // The above is the dataset, we must now find out the index\r
       // of the viewed sequence\r
@@ -496,9 +492,9 @@ public class DBRefFetcher implements Runnable
       // taking into account all accessionIds and names in the file\r
       Vector sequenceMatches = new Vector();\r
       // look for corresponding accession ids\r
-      DBRefEntry[] entryRefs = jalview.util.DBRefUtils.selectRefs(entry\r
-              .getDBRef(), new String[]\r
-      { dbSource });\r
+      DBRefEntry[] entryRefs = jalview.util.DBRefUtils.selectRefs(\r
+              entry.getDBRef(), new String[]\r
+              { dbSource });\r
       if (entryRefs == null)\r
       {\r
         System.err\r
index ab02baf..4262f7e 100644 (file)
@@ -240,8 +240,7 @@ public class DasSequenceFeatureFetcher
         }\r
       } catch (Exception ex)\r
       {\r
-        debug(\r
-                "Exception whilst setting default feature sources from registry and local preferences.",\r
+        debug("Exception whilst setting default feature sources from registry and local preferences.",\r
                 ex);\r
       }\r
     }\r
@@ -511,8 +510,8 @@ public class DasSequenceFeatureFetcher
           for (int i = 0; i < features.length; i++)\r
           {\r
             // standard DAS feature-> jalview sequence feature transformation\r
-            SequenceFeature f = newSequenceFeature(features[i], source\r
-                    .getNickname());\r
+            SequenceFeature f = newSequenceFeature(features[i],\r
+                    source.getNickname());\r
             if (!parseSeqFeature(seq, f, features[i], source))\r
             {\r
               if (dbref.getMap() != null && f.getBegin() > 0\r
@@ -615,8 +614,8 @@ public class DasSequenceFeatureFetcher
             for (int i = 0; i < features.length; i++)\r
             {\r
               // standard DAS feature-> jalview sequence feature transformation\r
-              SequenceFeature f = newSequenceFeature(features[i], source\r
-                      .getNickname());\r
+              SequenceFeature f = newSequenceFeature(features[i],\r
+                      source.getNickname());\r
               if (!parseSeqFeature(seq, f, features[i], source))\r
               {\r
                 // just add as a simple sequence feature\r
@@ -805,8 +804,9 @@ public class DasSequenceFeatureFetcher
       {\r
       }\r
 \r
-      SequenceFeature f = new SequenceFeature((String) dasfeature\r
-              .get("TYPE"), desc, start, end, score, nickname);\r
+      SequenceFeature f = new SequenceFeature(\r
+              (String) dasfeature.get("TYPE"), desc, start, end, score,\r
+              nickname);\r
 \r
       if (dasfeature.containsKey("LINK"))\r
       {\r
index f40831c..6a9371b 100644 (file)
@@ -284,7 +284,8 @@ public class EnfinEnvision2OneWay extends DefaultHandler implements
    *          Object array returned from the makeUrlStubs function.
    */
   private void addshowLink(JMenu linkMenu, String label, String descr,
-          String dbname, final GroupUrlLink urlgenerator, final Object[] urlstub)
+          String dbname, final GroupUrlLink urlgenerator,
+          final Object[] urlstub)
   {
     Component[] jmi = linkMenu.getMenuComponents();
     for (int i = 0; i < jmi.length; i++)
@@ -299,17 +300,17 @@ public class EnfinEnvision2OneWay extends DefaultHandler implements
     boolean seqsorids = (urlgenerator.getGroupURLType() & urlgenerator.SEQUENCEIDS) == 0;
     int i = urlgenerator.getNumberInvolved(urlstub);
     JMenuItem item = new JMenuItem(label);
-    // 
-    if (dbname==null || dbname.trim().length()==0)
+    //
+    if (dbname == null || dbname.trim().length() == 0)
     {
       dbname = "";
     }
     item.setToolTipText("<html>"
-            + JvSwingUtils.wrapTooltip("Submit " + i + " " +
-                    dbname +" "
-                    + (seqsorids ? "sequence" : "sequence id") + (i > 1 ? "s" : "")
-                    
-            + " to<br/>" + descr) + "</html>");
+            + JvSwingUtils.wrapTooltip("Submit " + i + " " + dbname + " "
+                    + (seqsorids ? "sequence" : "sequence id")
+                    + (i > 1 ? "s" : "")
+
+                    + " to<br/>" + descr) + "</html>");
     item.addActionListener(new java.awt.event.ActionListener()
     {
       public void actionPerformed(ActionEvent e)
@@ -319,7 +320,8 @@ public class EnfinEnvision2OneWay extends DefaultHandler implements
 
           public void run()
           {
-            try {
+            try
+            {
               showLink(urlgenerator.constructFrom(urlstub));
             } catch (UrlStringTooLongException ex)
             {
@@ -404,7 +406,7 @@ public class EnfinEnvision2OneWay extends DefaultHandler implements
    */
   private JMenu buildGroupURLMenu(SequenceI[] seqs, SequenceGroup sg)
   {
-    if (groupURLdescr==null || groupURLLinks==null)
+    if (groupURLdescr == null || groupURLLinks == null)
       return null;
     // TODO: usability: thread off the generation of group url content so root
     // menu appears asap
@@ -476,7 +478,8 @@ public class EnfinEnvision2OneWay extends DefaultHandler implements
     /**
      * last number of sequences where URL generation failed
      */
-    int[] nsqtype = new int[] { 0,0,0,0,0,0,0,0,0,0};
+    int[] nsqtype = new int[]
+    { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
     for (int i = 0; i < groupURLLinks.size(); i++)
     {
       String link = (String) groupURLLinks.elementAt(i);
@@ -527,7 +530,8 @@ public class EnfinEnvision2OneWay extends DefaultHandler implements
           String[] allids = ((String[]) idset[1]);
           seqstr = new String[numinput];
           ids = new String[numinput];
-          if (nsqtype[urlLink.getGroupURLType()]>0 && numinput>=nsqtype[urlLink.getGroupURLType()])
+          if (nsqtype[urlLink.getGroupURLType()] > 0
+                  && numinput >= nsqtype[urlLink.getGroupURLType()])
           {
             continue;
           }
@@ -539,8 +543,10 @@ public class EnfinEnvision2OneWay extends DefaultHandler implements
               seqstr[idcount++] = idandseqs[1][sq];
             }
           }
-          try {createAndAddLinks(wflinkMenus, false, urlLink, ltarget, null,
-                  descr, ids, seqstr);
+          try
+          {
+            createAndAddLinks(wflinkMenus, false, urlLink, ltarget, null,
+                    descr, ids, seqstr);
           } catch (UrlStringTooLongException ex)
           {
             nsqtype[urlLink.getGroupURLType()] = numinput;
@@ -550,14 +556,17 @@ public class EnfinEnvision2OneWay extends DefaultHandler implements
       // also do names only.
       seqstr = idandseqs[1];
       ids = idandseqs[0];
-      if (nsqtype[urlLink.getGroupURLType()]>0 && idandseqs[0].length>=nsqtype[urlLink.getGroupURLType()])
+      if (nsqtype[urlLink.getGroupURLType()] > 0
+              && idandseqs[0].length >= nsqtype[urlLink.getGroupURLType()])
       {
         continue;
       }
-      
-      try {createAndAddLinks(wflinkMenus, true, urlLink, "Any", null, descr,
-              ids, seqstr);
-      }catch (UrlStringTooLongException ex)
+
+      try
+      {
+        createAndAddLinks(wflinkMenus, true, urlLink, "Any", null, descr,
+                ids, seqstr);
+      } catch (UrlStringTooLongException ex)
       {
         nsqtype[urlLink.getGroupURLType()] = idandseqs[0].length;
       }
@@ -590,7 +599,7 @@ public class EnfinEnvision2OneWay extends DefaultHandler implements
           GroupUrlLink urlLink, String label, String ltarget, String descr,
           String[] ids, String[] seqstr) throws UrlStringTooLongException
   {
-    Object[] urlset= urlLink.makeUrlStubs(ids, seqstr, "FromJalview"
+    Object[] urlset = urlLink.makeUrlStubs(ids, seqstr, "FromJalview"
             + System.currentTimeMillis(), false);
 
     if (urlset != null)
@@ -615,6 +624,7 @@ public class EnfinEnvision2OneWay extends DefaultHandler implements
     }
     return false;
   }
+
   // / end of stuff copied from popupmenu
   public void attachWSMenuEntry(final JMenu wsmenu,
           final AlignFrame alignFrame)
@@ -643,19 +653,22 @@ public class EnfinEnvision2OneWay extends DefaultHandler implements
       {
         if (refresh && !isRunning())
         {
-          new Thread(new Runnable() {
-            public void run() {
-          try
-          {
-            buildGroupLinkMenu(enfinServiceMenu, alignFrame);
-          } catch (OutOfMemoryError ex)
+          new Thread(new Runnable()
           {
-            Cache.log.error(
-                    "Out of memory when calculating the Envision2 links.",
-                    ex);
-            enfinServiceMenu.setEnabled(false);
-          }
-            }}).start();
+            public void run()
+            {
+              try
+              {
+                buildGroupLinkMenu(enfinServiceMenu, alignFrame);
+              } catch (OutOfMemoryError ex)
+              {
+                Cache.log
+                        .error("Out of memory when calculating the Envision2 links.",
+                                ex);
+                enfinServiceMenu.setEnabled(false);
+              }
+            }
+          }).start();
           refresh = false;
         }
       }
index 9d9d61a..62f172d 100644 (file)
@@ -109,9 +109,7 @@ public class JobStateSummary
       {
         serror++;
         j.subjobComplete = true;
-        wsInfo
-                .setStatus(j.jobnum,
-                        WebserviceInfo.STATE_STOPPED_SERVERERROR);
+        wsInfo.setStatus(j.jobnum, WebserviceInfo.STATE_STOPPED_SERVERERROR);
       }
       else if (j.isBroken())
       {
@@ -125,7 +123,8 @@ public class JobStateSummary
       wsInfo.appendProgressText(j.jobnum, progheader);
       if (j.hasStatus())
       {
-        // Could try to squash OOMs here, but it usually doesn't help - there probably won't be
+        // Could try to squash OOMs here, but it usually doesn't help - there
+        // probably won't be
         // enough memory to handle the results later on anyway.
         // try {
         wsInfo.appendProgressText(j.jobnum, j.getStatus());
index ae2e90e..d89ab73 100755 (executable)
@@ -17,7 +17,6 @@
  */
 package jalview.ws;
 
-
 import jalview.gui.*;
 
 public abstract class WSClient // implements WSMenuEntryProviderI
index eaf3846..baffc6d 100644 (file)
@@ -58,8 +58,8 @@ public abstract class EmblXmlSource extends EbiFileRetrievedProxy
     File reply;\r
     try\r
     {\r
-      reply = dbFetch.fetchDataAsFile(emprefx.toLowerCase() + ":"\r
-              + query.trim(), "emblxml", null);\r
+      reply = dbFetch.fetchDataAsFile(\r
+              emprefx.toLowerCase() + ":" + query.trim(), "emblxml", null);\r
     } catch (Exception e)\r
     {\r
       stopQuery();\r
index ae11a68..06e1164 100644 (file)
@@ -100,7 +100,7 @@ public class GeneDbSource extends EmblXmlSource implements DbSourceProxy
   {\r
     // query of form\r
     // http://www.genedb.org/genedb/ArtemisFormHandler?id=&dest=EMBL\r
-    // \r
+    //\r
     return getEmblSequenceRecords(DBRefSource.GENEDB, queries);\r
   }\r
 \r
index 5bc0b9b..e5c7c38 100644 (file)
@@ -90,8 +90,7 @@ public class DasSequenceSourceListener implements SequenceListener
     }\r
     Sequence sq = new Sequence(e.getAccessionCode(), e.getSequence());\r
     sq.addDBRef(new DBRefEntry(oursource.getDbSource(), oursource\r
-            .getDbVersion()\r
-            + ":" + e.getVersion(), e.getAccessionCode()));\r
+            .getDbVersion() + ":" + e.getVersion(), e.getAccessionCode()));\r
     seqs.addElement(sq);\r
     called = true;\r
   }\r
index 40a21c6..efb2739 100644 (file)
@@ -84,9 +84,7 @@ public class EBIFetchClient
   {\r
     try\r
     {\r
-      call\r
-              .setOperationName(new QName("urn:Dbfetch",\r
-                      "getSupportedFormats"));\r
+      call.setOperationName(new QName("urn:Dbfetch", "getSupportedFormats"));\r
       call.setReturnType(XMLType.SOAP_ARRAY);\r
 \r
       return (String[]) call.invoke(new Object[]\r
index 523899e..c8b1cda 100644 (file)
@@ -50,6 +50,7 @@ public class Discoverer implements Runnable
 
   private java.beans.PropertyChangeSupport changeSupport = new java.beans.PropertyChangeSupport(
           this);
+
   /**
    * change listeners are notified of "services" property changes
    * 
@@ -172,8 +173,7 @@ public class Discoverer implements Runnable
     } catch (Exception ex)
     {
       jalview.bin.Cache.log
-              .warn(
-                      "Error parsing comma separated list of urls in DISCOVERY_URLS.",
+              .warn("Error parsing comma separated list of urls in DISCOVERY_URLS.",
                       ex);
     }
     if (urls.size() > 0)
index 846cd29..8fff195 100644 (file)
@@ -252,15 +252,9 @@ public class JPredClient extends WS1Client
     String altitle = "JNet prediction on " + seq.getName()
             + " using alignment from " + title;
 
-    wsInfo
-            .setProgressText("Job details for MSA based prediction ("
-                    + title
-                    + ") on sequence :\n>"
-                    + seq.getName()
-                    + "\n"
-                    + AlignSeq
-                            .extractGaps("-. ", seq.getSequenceAsString())
-                    + "\n");
+    wsInfo.setProgressText("Job details for MSA based prediction (" + title
+            + ") on sequence :\n>" + seq.getName() + "\n"
+            + AlignSeq.extractGaps("-. ", seq.getSequenceAsString()) + "\n");
     SequenceI aln[] = new SequenceI[msf.length];
     for (int i = 0, j = msf.length; i < j; i++)
     {
@@ -289,13 +283,9 @@ public class JPredClient extends WS1Client
     {
       wsInfo = setWebService();
     }
-    wsInfo
-            .setProgressText("Job details for prediction on sequence :\n>"
-                    + seq.getName()
-                    + "\n"
-                    + AlignSeq
-                            .extractGaps("-. ", seq.getSequenceAsString())
-                    + "\n");
+    wsInfo.setProgressText("Job details for prediction on sequence :\n>"
+            + seq.getName() + "\n"
+            + AlignSeq.extractGaps("-. ", seq.getSequenceAsString()) + "\n");
     String altitle = "JNet prediction for sequence " + seq.getName()
             + " from " + title;
 
@@ -371,16 +361,16 @@ public class JPredClient extends WS1Client
         if (msa.getSequences().length == 1)
         {
           // Single Sequence prediction
-          new jalview.ws.jws1.JPredClient(sh, af.getTitle(), false, msa, af,
-                  true);
+          new jalview.ws.jws1.JPredClient(sh, af.getTitle(), false, msa,
+                  af, true);
         }
         else
         {
           if (msa.getSequences().length > 1)
           {
             // Sequence profile based prediction
-            new jalview.ws.jws1.JPredClient(sh, af.getTitle(), true, msa, af,
-                    true);
+            new jalview.ws.jws1.JPredClient(sh, af.getTitle(), true, msa,
+                    af, true);
           }
         }
       }
index 63872f5..98f2645 100644 (file)
@@ -100,8 +100,8 @@ class JPredThread extends JWS1Thread implements WSClientI
       jalview.bin.Cache.log.debug("Parsing output from JNet job.");
       // JPredFile prediction = new JPredFile("C:/JalviewX/files/jpred.txt",
       // "File");
-      jalview.io.JPredFile prediction = new jalview.io.JPredFile(result
-              .getPredfile(), "Paste");
+      jalview.io.JPredFile prediction = new jalview.io.JPredFile(
+              result.getPredfile(), "Paste");
       SequenceI[] preds = prediction.getSeqsAsArray();
       jalview.bin.Cache.log.debug("Got prediction profile.");
 
@@ -110,8 +110,8 @@ class JPredThread extends JWS1Thread implements WSClientI
         jalview.bin.Cache.log.debug("Getting associated alignment.");
         // we ignore the returned alignment if we only predicted on a single
         // sequence
-        String format = new jalview.io.IdentifyFile().Identify(result
-                .getAligfile(), "Paste");
+        String format = new jalview.io.IdentifyFile().Identify(
+                result.getAligfile(), "Paste");
 
         if (jalview.io.FormatAdapter.isValidFormat(format))
         {
@@ -180,8 +180,8 @@ class JPredThread extends JWS1Thread implements WSClientI
           profileseq.setSequence(sqs[msaIndex].getSequenceAsString());
         }
 
-        if (!jalview.analysis.SeqsetUtils.SeqCharacterUnhash(al
-                .getSequenceAt(FirstSeq), SequenceInfo))
+        if (!jalview.analysis.SeqsetUtils.SeqCharacterUnhash(
+                al.getSequenceAt(FirstSeq), SequenceInfo))
         {
           throw (new Exception(
                   "Couldn't recover sequence properties for JNet Query sequence!"));
@@ -352,8 +352,8 @@ class JPredThread extends JWS1Thread implements WSClientI
     {
       super();
       this.predMap = delMap;
-      String sq = AlignSeq.extractGaps(Comparison.GapChars, seq
-              .getSequenceAsString());
+      String sq = AlignSeq.extractGaps(Comparison.GapChars,
+              seq.getSequenceAsString());
       if (sq.length() >= 20)
       {
         this.SequenceInfo = SequenceInfo;
@@ -470,14 +470,12 @@ class JPredThread extends JWS1Thread implements WSClientI
       wsInfo.setStatus(WebserviceInfo.STATE_STOPPED_SERVERERROR);
       if (e.getMessage().indexOf("Exception") > -1)
       {
-        wsInfo
-                .setStatus(j.getJobnum(),
-                        WebserviceInfo.STATE_STOPPED_SERVERERROR);
-        wsInfo
-                .setProgressText(
-                        j.getJobnum(),
-                        "Failed to submit the prediction. (Just close the window)\n"
-                                + "It is most likely that there is a problem with the server.\n");
+        wsInfo.setStatus(j.getJobnum(),
+                WebserviceInfo.STATE_STOPPED_SERVERERROR);
+        wsInfo.setProgressText(
+                j.getJobnum(),
+                "Failed to submit the prediction. (Just close the window)\n"
+                        + "It is most likely that there is a problem with the server.\n");
         System.err
                 .println("JPredWS Client: Failed to submit the prediction. Quite possibly because of a server error - see below)\n"
                         + e.getMessage() + "\n");
@@ -492,8 +490,8 @@ class JPredThread extends JWS1Thread implements WSClientI
                 "Failed to submit the prediction:\n" + e.getMessage()
                         + wsInfo.getProgressText());
 
-        jalview.bin.Cache.log.debug("Failed Submission of job " + j.getJobnum(),
-                e);
+        jalview.bin.Cache.log.debug(
+                "Failed Submission of job " + j.getJobnum(), e);
 
       }
       j.setAllowedServerExceptions(-1);
@@ -585,7 +583,8 @@ class JPredThread extends JWS1Thread implements WSClientI
           {
             jalview.bin.Cache.log.error(
                     "JNet Client: JPred Annotation Parse Error", e);
-            wsInfo.setStatus(j.getJobnum(), WebserviceInfo.STATE_STOPPED_ERROR);
+            wsInfo.setStatus(j.getJobnum(),
+                    WebserviceInfo.STATE_STOPPED_ERROR);
             wsInfo.appendProgressText(j.getJobnum(), OutputHeader + "\n"
                     + j.result.getStatus()
                     + "\nInvalid JNet job result data!\n" + e.getMessage());
@@ -646,7 +645,7 @@ class JPredThread extends JWS1Thread implements WSClientI
 
   public void pollJob(AWsJob job) throws Exception
   {
-    ((JPredJob)job).result = server.getresult(job.getJobId());
+    ((JPredJob) job).result = server.getresult(job.getJobId());
   }
 
   public boolean isCancellable()
index 84d70b8..0d578c6 100644 (file)
@@ -25,10 +25,10 @@ import jalview.gui.*;
 import jalview.ws.AWSThread;
 
 /**
- * specific methods for Jalview WS1 web service jobs
- * (will probably disappear)
+ * specific methods for Jalview WS1 web service jobs (will probably disappear)
+ * 
  * @author JimP
- *
+ * 
  */
 public abstract class JWS1Thread extends AWSThread
 {
index f2f1419..a5f1216 100644 (file)
@@ -79,7 +79,8 @@ public class MsaWSClient extends WS1Client
 
     if ((wsInfo = setWebService(sh)) == null)
     {
-      JOptionPane.showMessageDialog(Desktop.desktop,
+      JOptionPane.showMessageDialog(
+              Desktop.desktop,
               "The Multiple Sequence Alignment Service named "
                       + sh.getName() + " is unknown",
               "Internal Jalview Error", JOptionPane.WARNING_MESSAGE);
@@ -200,9 +201,9 @@ public class MsaWSClient extends WS1Client
       public void actionPerformed(ActionEvent e)
       {
         AlignmentView msa = alignFrame.gatherSequencesForAlignment();
-        new jalview.ws.jws1.MsaWSClient(serviceHandle, alignFrame.getTitle(),
-                msa, false, true, alignFrame.getViewport().getAlignment()
-                        .getDataset(), alignFrame);
+        new jalview.ws.jws1.MsaWSClient(serviceHandle, alignFrame
+                .getTitle(), msa, false, true, alignFrame.getViewport()
+                .getAlignment().getDataset(), alignFrame);
 
       }
 
@@ -219,9 +220,9 @@ public class MsaWSClient extends WS1Client
         public void actionPerformed(ActionEvent e)
         {
           AlignmentView msa = alignFrame.gatherSequencesForAlignment();
-          new jalview.ws.jws1.MsaWSClient(serviceHandle, alignFrame.getTitle(),
-                  msa, true, true, alignFrame.getViewport().getAlignment()
-                          .getDataset(), alignFrame);
+          new jalview.ws.jws1.MsaWSClient(serviceHandle, alignFrame
+                  .getTitle(), msa, true, true, alignFrame.getViewport()
+                  .getAlignment().getDataset(), alignFrame);
 
         }
 
index 5c21d0a..3eca137 100644 (file)
@@ -123,8 +123,8 @@ class MsaWSThread extends JWS1Thread implements WSClientI
         // for
         // any
         // subjob
-        SeqNames.put(newname, jalview.analysis.SeqsetUtils
-                .SeqCharacterHash(seqs[i]));
+        SeqNames.put(newname,
+                jalview.analysis.SeqsetUtils.SeqCharacterHash(seqs[i]));
         if (valid && seqs[i].getEnd() - seqs[i].getStart() > minlen - 1)
         {
           seqarray[n] = new vamsas.objects.simple.Sequence();
@@ -139,8 +139,8 @@ class MsaWSThread extends JWS1Thread implements WSClientI
           if (seqs[i].getEnd() >= seqs[i].getStart())
           {
             empty = (submitGaps) ? seqs[i].getSequenceAsString() : AlignSeq
-                    .extractGaps(jalview.util.Comparison.GapChars, seqs[i]
-                            .getSequenceAsString());
+                    .extractGaps(jalview.util.Comparison.GapChars,
+                            seqs[i].getSequenceAsString());
           }
           emptySeqs.add(new String[]
           { newname, empty });
@@ -360,9 +360,8 @@ class MsaWSThread extends JWS1Thread implements WSClientI
         }
         if (njobs > 0)
         {
-          wsinfo
-                  .setProgressName("region " + jobs[j].getJobnum(),
-                          jobs[j].getJobnum());
+          wsinfo.setProgressName("region " + jobs[j].getJobnum(),
+                  jobs[j].getJobnum());
         }
         wsinfo.setProgressText(jobs[j].getJobnum(), OutputHeader);
       }
@@ -416,7 +415,8 @@ class MsaWSThread extends JWS1Thread implements WSClientI
             cancelledMessage += ("\nProblems cancelling the job : Exception received...\n"
                     + exc + "\n");
             Cache.log.warn(
-                    "Exception whilst cancelling " + jobs[job].getJobId(), exc);
+                    "Exception whilst cancelling " + jobs[job].getJobId(),
+                    exc);
           }
           wsInfo.setProgressText(jobs[job].getJobnum(), OutputHeader
                   + cancelledMessage + "\n");
@@ -433,9 +433,8 @@ class MsaWSThread extends JWS1Thread implements WSClientI
     {
       if (!jobComplete)
       {
-        wsInfo
-                .setProgressText(OutputHeader
-                        + "Server cannot cancel this job because it has not been submitted properly. just close the window.\n");
+        wsInfo.setProgressText(OutputHeader
+                + "Server cannot cancel this job because it has not been submitted properly. just close the window.\n");
       }
     }
   }
@@ -505,13 +504,13 @@ class MsaWSThread extends JWS1Thread implements WSClientI
                       + e.toString() + "\n");
       j.setAllowedServerExceptions(0);
       wsInfo.setStatus(WebserviceInfo.STATE_STOPPED_SERVERERROR);
-      wsInfo.setStatus(j.getJobnum(), WebserviceInfo.STATE_STOPPED_SERVERERROR);
-      wsInfo
-              .appendProgressText(
-                      j.getJobnum(),
-                      "Failed to submit sequences for alignment.\n"
-                              + "It is most likely that there is a problem with the server.\n"
-                              + "Just close the window\n");
+      wsInfo.setStatus(j.getJobnum(),
+              WebserviceInfo.STATE_STOPPED_SERVERERROR);
+      wsInfo.appendProgressText(
+              j.getJobnum(),
+              "Failed to submit sequences for alignment.\n"
+                      + "It is most likely that there is a problem with the server.\n"
+                      + "Just close the window\n");
 
       // e.printStackTrace(); // TODO: JBPNote DEBUG
     }
@@ -526,8 +525,8 @@ class MsaWSThread extends JWS1Thread implements WSClientI
 
     for (int i = 0, j = seqs.length; i < j; i++)
     {
-      msa[i] = new jalview.datamodel.Sequence(seqs[i].getId(), seqs[i]
-              .getSeq());
+      msa[i] = new jalview.datamodel.Sequence(seqs[i].getId(),
+              seqs[i].getSeq());
     }
 
     return msa;
@@ -546,13 +545,13 @@ class MsaWSThread extends JWS1Thread implements WSClientI
                 && jobs[j].hasResults())
         {
           results++;
-          //if (Cache.log.isDebugEnabled())
-         // {
-         //   System.out.println("Job lob for job "+jobs[j].getJobId()+":"+jobs[j].getJobnum());
-         //   System.out.println(jobs[j].getStatus());
-         // }
+          // if (Cache.log.isDebugEnabled())
+          // {
+          // System.out.println("Job lob for job "+jobs[j].getJobId()+":"+jobs[j].getJobnum());
+          // System.out.println(jobs[j].getStatus());
+          // }
 
-          vamsas.objects.simple.Alignment valign =  ((MsaResult)((MsaWSJob) jobs[j]).result)
+          vamsas.objects.simple.Alignment valign = ((MsaResult) ((MsaWSJob) jobs[j]).result)
                   .getMsa();
           if (valign != null)
           {
@@ -561,12 +560,13 @@ class MsaWSThread extends JWS1Thread implements WSClientI
             String[] lines = valign.getMethod();
             for (int line = 0; line < lines.length; line++)
             {
-              wsInfo.appendProgressText(jobs[j].getJobnum(), lines[line] + "\n");
+              wsInfo.appendProgressText(jobs[j].getJobnum(), lines[line]
+                      + "\n");
             }
             // JBPNote The returned files from a webservice could be
             // hidden behind icons in the monitor window that,
             // when clicked, pop up their corresponding data
-            
+
           }
         }
       }
@@ -695,8 +695,8 @@ class MsaWSThread extends JWS1Thread implements WSClientI
           }
           for (int i = 0, l = alorders.size(); i < l; i++)
           {
-            af.addSortByOrderMenuItem(WebServiceName
-                    + ((String) names.get(i)) + " Ordering",
+            af.addSortByOrderMenuItem(
+                    WebServiceName + ((String) names.get(i)) + " Ordering",
                     (AlignmentOrder) alorders.get(i));
           }
         }
index 24dc7a4..c344967 100644 (file)
@@ -249,7 +249,8 @@ public class SeqSearchWSClient extends WS1Client
     String dbs[] = null;
     try
     {
-      dbs = new jalview.ws.jws1.SeqSearchWSClient(sh).getSupportedDatabases();
+      dbs = new jalview.ws.jws1.SeqSearchWSClient(sh)
+              .getSupportedDatabases();
     } catch (Exception e)
     {
       jalview.bin.Cache.log.warn(
@@ -268,8 +269,8 @@ public class SeqSearchWSClient extends WS1Client
         // use same input gatherer as for secondary structure prediction
         // we could actually parameterise the gatherer method here...
         AlignmentView msa = af.gatherSeqOrMsaForSecStrPrediction();
-        new jalview.ws.jws1.SeqSearchWSClient(sh, af.getTitle(), msa, null, af
-                .getViewport().getAlignment().getDataset(), af);
+        new jalview.ws.jws1.SeqSearchWSClient(sh, af.getTitle(), msa, null,
+                af.getViewport().getAlignment().getDataset(), af);
       }
     });
     // add entry for each database the service supports
index 893482a..99a8d03 100644 (file)
@@ -124,8 +124,8 @@ class SeqSearchWSThread extends JWS1Thread implements WSClientI
         // for
         // any
         // subjob
-        SeqNames.put(newname, jalview.analysis.SeqsetUtils
-                .SeqCharacterHash(seqs[i]));
+        SeqNames.put(newname,
+                jalview.analysis.SeqsetUtils.SeqCharacterHash(seqs[i]));
         if (valid && seqs[i].getEnd() - seqs[i].getStart() > minlen - 1)
         {
           seqarray[n] = new vamsas.objects.simple.Sequence();
@@ -140,8 +140,8 @@ class SeqSearchWSThread extends JWS1Thread implements WSClientI
           if (seqs[i].getEnd() >= seqs[i].getStart())
           {
             empty = (submitGaps) ? seqs[i].getSequenceAsString() : AlignSeq
-                    .extractGaps(jalview.util.Comparison.GapChars, seqs[i]
-                            .getSequenceAsString());
+                    .extractGaps(jalview.util.Comparison.GapChars,
+                            seqs[i].getSequenceAsString());
           }
           emptySeqs.add(new String[]
           { newname, empty });
@@ -374,9 +374,8 @@ class SeqSearchWSThread extends JWS1Thread implements WSClientI
         }
         if (njobs > 0)
         {
-          wsinfo
-                  .setProgressName("region " + jobs[j].getJobnum(),
-                          jobs[j].getJobnum());
+          wsinfo.setProgressName("region " + jobs[j].getJobnum(),
+                  jobs[j].getJobnum());
         }
         wsinfo.setProgressText(jobs[j].getJobnum(), OutputHeader);
       }
@@ -430,7 +429,8 @@ class SeqSearchWSThread extends JWS1Thread implements WSClientI
             cancelledMessage += ("\nProblems cancelling the job : Exception received...\n"
                     + exc + "\n");
             Cache.log.warn(
-                    "Exception whilst cancelling " + jobs[job].getJobId(), exc);
+                    "Exception whilst cancelling " + jobs[job].getJobId(),
+                    exc);
           }
           wsInfo.setProgressText(jobs[job].getJobnum(), OutputHeader
                   + cancelledMessage + "\n");
@@ -447,17 +447,16 @@ class SeqSearchWSThread extends JWS1Thread implements WSClientI
     {
       if (!jobComplete)
       {
-        wsInfo
-                .setProgressText(OutputHeader
-                        + "Server cannot cancel this job because it has not been submitted properly. just close the window.\n");
+        wsInfo.setProgressText(OutputHeader
+                + "Server cannot cancel this job because it has not been submitted properly. just close the window.\n");
       }
     }
   }
 
   public void pollJob(AWsJob job) throws Exception
   {
-    ((SeqSearchWSJob) job).result = server
-            .getResult(((SeqSearchWSJob) job).getJobId());
+    ((SeqSearchWSJob) job).result = server.getResult(((SeqSearchWSJob) job)
+            .getJobId());
   }
 
   public void StartJob(AWsJob job)
@@ -488,8 +487,8 @@ class SeqSearchWSThread extends JWS1Thread implements WSClientI
     }
     try
     {
-      vamsas.objects.simple.WsJobId jobsubmit = server.search(j.seqs
-              .getSeqs()[0], dbArg);
+      vamsas.objects.simple.WsJobId jobsubmit = server.search(
+              j.seqs.getSeqs()[0], dbArg);
 
       if ((jobsubmit != null) && (jobsubmit.getStatus() == 1))
       {
@@ -521,13 +520,13 @@ class SeqSearchWSThread extends JWS1Thread implements WSClientI
                       + e.toString() + "\n");
       j.setAllowedServerExceptions(0);
       wsInfo.setStatus(WebserviceInfo.STATE_STOPPED_SERVERERROR);
-      wsInfo.setStatus(j.getJobnum(), WebserviceInfo.STATE_STOPPED_SERVERERROR);
-      wsInfo
-              .appendProgressText(
-                      j.getJobnum(),
-                      "Failed to submit sequences for alignment.\n"
-                              + "It is most likely that there is a problem with the server.\n"
-                              + "Just close the window\n");
+      wsInfo.setStatus(j.getJobnum(),
+              WebserviceInfo.STATE_STOPPED_SERVERERROR);
+      wsInfo.appendProgressText(
+              j.getJobnum(),
+              "Failed to submit sequences for alignment.\n"
+                      + "It is most likely that there is a problem with the server.\n"
+                      + "Just close the window\n");
 
       // e.printStackTrace(); // TODO: JBPNote DEBUG
     }
@@ -541,8 +540,8 @@ class SeqSearchWSThread extends JWS1Thread implements WSClientI
 
     for (int i = 0, j = seqs.length; i < j; i++)
     {
-      msa[i] = new jalview.datamodel.Sequence(seqs[i].getId(), seqs[i]
-              .getSeq());
+      msa[i] = new jalview.datamodel.Sequence(seqs[i].getId(),
+              seqs[i].getSeq());
     }
 
     return msa;
@@ -561,7 +560,7 @@ class SeqSearchWSThread extends JWS1Thread implements WSClientI
                 && jobs[j].hasResults())
         {
           results++;
-          vamsas.objects.simple.Alignment valign = ((SeqSearchResult) ((SeqSearchWSJob)jobs[j]).result)
+          vamsas.objects.simple.Alignment valign = ((SeqSearchResult) ((SeqSearchWSJob) jobs[j]).result)
                   .getAlignment();
           if (valign != null)
           {
@@ -570,7 +569,8 @@ class SeqSearchWSThread extends JWS1Thread implements WSClientI
             String[] lines = valign.getMethod();
             for (int line = 0; line < lines.length; line++)
             {
-              wsInfo.appendProgressText(jobs[j].getJobnum(), lines[line] + "\n");
+              wsInfo.appendProgressText(jobs[j].getJobnum(), lines[line]
+                      + "\n");
             }
             // JBPNote The returned files from a webservice could be
             // hidden behind icons in the monitor window that,
index d906a96..f05585d 100644 (file)
@@ -27,11 +27,13 @@ import javax.swing.JMenu;
 import ext.vamsas.ServiceHandle;
 
 /**
- * JWS1 Specific UI attributes and methods  
+ * JWS1 Specific UI attributes and methods
+ * 
  * @author JimP
- *
+ * 
  */
-public abstract class WS1Client extends WSClient implements WSMenuEntryProviderI
+public abstract class WS1Client extends WSClient implements
+        WSMenuEntryProviderI
 {
 
   /**
@@ -79,7 +81,7 @@ public abstract class WS1Client extends WSClient implements WSMenuEntryProviderI
     else
     {
       WebServiceJobTitle = sh.getAbstractName() + " using " + sh.getName();
-  
+
     }
     WebServiceReference = sh.getDescription();
     WsURL = sh.getEndpointURL();
@@ -111,8 +113,8 @@ public abstract class WS1Client extends WSClient implements WSMenuEntryProviderI
   }
 
   /**
-   * method implemented by each concrete WS1Client implementation that creates menu
-   * entries that enact their service using data from alignFrame.
+   * method implemented by each concrete WS1Client implementation that creates
+   * menu entries that enact their service using data from alignFrame.
    * 
    * @param wsmenu
    *          where new menu entries (and submenus) are to be attached
@@ -121,7 +123,7 @@ public abstract class WS1Client extends WSClient implements WSMenuEntryProviderI
    *          created for
    * @param alignFrame
    */
-  public abstract void attachWSMenuEntry(JMenu wsmenu, final ServiceHandle serviceHandle,
-          final AlignFrame alignFrame);
+  public abstract void attachWSMenuEntry(JMenu wsmenu,
+          final ServiceHandle serviceHandle, final AlignFrame alignFrame);
 
 }
index 3916390..e542c3f 100644 (file)
@@ -21,7 +21,9 @@ import jalview.ws.AWsJob;
 
 abstract class WSJob extends AWsJob
 {
-  /* (non-Javadoc)
+  /*
+   * (non-Javadoc)
+   * 
    * @see jalview.ws.AWsJob#clearResponse()
    */
   @Override
@@ -30,22 +32,26 @@ abstract class WSJob extends AWsJob
     result = null;
   }
 
-  /* (non-Javadoc)
+  /*
+   * (non-Javadoc)
+   * 
    * @see jalview.ws.AWsJob#hasResponse()
    */
   @Override
   public boolean hasResponse()
   {
-    return result!=null;
+    return result != null;
   }
 
-  /* (non-Javadoc)
+  /*
+   * (non-Javadoc)
+   * 
    * @see jalview.ws.AWsJob#hasStatus()
    */
   @Override
   public boolean hasStatus()
   {
-    return result!=null && result.getStatus()!=null;
+    return result != null && result.getStatus() != null;
   }
 
   /**
@@ -59,19 +65,21 @@ abstract class WSJob extends AWsJob
    */
   public String getStatus()
   {
-    return result==null ? null : result.getStatus();
+    return result == null ? null : result.getStatus();
   }
 
-  public String getState() {
-    return result==null ? "NULL result" : ""+result.getState(); 
+  public String getState()
+  {
+    return result == null ? "NULL result" : "" + result.getState();
   }
+
   /**
    * @return
    * @see vamsas.objects.simple.Result#isBroken()
    */
   public boolean isBroken()
   {
-    return result!=null && result.isBroken();
+    return result != null && result.isBroken();
   }
 
   /**
@@ -80,7 +88,7 @@ abstract class WSJob extends AWsJob
    */
   public boolean isFailed()
   {
-    return result!=null && result.isFailed();
+    return result != null && result.isFailed();
   }
 
   /**
@@ -89,7 +97,7 @@ abstract class WSJob extends AWsJob
    */
   public boolean isFinished()
   {
-    return result!=null && result.isFinished();
+    return result != null && result.isFinished();
   }
 
   /**
@@ -98,7 +106,7 @@ abstract class WSJob extends AWsJob
    */
   public boolean isInvalid()
   {
-    return result!=null && result.isInvalid();
+    return result != null && result.isInvalid();
   }
 
   /**
@@ -107,7 +115,7 @@ abstract class WSJob extends AWsJob
    */
   public boolean isJobFailed()
   {
-    return result!=null && result.isJobFailed();
+    return result != null && result.isJobFailed();
   }
 
   /**
@@ -116,7 +124,7 @@ abstract class WSJob extends AWsJob
    */
   public boolean isQueued()
   {
-    return result!=null && result.isQueued();
+    return result != null && result.isQueued();
   }
 
   /**
@@ -125,7 +133,7 @@ abstract class WSJob extends AWsJob
    */
   public boolean isRunning()
   {
-    return result!=null && result.isRunning();
+    return result != null && result.isRunning();
   }
 
   /**
@@ -134,6 +142,6 @@ abstract class WSJob extends AWsJob
    */
   public boolean isServerError()
   {
-    return result!=null && result.isServerError();
+    return result != null && result.isServerError();
   }
 }
index 608bf08..bbc0604 100644 (file)
@@ -22,20 +22,24 @@ import compbio.metadata.JobStatus;
 import jalview.ws.AWsJob;
 
 /**
- * job status processing for JWS2 jobs. 
+ * job status processing for JWS2 jobs.
+ * 
  * @author JimP
- *
+ * 
  */
 public abstract class JWs2Job extends AWsJob
 {
-  JobStatus status=null;
+  JobStatus status = null;
+
   public void setjobStatus(JobStatus jobStatus)
   {
     status = jobStatus;
     // update flags
   }
 
-  /* (non-Javadoc)
+  /*
+   * (non-Javadoc)
+   * 
    * @see jalview.ws.AWsJob#clearResponse()
    */
   @Override
@@ -44,97 +48,111 @@ public abstract class JWs2Job extends AWsJob
     status = null;
   }
 
-  /* (non-Javadoc)
+  /*
+   * (non-Javadoc)
+   * 
    * @see jalview.ws.AWsJob#getState()
    */
   @Override
   public String getState()
   {
-    return status==null ? ("Unknown") : status.toString();
+    return status == null ? ("Unknown") : status.toString();
   }
-  /* (non-Javadoc)
+
+  /*
+   * (non-Javadoc)
+   * 
    * @see jalview.ws.AWsJob#hasResponse()
    */
   @Override
   public boolean hasResponse()
   {
     // TODO Auto-generated method stub
-    return status!=null;
+    return status != null;
   }
+
   /*
-  StringBuffer statusBuffer = null;
-  * (non-Javadoc)
-  * @see jalview.ws.AWsJob#getStatus()
-   *
-  @Override
-  public String getStatus()
-  {
-    return statusBuffer.toString();
-  }
-  * (non-Javadoc)
+   * StringBuffer statusBuffer = null; (non-Javadoc)
+   * 
+   * @see jalview.ws.AWsJob#getStatus()
+   * 
+   * @Override public String getStatus() { return statusBuffer.toString(); }
+   * (non-Javadoc)
+   * 
    * @see jalview.ws.AWsJob#hasStatus()
-   *
-  @Override
-  public boolean hasStatus()
-  {
-    return statusBuffer!=null;
-  }
-*/
+   * 
+   * @Override public boolean hasStatus() { return statusBuffer!=null; }
+   */
 
-  /* (non-Javadoc)
+  /*
+   * (non-Javadoc)
+   * 
    * @see jalview.ws.AWsJob#isBroken()
    */
   @Override
   public boolean isBroken()
   {
-    return status==null ? false : status.equals(status.UNDEFINED);
+    return status == null ? false : status.equals(status.UNDEFINED);
   }
 
-  /* (non-Javadoc)
+  /*
+   * (non-Javadoc)
+   * 
    * @see jalview.ws.AWsJob#isFailed()
    */
   @Override
   public boolean isFailed()
   {
-    return status==null ? false : status.equals(status.FAILED);
+    return status == null ? false : status.equals(status.FAILED);
   }
 
-  /* (non-Javadoc)
+  /*
+   * (non-Javadoc)
+   * 
    * @see jalview.ws.AWsJob#isFinished()
    */
   @Override
   public boolean isFinished()
   {
-    return status==null ? false : status.equals(status.FINISHED);
+    return status == null ? false : status.equals(status.FINISHED);
   }
 
-  /* (non-Javadoc)
+  /*
+   * (non-Javadoc)
+   * 
    * @see jalview.ws.AWsJob#isQueued()
    */
   @Override
   public boolean isQueued()
   {
-    return status==null ? false : status.equals(status.SUBMITTED) || status.equals(status.PENDING);
+    return status == null ? false : status.equals(status.SUBMITTED)
+            || status.equals(status.PENDING);
   }
 
-  /* (non-Javadoc)
+  /*
+   * (non-Javadoc)
+   * 
    * @see jalview.ws.AWsJob#isRunning()
    */
   @Override
   public boolean isRunning()
   {
     // TODO Auto-generated method stub
-    return status!=null && (status.equals(status.RUNNING) || status.equals(status.STARTED));
+    return status != null
+            && (status.equals(status.RUNNING) || status
+                    .equals(status.STARTED));
   }
 
-  /* (non-Javadoc)
+  /*
+   * (non-Javadoc)
+   * 
    * @see jalview.ws.AWsJob#isServerError()
    */
   @Override
   public boolean isServerError()
   {
-    // server errors are raised as exceptions on the service method calls.  
-    return status==null ? false : false; // status.equals(status.FAILED);
+    // server errors are raised as exceptions on the service method calls.
+    return status == null ? false : false; // status.equals(status.FAILED);
   }
 
 }
index 948455b..c86a790 100644 (file)
@@ -25,58 +25,73 @@ import java.util.List;
 
 import compbio.metadata.Preset;
 
-public class JabaPreset implements WsParamSetI {
-  Preset p=null;
+public class JabaPreset implements WsParamSetI
+{
+  Preset p = null;
+
   Jws2Instance service;
-  public JabaPreset(Jws2Instance svc, Preset preset) {
-    service=svc;
-    p=preset;
+
+  public JabaPreset(Jws2Instance svc, Preset preset)
+  {
+    service = svc;
+    p = preset;
   }
+
   @Override
   public String getName()
   {
     return p.getName();
   }
+
   @Override
   public String getDescription()
   {
     return p.getDescription();
   }
+
   @Override
   public String[] getApplicableUrls()
   {
-    return new String[] { service.getUri()};
+    return new String[]
+    { service.getUri() };
   }
+
   @Override
   public String getSourceFile()
   {
     return null;
   }
+
   @Override
   public boolean isModifiable()
   {
     return false;
   }
+
   @Override
   public void setSourceFile(String newfile)
   {
-    throw new Error("Cannot set source file for "+getClass());
+    throw new Error("Cannot set source file for " + getClass());
   }
+
   @Override
   public List<ArgumentI> getArguments()
   {
-    try {
-    return JabaParamStore.getJwsArgsfromJaba(p.getArguments(service.getRunnerConfig()));
-    }
-    catch (Exception e)
+    try
+    {
+      return JabaParamStore.getJwsArgsfromJaba(p.getArguments(service
+              .getRunnerConfig()));
+    } catch (Exception e)
     {
       e.printStackTrace();
-      throw new Error("Probable mismatch between service instance and preset!");
+      throw new Error(
+              "Probable mismatch between service instance and preset!");
     }
   }
+
   @Override
   public void setArguments(List<ArgumentI> args)
   {
-    throw new Error("Cannot set Parameters for a Jaba Web service's preset");      
+    throw new Error("Cannot set Parameters for a Jaba Web service's preset");
   }
 }
index 706c138..a9ca8f0 100644 (file)
@@ -45,27 +45,26 @@ public abstract class Jws2Client extends jalview.ws.WSClient
     }
     return null;
   }
+
   /*
-  Jws2Instance serviceHandle;
-   * (non-Javadoc)
-   * @see jalview.ws.WSMenuEntryProviderI#attachWSMenuEntry(javax.swing.JMenu, jalview.gui.AlignFrame)
-   *
-  @Override
-  public void attachWSMenuEntry(JMenu wsmenu, AlignFrame alignFrame)
-  {
-    if (serviceHandle==null)
-    {
-      throw new Error("Implementation error: No service handle for this Jws2 service.");
-    }
-    attachWSMenuEntry(wsmenu, serviceHandle, alignFrame);
-  }*/
+   * Jws2Instance serviceHandle; (non-Javadoc)
+   * 
+   * @see jalview.ws.WSMenuEntryProviderI#attachWSMenuEntry(javax.swing.JMenu,
+   * jalview.gui.AlignFrame)
+   * 
+   * @Override public void attachWSMenuEntry(JMenu wsmenu, AlignFrame
+   * alignFrame) { if (serviceHandle==null) { throw new
+   * Error("Implementation error: No service handle for this Jws2 service."); }
+   * attachWSMenuEntry(wsmenu, serviceHandle, alignFrame); }
+   */
   /**
    * add the menu item for a particular jws2 service instance
+   * 
    * @param wsmenu
    * @param service
    * @param alignFrame
    */
-  abstract void attachWSMenuEntry(JMenu wsmenu,
-          final Jws2Instance service, final AlignFrame alignFrame);
+  abstract void attachWSMenuEntry(JMenu wsmenu, final Jws2Instance service,
+          final AlignFrame alignFrame);
 
 }
index 8e29817..e56a5e5 100644 (file)
@@ -179,9 +179,10 @@ public class Jws2Discoverer implements Runnable, WSMenuEntryProviderI
     }
     System.out.println("Discovered service: " + jwsservers + " "
             + srv.toString());
-    Jws2Instance service = new Jws2Instance(jwsservers, srv.toString(), service2);
+    Jws2Instance service = new Jws2Instance(jwsservers, srv.toString(),
+            service2);
 
-    services.add(service); 
+    services.add(service);
     // retrieve the presets and parameter set and cache now
     service.getParamStore().getPresets();
     service.hasParameters();
@@ -299,22 +300,25 @@ public class Jws2Discoverer implements Runnable, WSMenuEntryProviderI
     public String getUri()
     {
       // this is only valid for Jaba 1.0 - this formula might have to change!
-      return hosturl+(hosturl.lastIndexOf("/")==(hosturl.length()-1) ? "/" : "") +serviceType;
+      return hosturl
+              + (hosturl.lastIndexOf("/") == (hosturl.length() - 1) ? "/"
+                      : "") + serviceType;
     }
-    private boolean hasParams=false,lookedForParams=false;
+
+    private boolean hasParams = false, lookedForParams = false;
 
     public boolean hasParameters()
     {
       if (!lookedForParams)
       {
-        lookedForParams=true;
-      try
-      {
-        hasParams = (getRunnerConfig().getArguments().size() > 0);
-      } catch (Exception e)
-      {
+        lookedForParams = true;
+        try
+        {
+          hasParams = (getRunnerConfig().getArguments().size() > 0);
+        } catch (Exception e)
+        {
 
-      }
+        }
       }
       return hasParams;
     }
@@ -383,7 +387,7 @@ public class Jws2Discoverer implements Runnable, WSMenuEntryProviderI
 
     });
     wsmenu.add(jws2al);
-    
+
   }
 
   private void populateWSMenuEntry(JMenu jws2al, final AlignFrame alignFrame)
@@ -402,7 +406,7 @@ public class Jws2Discoverer implements Runnable, WSMenuEntryProviderI
     MsaWSClient msacl = new MsaWSClient();
     Vector hostLabels = new Vector();
     jws2al.removeAll();
-    String lasthost=null;
+    String lasthost = null;
     for (final Jws2Instance service : services)
     {
       atpoint = jws2al;
@@ -424,22 +428,27 @@ public class Jws2Discoverer implements Runnable, WSMenuEntryProviderI
           atpoint.setToolTipText(service.getActionText());
         }
       }
-      if (!byhost && !hostLabels.contains(host + service.serviceType+service.getActionText()))
-              //!hostLabels.contains(host + (bytype ? service.serviceType+service.getActionText() : "")))
+      if (!byhost
+              && !hostLabels.contains(host + service.serviceType
+                      + service.getActionText()))
+      // !hostLabels.contains(host + (bytype ?
+      // service.serviceType+service.getActionText() : "")))
       {
         // add a marker indicating where this service is hosted
         // relies on services from the same host being listed in a contiguous
         // group
         JMenuItem hitm;
         atpoint.addSeparator();
-        if (lasthost==null || !lasthost.equals(host))
+        if (lasthost == null || !lasthost.equals(host))
         {
           atpoint.add(hitm = new JMenuItem(host));
           hitm.setForeground(Color.blue);
           lasthost = host;
         }
-        hostLabels.addElement(host + service.serviceType+service.getActionText() );
-        // hostLabels.addElement(host + (bytype ? service.serviceType+service.getActionText() : ""));
+        hostLabels.addElement(host + service.serviceType
+                + service.getActionText());
+        // hostLabels.addElement(host + (bytype ?
+        // service.serviceType+service.getActionText() : ""));
       }
       msacl.attachWSMenuEntry(atpoint, service, alignFrame);
       /*
index f3c385a..ea91d63 100644 (file)
@@ -274,18 +274,19 @@ public class MsaWSClient extends Jws2Client
     boolean hasparams = service.hasParameters();
     do
     {
-      String action="Align ";
+      String action = "Align ";
       if (submitGaps == true)
       {
-        action="Realign ";
+        action = "Realign ";
         msawsmenu = new JMenu("Realign with " + svcname);
-        msawsmenu.setToolTipText("Align sequences to an existing alignment");
+        msawsmenu
+                .setToolTipText("Align sequences to an existing alignment");
         rmsawsmenu.add(msawsmenu);
       }
       final boolean withGaps = submitGaps;
 
       JMenuItem method = new JMenuItem(calcName + "Defaults");
-      method.setToolTipText(action+"with default settings");
+      method.setToolTipText(action + "with default settings");
 
       method.addActionListener(new ActionListener()
       {
@@ -301,7 +302,8 @@ public class MsaWSClient extends Jws2Client
       msawsmenu.add(method);
       if (hasparams)
       {
-        // only add these menu options if the service has user-modifiable arguments
+        // only add these menu options if the service has user-modifiable
+        // arguments
         method = new JMenuItem(calcName + "Edit and run ...");
         method.setToolTipText("View and change the parameters before alignment.");
 
index f66027d..1f76462 100644 (file)
@@ -28,15 +28,17 @@ import compbio.metadata.*;
 
 public class ParameterUtils
 {
-  public static List<String> writeParameterSet(List<Option> optSet, String pseparator)
+  public static List<String> writeParameterSet(List<Option> optSet,
+          String pseparator)
   {
     List<String> pset = new ArrayList<String>();
-    for (Option o:optSet)
+    for (Option o : optSet)
     {
       pset.add(o.toCommand(pseparator));
     }
     return pset;
   }
+
   /**
    * Converts options supplied via parameters file into {@code Option} objects
    * (Refactored from compbio.ws.client.Jws2Client)
@@ -48,11 +50,11 @@ public class ParameterUtils
    * @return List of Options of type T
    * 
    */
-/*  @SuppressWarnings(value =
-  { "true" })
-  public static <T> List<Option<T>> processParameters(List<String> params,
-          RunnerConfig<T> options, String pseparator)
-  */
+  /*
+   * @SuppressWarnings(value = { "true" }) public static <T> List<Option<T>>
+   * processParameters(List<String> params, RunnerConfig<T> options, String
+   * pseparator)
+   */
   public static List<Option> processParameters(List<String> params,
           RunnerConfig options, String pseparator)
   {
@@ -85,7 +87,8 @@ public class ParameterUtils
       {
         try
         {
-          o.setDefaultValue(isParameter(param, pseparator) ? getParamValue(param, pseparator) : param);
+          o.setDefaultValue(isParameter(param, pseparator) ? getParamValue(
+                  param, pseparator) : param);
         } catch (WrongParameterException e)
         {
           System.out.println("Problem setting value for the parameter: "
@@ -97,7 +100,6 @@ public class ParameterUtils
     }
     return chosenOptions;
   }
-  
 
   static String getParamName(String fullName, String pseparator)
   {
index 7090b43..be4912b 100644 (file)
@@ -74,12 +74,14 @@ public class JabaOption implements jalview.ws.params.OptionI
   @Override
   public void setDefaultValue(String selectedItem)
   {
-    try {
+    try
+    {
       opt.setDefaultValue(selectedItem);
     } catch (Exception e)
     {
       e.printStackTrace();
-      throw new Error("Implementation error: cannot set Jaba Option to a value outside its allowed value range!");
+      throw new Error(
+              "Implementation error: cannot set Jaba Option to a value outside its allowed value range!");
     }
   }
 
@@ -90,12 +92,14 @@ public class JabaOption implements jalview.ws.params.OptionI
   }
 
   /**
-   * get the underlying Jaba option or parameter object. Note - use copy first if you want to modify the value of the option.
+   * get the underlying Jaba option or parameter object. Note - use copy first
+   * if you want to modify the value of the option.
+   * 
    * @return
    */
   public Option getOption()
   {
     return opt;
   }
-  
+
 }
index d269ca1..36abdcc 100644 (file)
@@ -30,16 +30,19 @@ public class JabaParameter extends JabaOption implements ParameterI
   public JabaParameter(Parameter rg)
   {
     super(rg);
-    
+
   }
 
   @Override
   public ValueConstrainI getValidValue()
   {
-    ValueConstrain vc =((Parameter) opt).getValidValue();
-    if (vc==null){
+    ValueConstrain vc = ((Parameter) opt).getValidValue();
+    if (vc == null)
+    {
       return null;
-    } else {
+    }
+    else
+    {
       return new JabaValueConstrain(vc);
     }
   }
@@ -47,6 +50,6 @@ public class JabaParameter extends JabaOption implements ParameterI
   @Override
   public ParameterI copy()
   {
-    return new JabaParameter(ParameterUtils.copyParameter((Parameter)opt));
+    return new JabaParameter(ParameterUtils.copyParameter((Parameter) opt));
   }
 }
index d9a2968..f3e3930 100644 (file)
@@ -25,7 +25,8 @@ import jalview.ws.params.ValueConstrainI;
 public class JabaValueConstrain implements ValueConstrainI
 {
 
-  ValueConstrain vc=null;
+  ValueConstrain vc = null;
+
   public JabaValueConstrain(ValueConstrain vc)
   {
     this.vc = vc;
index 860192c..2f42838 100644 (file)
@@ -20,8 +20,11 @@ package jalview.ws.params;
 public interface ArgumentI
 {
   String getName();
-  // TODO: rename setDefaultValue to setValue - to make it more semantically obvious what it means!
+
+  // TODO: rename setDefaultValue to setValue - to make it more semantically
+  // obvious what it means!
   String getDefaultValue();
+
   void setDefaultValue(String selectedItem);
 
 }
index c1ad917..f908f4d 100644 (file)
@@ -33,6 +33,4 @@ public interface OptionI extends ArgumentI
 
   OptionI copy();
 
-
-
 }
index a263bf1..77647d4 100644 (file)
@@ -34,8 +34,8 @@ public interface ParamDatastoreI
   public void deletePreset(String name);
 
   /**
-   * writes or overwrites the record for a modifiable WsParamSetI entry with a given name in the
-   * datastore.
+   * writes or overwrites the record for a modifiable WsParamSetI entry with a
+   * given name in the datastore.
    * 
    * @param presetName
    * @param text
@@ -47,14 +47,16 @@ public interface ParamDatastoreI
           List<ArgumentI> jobParams);
 
   /**
-   * update an existing instance with a new name, descriptive text and parameters.
+   * update an existing instance with a new name, descriptive text and
+   * parameters.
+   * 
    * @param oldName
    * @param presetName
    * @param text
    * @param jobParams
    */
   public void updatePreset(String oldName, String presetName, String text,
-           List<ArgumentI> jobParams);
+          List<ArgumentI> jobParams);
 
   /**
    * factory method - builds a service specific parameter object using the given
index b21ead4..5de608b 100644 (file)
@@ -20,39 +20,52 @@ package jalview.ws.params;
 import jalview.ws.jws2.dm.JabaWsParamSet;
 
 /**
- * Interface implemented by classes for maintaining user's parameters in a Jalview session
+ * Interface implemented by classes for maintaining user's parameters in a
+ * Jalview session
+ * 
  * @author JimP
- *
+ * 
  */
 public interface ParamManager
 {
   /**
    * 
-   * @param name (may be null) select parameter sets with given name
-   * @param serviceUrl (may be null) select parameter sets that are applicable for the given URL
-   * @param modifiable - if true, return modifiable parameter sets
-   * @param unmodifiable - if true, return server presets
+   * @param name
+   *          (may be null) select parameter sets with given name
+   * @param serviceUrl
+   *          (may be null) select parameter sets that are applicable for the
+   *          given URL
+   * @param modifiable
+   *          - if true, return modifiable parameter sets
+   * @param unmodifiable
+   *          - if true, return server presets
    * @return null if no parameters found, or one or more parameter sets
    */
-  public WsParamSetI[] getParameterSet(String name, String serviceUrl, boolean modifiable,boolean unmodifiable);
+  public WsParamSetI[] getParameterSet(String name, String serviceUrl,
+          boolean modifiable, boolean unmodifiable);
+
   /**
-   * save the given parameter set in the user's parameter set database.
-   * Note: this may result in a modal dialog box being raised.
+   * save the given parameter set in the user's parameter set database. Note:
+   * this may result in a modal dialog box being raised.
+   * 
    * @param parameterSet
    */
   public void storeParameterSet(WsParamSetI parameterSet);
+
   /**
-   * delete the specified parameter set from the database.
-   * Note: this may result in a modal dialog box being raised.
+   * delete the specified parameter set from the database. Note: this may result
+   * in a modal dialog box being raised.
+   * 
    * @param parameterSet
    */
   public void deleteParameterSet(WsParamSetI parameterSet);
+
   /**
    * register a parser for the given host url
+   * 
    * @param hosturl
    * @param jabaParamStore
    */
   public void registerParser(String hosturl, ParamDatastoreI paramdataStore);
-  
 
 }
index 6a72d12..6e69d56 100644 (file)
@@ -28,5 +28,4 @@ public interface ParameterI extends OptionI
 
   ParameterI copy();
 
-
 }
index b460c7b..fa24ba0 100644 (file)
@@ -21,7 +21,7 @@ import compbio.metadata.ValueConstrain.Type;
 
 /**
  * @author JimP
- *
+ * 
  */
 public interface ValueConstrainI
 {
index 3f0fec3..781aa0d 100644 (file)
@@ -21,47 +21,59 @@ import java.util.List;
 
 /**
  * A web service parameter set
- *
+ * 
  */
 public interface WsParamSetI
 {
   /**
    * Human readable name for parameter set
+   * 
    * @return unique string (given applicable URLs)
    */
   public String getName();
+
   /**
    * @return notes about this parameter set
    */
   public String getDescription();
+
   /**
    * the service endpoints for which this parameter set is valid
+   * 
    * @return one or more URLs
    */
   public String[] getApplicableUrls();
+
   /**
    * 
    * @return null, or the file used to store this parameter set.
    */
   public String getSourceFile();
-  
+
   /**
    * set the filename used to store this parameter set.
-   * @newfile 
+   * 
+   * @newfile
    */
   public void setSourceFile(String newfile);
+
   /**
    * is this a preset or a user modifiable parameter set
+   * 
    * @return true if set can be modified
    */
   public boolean isModifiable();
+
   /**
    * 
    * @return arguments in preset
    */
-  List<ArgumentI> getArguments(); 
+  List<ArgumentI> getArguments();
+
   /**
-   * set the arguments for the preset. Should this preset instance be unmodifiable, an Error should be thrown.
+   * set the arguments for the preset. Should this preset instance be
+   * unmodifiable, an Error should be thrown.
+   * 
    * @param args
    */
   public void setArguments(List<ArgumentI> args);
index db20b00..5855186 100644 (file)
@@ -217,12 +217,12 @@ public class UPEntry implements java.io.Serializable
                     .equals(other.getUPI())))\r
             && ((this.identicalCrossReferences == null && other\r
                     .getIdenticalCrossReferences() == null) || (this.identicalCrossReferences != null && java.util.Arrays\r
-                    .equals(this.identicalCrossReferences, other\r
-                            .getIdenticalCrossReferences())))\r
+                    .equals(this.identicalCrossReferences,\r
+                            other.getIdenticalCrossReferences())))\r
             && ((this.logicalCrossReferences == null && other\r
                     .getLogicalCrossReferences() == null) || (this.logicalCrossReferences != null && java.util.Arrays\r
-                    .equals(this.logicalCrossReferences, other\r
-                            .getLogicalCrossReferences())))\r
+                    .equals(this.logicalCrossReferences,\r
+                            other.getLogicalCrossReferences())))\r
             && ((this.sequence == null && other.getSequence() == null) || (this.sequence != null && this.sequence\r
                     .equals(other.getSequence())))\r
             && ((this.timestamp == null && other.getTimestamp() == null) || (this.timestamp != null && this.timestamp\r
index e37d77f..0091add 100644 (file)
@@ -273,8 +273,7 @@ public class AccessionMapperBindingStub extends org.apache.axis.client.Stub
             Boolean.FALSE);\r
     _call.setProperty(org.apache.axis.AxisEngine.PROP_DOMULTIREFS,\r
             Boolean.FALSE);\r
-    _call\r
-            .setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);\r
+    _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);\r
     _call.setOperationName(new javax.xml.namespace.QName(\r
             "http://www.ebi.ac.uk/picr/AccessionMappingService",\r
             "getUPIForSequence"));\r
@@ -322,8 +321,7 @@ public class AccessionMapperBindingStub extends org.apache.axis.client.Stub
             Boolean.FALSE);\r
     _call.setProperty(org.apache.axis.AxisEngine.PROP_DOMULTIREFS,\r
             Boolean.FALSE);\r
-    _call\r
-            .setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);\r
+    _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);\r
     _call.setOperationName(new javax.xml.namespace.QName(\r
             "http://www.ebi.ac.uk/picr/AccessionMappingService",\r
             "getUPIForAccession"));\r
@@ -368,8 +366,7 @@ public class AccessionMapperBindingStub extends org.apache.axis.client.Stub
             Boolean.FALSE);\r
     _call.setProperty(org.apache.axis.AxisEngine.PROP_DOMULTIREFS,\r
             Boolean.FALSE);\r
-    _call\r
-            .setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);\r
+    _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);\r
     _call.setOperationName(new javax.xml.namespace.QName(\r
             "http://www.ebi.ac.uk/picr/AccessionMappingService",\r
             "getMappedDatabaseNames"));\r