// the given location the top left hand corner for given current view (v2.7)
public void scrollViewToIn(AlignFrame alf, String topRow, String leftHandColumn)
+// adjust horizontal scroll in alf to the make
+// the given location the left hand corner for given current view (v2.7)
+public void scrollViewToColumnIn(AlignFrame alf, String leftHandColumn)
+
+// adjust horizontal/vertical scroll in alf to the make
+// the given location the top row for given current view (v2.7)
+public void scrollViewToRowIn(AlignFrame alf, String topRow)
+
// return separator separated list of feature groups
// on the current alignment
var frid = "";\r
for (frm in frames) {\r
try {\r
- frid = (("" + source.getDatasetId()) == ("" + frames[frm]\r
- .getDatasetId()));\r
+ frid = (source!=null) && (("" + source.getSequenceSetId()) == ("" + frames[frm].currentAlignFrame\r
+ .getSequenceSetId()));\r
} catch (q) {\r
- }\r
- ;\r
+ };\r
+ \r
if (!frames[frm].equals(source) && !frid\r
&& !frames[frm].currentAlignFrame.equals(source)) {\r
frms[frms.length] = frames[frm];\r
// try { applet.setViewListener("viewlist"); } catch (err) {};\r
if (jmolView)\r
{\r
+ var sep = applet.getSeparator();\r
var oldjm=jmolView;\r
// recover full id of Jmol applet\r
jmolView=_jmolGetApplet(jmolView).id;\r
mtf="";\r
var dbase = document.baseURI.substring(0,document.baseURI.lastIndexOf("/")+1);\r
for (m in jmbinding._modelstofiles)\r
- { mtf+=jmbinding._modelstofiles[m];\r
+ { if (m>0) { mtf+=sep; }\r
+ mtf+=jmbinding._modelstofiles[m];\r
if (jmbinding._modelstofiles[m].indexOf("//")==-1)\r
- { jmbinding._fullmpath[m] = dbase+jmbinding._modelstofiles[m]; }\r
- jmbinding._filetonum.put(jmbinding._modelstofiles[m], m);\r
- jmbinding._filetonum.put(jmbinding._fullmpath[m], m);\r
+ { jmbinding._fullmpath[m] = dbase+((jmbinding._modelstofiles[m].indexOf("/")==0) ? jmbinding._modelstofiles[m].substring(1) : jmbinding._modelstofiles[m]); }\r
+ jmbinding._filetonum.put(jmbinding._modelstofiles[m], m+1); \r
+ jmbinding._filetonum.put(jmbinding._fullmpath[m], m+1);\r
\r
- if (m>0) { mtf+=sep; }}\r
- jvfollower.setStructureListener("_structure", mtf);\r
+ }\r
+ applet.setStructureListener("_structure", mtf);\r
}\r
}\r
\r
// relaxed third parameter - may be null or a model number for multi model\r
// views\r
atomlabel = ("" + atomlabel)\r
- .match(/\[(.+)\](\d+):(.)\.(\S+)\s*(\/\d+\.|).+/);\r
+ .match(/\[(.+)\](\d+):(.)\.([^\/]+)(\/\d+\.|).+/);\r
atomidx = "" + atomidx;\r
if (atomlabel[5]) {\r
atomlabel[5] = atomlabel[5].match(/\/(.+)\./)[1];\r
+ atomlabel[5] = parseInt(atomlabel[5])-1;\r
} else {\r
// default - first model\r
atomlabel[5] = 0;\r
_jvapps[ap].mouseOverStructure(atomlabel[2], atomlabel[3],\r
document.baseURI\r
.substring(0, document.baseURI.lastIndexOf('/'))\r
- + "/" + modeltofiles[atomlabel[5]]);\r
+ + "/" + \r
+ modeltofiles[atomlabel[5]]);\r
msg = _jmolhovermsg;\r
}\r
}\r
{\r
alignPanel.seqPanel.scrollTo(row, column); \r
}\r
+ public void scrollToRow(int row)\r
+ {\r
+ alignPanel.seqPanel.scrollToRow(row); \r
+ }\r
+ public void scrollToColumn(int column)\r
+ {\r
+ alignPanel.seqPanel.scrollToColumn(column); \r
+ }\r
+ /**\r
+ * @return the alignments unique ID.\r
+ */\r
+ public String getSequenceSetId() {\r
+ return viewport.getSequenceSetId();\r
+ }\r
}\r
}
if (repaint)
{
+ ap.scalePanelHolder.repaint();
ap.repaint();
- //ap.paintAlignment(false);
}
}
column = column<0 ? ap.av.startRes : column;
ap.scrollTo(row, row, column, true, true);
}
+ /**
+ * scroll to the given row - or nearest visible location
+ * @param row
+ */
+ public void scrollToRow(int row)
+ {
+
+ row = row<0 ? ap.av.startSeq : row;
+ ap.scrollTo(row, row, ap.av.startRes, true, true);
+ }
+ /**
+ * scroll to the given column - or nearest visible location
+ * @param column
+ */
+ public void scrollToColumn(int column)
+ {
+
+ column = column<0 ? ap.av.startRes : column;
+ ap.scrollTo(ap.av.startRes, ap.av.startRes, column, true, true);
+ }
}
public class JalviewLite extends Applet implements StructureSelectionManagerProvider, JalviewLiteJsApi\r
{\r
\r
+ public StructureSelectionManager getStructureSelectionManager()\r
+ {\r
+ return StructureSelectionManager.getStructureSelectionManager(this);\r
+ }\r
// /////////////////////////////////////////\r
// The following public methods maybe called\r
// externally, eg via javascript in HTML page\r
\r
} catch (Exception ex)\r
{\r
- System.err.println("Couldn't parse integer arguments (topRow='"+topRow+"' and leftHandColumn='"+leftHandColumn+"'");\r
+ System.err.println("Couldn't parse integer arguments (topRow='"+topRow+"' and leftHandColumn='"+leftHandColumn+"')");\r
+ ex.printStackTrace();\r
+ }\r
+ }\r
+\r
+ /* (non-Javadoc)\r
+ * @see jalview.javascript.JalviewLiteJsApi#scrollViewToRowIn(jalview.appletgui.AlignFrame, java.lang.String)\r
+ */\r
+ @Override\r
+ public void scrollViewToRowIn(AlignFrame alf, String topRow)\r
+ {\r
+ try {\r
+ alf.scrollToRow(new Integer(topRow).intValue());\r
+ \r
+ } catch (Exception ex)\r
+ {\r
+ System.err.println("Couldn't parse integer arguments (topRow='"+topRow+"')");\r
ex.printStackTrace();\r
}\r
}\r
\r
+ /* (non-Javadoc)\r
+ * @see jalview.javascript.JalviewLiteJsApi#scrollViewToColumnIn(jalview.appletgui.AlignFrame, java.lang.String)\r
+ */\r
+ @Override\r
+ public void scrollViewToColumnIn(AlignFrame alf, String leftHandColumn)\r
+ {\r
+\r
+ try {\r
+ alf.scrollToColumn(new Integer(leftHandColumn).intValue());\r
+ \r
+ } catch (Exception ex)\r
+ {\r
+ System.err.println("Couldn't parse integer arguments (leftHandColumn='"+leftHandColumn+"')");\r
+ ex.printStackTrace();\r
+ } \r
+ }\r
+\r
// //////////////////////////////////////////////\r
// //////////////////////////////////////////////\r
\r
String pdbEntryString, String pdbFile);
/**
- * adjust horizontal/vertical scroll to the make the given location the top left hand corner for given current view
+ * adjust horizontal/vertical scroll to make the given location the top left hand corner for the given view
*
* @param alf
* @param topRow
*/
public abstract void scrollViewToIn(AlignFrame alf, String topRow,
String leftHandColumn);
+ /**
+ * adjust vertical scroll to make the given row the top one for given view
+ *
+ * @param alf
+ * @param topRow
+ */
+ public abstract void scrollViewToRowIn(AlignFrame alf, String topRow);
+ /**
+ * adjust horizontal scroll to make the given column the left one in the given view
+ *
+ * @param alf
+ * @param leftHandColumn
+ */
+ public abstract void scrollViewToColumnIn(AlignFrame alf, String leftHandColumn);
/**
*