SequenceGroup sg = new SequenceGroup();\r
for (int i = 0; i < viewport.getAlignment().getSequences().size(); i++)\r
{\r
- sg.addSequence(viewport.getAlignment().getSequenceAt(i));\r
+ sg.addSequence(viewport.getAlignment().getSequenceAt(i), false);\r
}\r
sg.setEndRes(viewport.alignment.getWidth());\r
viewport.setSelectionGroup(sg);\r
SequenceGroup sg = viewport.getSelectionGroup();\r
for (int i = 0; i < viewport.getAlignment().getSequences().size(); i++)\r
{\r
- sg.addOrRemove(viewport.getAlignment().getSequenceAt(i));\r
+ sg.addOrRemove(viewport.getAlignment().getSequenceAt(i), false);\r
}\r
\r
PaintRefresher.Refresh(null);\r
\r
SequenceGroup sg = new SequenceGroup(searchString, ucs, true, true, false,\r
startRes, endRes);\r
- sg.addSequence(seq);\r
+ sg.addSequence(seq, false);\r
av.alignment.addGroup(sg);\r
searchGroup.addGroup(sg);\r
\r
selection.setEndRes(av.alignment.getWidth() - 1);\r
for (int i = 0; i < sg.getSize(); i++)\r
{\r
- selection.addSequence(sg.getSequenceAt(i));\r
+ selection.addSequence(sg.getSequenceAt(i), true);\r
}\r
\r
av.setSelectionGroup(selection);\r
{\r
lastid = seq;\r
SequenceI pickedSeq = av.getAlignment().getSequenceAt(seq);\r
- av.getSelectionGroup().addOrRemove(pickedSeq);\r
+ av.getSelectionGroup().addOrRemove(pickedSeq, false);\r
}\r
\r
void selectSeqs(int start, int end)\r
\r
for (int i = start; i <= end; i++)\r
{\r
- av.getSelectionGroup().addSequence(av.getAlignment().getSequenceAt(i));\r
+ av.getSelectionGroup().addSequence(av.getAlignment().getSequenceAt(i), false);\r
}\r
\r
}\r
scrollThread.running = false;\r
}\r
\r
+ if(av.getSelectionGroup()!=null)\r
+ av.getSelectionGroup().recalcConservation();\r
+\r
mouseDragging = false;\r
PaintRefresher.Refresh(this);\r
}\r
{\r
if (sg.sequences.contains( (SequenceI) del.elementAt(i)))\r
{\r
- sg.deleteSequence( (SequenceI) del.elementAt(i));\r
+ sg.deleteSequence( (SequenceI) del.elementAt(i), true);\r
}\r
}\r
\r
{\r
if (sg.sequences.contains( (SequenceI) del.elementAt(j)))\r
{\r
- sg.deleteSequence( (SequenceI) del.elementAt(j));\r
+ sg.deleteSequence( (SequenceI) del.elementAt(j), true);\r
}\r
\r
}\r
{\r
if (av.getSelectionGroup() != null)\r
{\r
- av.getSelectionGroup().addOrRemove(found);\r
+ av.getSelectionGroup().addOrRemove(found, true);\r
PaintRefresher.Refresh(this);\r
}\r
else\r
{\r
av.setSelectionGroup(new SequenceGroup());\r
- av.getSelectionGroup().addOrRemove(found);\r
+ av.getSelectionGroup().addOrRemove(found, true);\r
av.getSelectionGroup().setEndRes(av.alignment.getWidth());\r
\r
}\r
{\r
if (!av.getSelectionGroup().sequences.contains(sp.sequence))\r
{\r
- changedSel = true;\r
- av.getSelectionGroup().addSequence(sp.sequence);\r
+ av.getSelectionGroup().addSequence(sp.sequence, true);\r
}\r
}\r
}\r
}\r
- // if (changedSel) {\r
- // fireSequenceSelectionEvent(av.getSelection());\r
- // }\r
}\r
\r
public SequenceI findPoint(int x, int y)\r
sg = new SequenceGroup();\r
for (int i = 0; i < av.alignment.getSequences().size(); i++)\r
{\r
- sg.addSequence(av.alignment.getSequenceAt(i));\r
+ sg.addSequence(av.alignment.getSequenceAt(i), false);\r
}\r
\r
sg.setStartRes(res);\r
}\r
\r
selected.setEndRes(av.alignment.getWidth());\r
- selected.addOrRemove(sequence);\r
+ selected.addOrRemove(sequence, true);\r
\r
PaintRefresher.Refresh(this);\r
repaint();\r
SequenceGroup sg = av.getSelectionGroup();\r
if (sg != null)\r
{\r
- sg.addOrRemove(seq);\r
+ sg.addOrRemove(seq, true);\r
}\r
}\r
}\r
\r
Vector l = tree.findLeaves( (SequenceNode) tree.getGroups().elementAt(\r
i), new Vector());\r
- SequenceGroup sg = null;\r
+ SequenceGroup sg = new SequenceGroup("TreeGroup", av.getGlobalColourScheme(), true, true, false,\r
+ 0, av.alignment.getWidth());\r
for (int j = 0; j < l.size(); j++)\r
{\r
SequenceNode sn = (SequenceNode) l.elementAt(j);\r
- if (sg == null)\r
- {\r
- sg = new SequenceGroup("TreeGroup", av.getGlobalColourScheme(), true, true, false,\r
- 0, av.alignment.getWidth());\r
- }\r
-\r
- sg.addSequence( (Sequence) sn.element());\r
+ sg.addSequence( (Sequence) sn.element(), false);\r
}\r
\r
if (av.getGlobalColourScheme() instanceof ConservationColourScheme)\r
\r
SequenceGroup sg = new SequenceGroup(searchString, ucs, true, true,\r
false, startRes, endRes);\r
- sg.addSequence(seq);\r
+ sg.addSequence(seq, false);\r
av.alignment.addGroup(sg);\r
searchGroup.addGroup(sg);\r
}\r
\r
for (int i = 0; i < sg.getSize(); i++)\r
{\r
- selection.addSequence(sg.getSequenceAt(i));\r
+ selection.addSequence(sg.getSequenceAt(i), true);\r
}\r
\r
av.setSelectionGroup(selection);\r
lastid = seq;\r
\r
SequenceI pickedSeq = av.getAlignment().getSequenceAt(seq);\r
- av.getSelectionGroup().addOrRemove(pickedSeq);\r
+ av.getSelectionGroup().addOrRemove(pickedSeq, true);\r
}\r
\r
void selectSeqs(int start, int end)\r
\r
for (int i = start; i <= end; i++)\r
{\r
- av.getSelectionGroup().addSequence(av.getAlignment().getSequenceAt(i));\r
+ av.getSelectionGroup().addSequence(av.getAlignment().getSequenceAt(i), true);\r
}\r
}\r
\r
{\r
if (sg.sequences.contains( (SequenceI) del.elementAt(i)))\r
{\r
- sg.deleteSequence( (SequenceI) del.elementAt(i));\r
+ sg.deleteSequence( (SequenceI) del.elementAt(i), true);\r
}\r
}\r
}\r