public int width;\r
public int lastid;\r
\r
+ SequenceGroup selectedSequenceGroup;\r
\r
public IdPanel(AlignViewport av, AlignmentPanel parent)\r
{\r
for (int i = start; i <= end; i++)\r
{\r
SequenceI pickedSeq = av.getAlignment().getSequenceAt(i);\r
-\r
if (av.getSelection().contains(pickedSeq))\r
+ {\r
av.getSelection().removeElement(pickedSeq);\r
- else\r
+ selectedSequenceGroup.deleteSequence(pickedSeq);\r
+ }\r
+ else\r
+ {\r
av.getSelection().addElement(pickedSeq);\r
+ if(selectedSequenceGroup==null)\r
+ {\r
+ selectedSequenceGroup = new SequenceGroup();\r
+ av.alignment.addGroup( selectedSequenceGroup );\r
+ selectedSequenceGroup.setStartRes(0);\r
+ selectedSequenceGroup.setEndRes( pickedSeq.getSequence().length());\r
+ }\r
+\r
+ selectedSequenceGroup.addSequence( pickedSeq );\r
+ }\r
\r
}\r
\r
+ alignPanel.seqPanel.seqCanvas.paintFlag=true;\r
+ alignPanel.repaint();\r
repaint();\r
\r
}\r
}\r
else\r
{\r
+ selectedSequenceGroup = av.alignment.findGroup(seq);\r
+\r
if (seq != -1)\r
selectSeqs(seq,seq);\r
\r
{\r
lastid = -1;\r
PaintRefresher.Refresh(this);\r
+ selectedSequenceGroup = null;\r
}\r
}\r