tmp.startCol = seqcanvas.getSequenceRenderer().\r
getResidueBoxColour( sequence, index);\r
\r
- // tmp.startCol = seqcanvas.getFeatureRenderer().\r
- // findFeatureColour(tmp.startCol, sequence, index);\r
+ tmp.startCol = seqcanvas.getFeatureRenderer().\r
+ findFeatureColour(tmp.startCol, sequence, index);\r
}\r
}\r
\r
{\r
tmp.endCol = seqcanvas.getSequenceRenderer().\r
getResidueBoxColour( sequence, index);\r
- // tmp.endCol = seqcanvas.getFeatureRenderer().\r
- // findFeatureColour(tmp.endCol, sequence, index);\r
+ tmp.endCol = seqcanvas.getFeatureRenderer().\r
+ findFeatureColour(tmp.endCol, sequence, index);\r
}\r
}\r
}\r
\r
void highlightSeqcanvas(int pos)\r
{\r
- int index = seqcanvas.getViewport().getAlignment().findIndex(sequence);\r
-\r
- int size = pos==-1?0:3;\r
-\r
- if(highlightRes!=null)\r
- size += highlightRes.size()*3;\r
-\r
- int [] array = new int[size];\r
- int i=0;\r
+ SearchResults searchResults = new SearchResults();\r
if(highlightRes!=null)\r
{\r
- for (i = 0; i < highlightRes.size(); i++)\r
+ for (int i = 0; i < highlightRes.size(); i++)\r
{\r
int a = Integer.parseInt(highlightRes.elementAt(\r
i).toString())+1;\r
- array[i * 3] = index;\r
- array[ (i * 3) + 1] = a;\r
- array[ (i * 3) + 2] = a;\r
+\r
+ searchResults.addResult(sequence, a, a);\r
}\r
}\r
\r
if(pos!=-1)\r
{\r
- array[i * 3] = index;\r
- array[i * 3 + 1] = pos+1;\r
- array[i * 3 + 2] = pos+1;\r
+ searchResults.addResult(sequence, pos+1, pos+1);\r
}\r
\r
- seqcanvas.highlightSearchResults(array);\r
+ seqcanvas.highlightSearchResults(searchResults);\r
}\r
\r
\r
if (highlightRes == null)\r
highlightRes = new Vector();\r
\r
- if (highlightRes.contains(fatom.alignmentMapping+"" + ""))\r
+ if (highlightRes.contains(fatom.alignmentMapping+""))\r
highlightRes.remove(fatom.alignmentMapping + "");\r
else\r
highlightRes.add(fatom.alignmentMapping + "");\r
\r
void highlightSeqcanvas(int pos)\r
{\r
- int index = seqcanvas.getViewport().getAlignment().findIndex(sequence);\r
-\r
- int size = pos==-1?0:3;\r
-\r
- if(highlightRes!=null)\r
- size += highlightRes.size()*3;\r
-\r
- int [] array = new int[size];\r
- int i=0;\r
+ SearchResults searchResults = new SearchResults();\r
if(highlightRes!=null)\r
{\r
- for (i = 0; i < highlightRes.size(); i++)\r
+ for (int i = 0; i < highlightRes.size(); i++)\r
{\r
int a = Integer.parseInt(highlightRes.elementAt(\r
i).toString())+1;\r
- array[i * 3] = index;\r
- array[ (i * 3) + 1] = a;\r
- array[ (i * 3) + 2] = a;\r
+\r
+ searchResults.addResult(sequence, a, a);\r
}\r
}\r
\r
if(pos!=-1)\r
{\r
- array[i * 3] = index;\r
- array[i * 3 + 1] = pos+1;\r
- array[i * 3 + 2] = pos+1;\r
+ searchResults.addResult(sequence, pos+1, pos+1);\r
}\r
\r
- seqcanvas.highlightSearchResults(array);\r
+ seqcanvas.highlightSearchResults(searchResults);\r
}\r
\r
\r