From e1a2bb8c2129346c0c1307604a4d3c2a604bf3b8 Mon Sep 17 00:00:00 2001 From: jprocter Date: Wed, 25 Aug 2010 14:13:22 +0000 Subject: [PATCH] excluded methods related to broken Jmol applet binding mechanism (JAL-621) --- src/jalview/bin/JalviewLite.java | 101 +++++++++++++++++++++++++------------- 1 file changed, 67 insertions(+), 34 deletions(-) diff --git a/src/jalview/bin/JalviewLite.java b/src/jalview/bin/JalviewLite.java index 90092b6..0e77f02 100755 --- a/src/jalview/bin/JalviewLite.java +++ b/src/jalview/bin/JalviewLite.java @@ -17,18 +17,35 @@ */ package jalview.bin; -import java.applet.*; - -import java.awt.*; -import java.awt.event.*; +import jalview.api.SequenceStructureBinding; +import jalview.appletgui.AlignFrame; +import jalview.appletgui.EmbmenuFrame; +import jalview.appletgui.FeatureSettings; +import jalview.datamodel.Alignment; +import jalview.datamodel.PDBEntry; +import jalview.datamodel.Sequence; +import jalview.datamodel.SequenceI; +import jalview.io.AnnotationFile; +import jalview.io.AppletFormatAdapter; +import jalview.io.FileParse; +import jalview.io.IdentifyFile; +import jalview.io.JnetAnnotationMaker; + +import java.applet.Applet; +import java.awt.Button; +import java.awt.Color; +import java.awt.Font; +import java.awt.Frame; +import java.awt.Graphics; +import java.awt.event.ActionEvent; +import java.awt.event.WindowAdapter; +import java.awt.event.WindowEvent; import java.io.BufferedReader; import java.io.InputStreamReader; -import java.util.*; - -import jalview.api.SequenceStructureBinding; -import jalview.appletgui.*; -import jalview.datamodel.*; -import jalview.io.*; +import java.lang.reflect.Method; +import java.util.Enumeration; +import java.util.StringTokenizer; +import java.util.Vector; /** * Jalview Applet. Runs in Java 1.18 runtime @@ -956,7 +973,7 @@ public class JalviewLite extends Applet // the local pdb file was identified in the class loader protocol = AppletFormatAdapter.URL; // this is probably NOT // CORRECT! - param = addProtocol(param); // + param = addProtocol(param); // } pdb.setFile(param); @@ -982,8 +999,9 @@ public class JalviewLite extends Applet } } - newAlignFrame.newStructureView(applet, pdb, seqs, chains, protocol); - + newAlignFrame.newStructureView(applet, pdb, seqs, chains, + protocol); + } } @@ -1284,38 +1302,53 @@ public class JalviewLite extends Applet } return false; } + /** - * bind a pdb file to a sequence in the given alignFrame. - * @param alFrame - null or specific alignFrame. This specifies the dataset that will be searched for a seuqence called sequenceId - * @param sequenceId - sequenceId within the dataset. - * @param pdbEntryString - the short name for the PDB file - * @param pdbFile - pdb file - either a URL or a valid PDB file. - * @return true if binding was as success - * TODO: consider making an exception structure for indicating when PDB parsing or seqeunceId location fails. + * bind a pdb file to a sequence in the given alignFrame. + * + * @param alFrame + * - null or specific alignFrame. This specifies the dataset that + * will be searched for a seuqence called sequenceId + * @param sequenceId + * - sequenceId within the dataset. + * @param pdbEntryString + * - the short name for the PDB file + * @param pdbFile + * - pdb file - either a URL or a valid PDB file. + * @return true if binding was as success TODO: consider making an exception + * structure for indicating when PDB parsing or seqeunceId location + * fails. */ - public boolean addPdbFile(AlignFrame alFrame, String sequenceId, String pdbEntryString, String pdbFile) + public boolean addPdbFile(AlignFrame alFrame, String sequenceId, + String pdbEntryString, String pdbFile) { return alFrame.addPdbFile(sequenceId, pdbEntryString, pdbFile); } + + /** - * bind structures in a viewer to any matching sequences in an alignFrame (use sequenceIds to limit scope of search to specific sequences) + * bind structures in a viewer to any matching sequences in an alignFrame (use + * sequenceIds to limit scope of search to specific sequences) + * * @param alFrame * @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) + * @return TODO: consider making an exception structure for indicating when + * binding fails + public SequenceStructureBinding addStructureViewInstance( + AlignFrame alFrame, Object viewer, String sequenceIds) { - if (viewer!=null) + + if (sequenceIds != null && sequenceIds.length() > 0) { - if (sequenceIds!=null && sequenceIds.length()>0) - { - return alFrame.addStructureViewInstance(viewer, separatorListToArray(sequenceIds)); - } else { - return alFrame.addStructureViewInstance(viewer, null); - } + return alFrame.addStructureViewInstance(viewer, + separatorListToArray(sequenceIds)); } - return null; + else + { + return alFrame.addStructureViewInstance(viewer, null); + } + // return null; } + */ } -- 1.7.10.2