public boolean jmolAvailable = false;
- private boolean alignPdbStructures=false;
+ private boolean alignPdbStructures = false;
public static boolean debug = false;
}
}
/*
- * <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">
*
* <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)
}
}
}
-
- 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];
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
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++)
{
}
/**
- * 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
*/
{
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)
* @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; }
*/
}