+
+ /**
+ * 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)
+ {
+ return alFrame.addPdbFile(sequenceId, pdbEntryString, pdbFile);
+ }
+
+ protected void setAlignPdbStructures(boolean alignPdbStructures)
+ {
+ this.alignPdbStructures = alignPdbStructures;
+ }
+
+ public boolean isAlignPdbStructures()
+ {
+ return alignPdbStructures;
+ }
+
+ /**
+ * get all components associated with the applet of the given type
+ * @param class1
+ * @return
+ */
+ public Vector getAppletWindow(Class class1)
+ {
+ Vector wnds = new Vector();
+ Component[] cmp = getComponents();
+ if (cmp!=null)
+ {
+ for (int i=0;i<cmp.length;i++)
+ {
+ 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)
+ *
+ * @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)
+ {
+
+ if (sequenceIds != null && sequenceIds.length() > 0)
+ {
+ return alFrame.addStructureViewInstance(viewer,
+ separatorListToArray(sequenceIds));
+ }
+ else
+ {
+ return alFrame.addStructureViewInstance(viewer, null);
+ }
+ // return null;
+ }
+ */