*/
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
// 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);
}
}
- newAlignFrame.newStructureView(applet, pdb, seqs, chains, protocol);
-
+ newAlignFrame.newStructureView(applet, pdb, seqs, chains,
+ protocol);
+
}
}
}
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;
}
+ */
}