ScalePanel scalePanel;\r
ScorePanel scorePanel;\r
\r
- public boolean groupEdit = false;\r
-\r
public AlignmentPanel(AlignFrame af, AlignViewport av)\r
{\r
alignFrame = af;\r
\r
hscroll.addAdjustmentListener(this);\r
vscroll.addAdjustmentListener(this);\r
- selectAll(false);\r
\r
addComponentListener(new ComponentAdapter()\r
{\r
RefreshPanels();\r
}\r
});\r
-\r
}\r
\r
- public int countSelected()\r
- {\r
- return av.getSelection().size();\r
- }\r
+ public void highlightSearchResults(int [] results)\r
+ {\r
+ seqPanel.seqCanvas.highlightSearchResults( results );\r
+\r
+ // do we need to scroll the panel?\r
+ if(av.getStartSeq()>results[0] || av.getEndSeq()<results[0] || av.getStartRes()>results[1] || av.getEndRes()<results[2])\r
+ setScrollValues(results[1], results[0]);\r
+\r
+\r
+ }\r
\r
- public void selectAll(boolean flag) {\r
- int i = 0;\r
- if (flag) {\r
- while (i < av.getAlignment().getHeight()) {\r
- if (! av.getSelection().contains(av.getAlignment().getSequenceAt(i))) {\r
- av.getSelection().addElement(av.getAlignment().getSequenceAt(i));\r
- }\r
- i++;\r
- }\r
- } else {\r
- av.getSelection().clear();\r
- }\r
- }\r
\r
public OverviewPanel getOverviewPanel()\r
{\r
\r
public void setWrapAlignment(boolean wrap)\r
{\r
-\r
scalePanelHolder.setVisible(!wrap);\r
scorePanelHolder.setVisible(!wrap);\r
\r
hscroll.setVisible(!wrap);\r
idSpaceFillerPanel.setVisible(!wrap);\r
idSpaceFillerPanel1.setVisible(!wrap);\r
-\r
}\r
\r
\r
{\r
invalidate();\r
validate();\r
+ seqPanel.seqCanvas.paintFlag = true;\r
idPanel.idCanvas.paintFlag = true;\r
idPanelHolder.setPreferredSize( idPanel.idCanvas.getPreferredSize() );\r
- seqPanel.seqCanvas.paintFlag = true;\r
setScrollValues(av.getStartRes(), av.getStartSeq());\r
av.getConsensus(true);\r
repaint();\r
\r
hscroll.setValues(x,hextent,0,av.getAlignment().getWidth());\r
vscroll.setValues(y,vextent,0,av.getAlignment().getHeight() );\r
- seqPanel.seqCanvas.paintFlag = true;\r
repaint();\r
\r
}\r
if(overviewPanel!=null)\r
overviewPanel.setBoxPosition();\r
\r
-\r
+ seqPanel.seqCanvas.paintFlag=true;\r
repaint();\r
}\r
\r