+ if (!dragCancelled)
+ {
+ int start = selectedRow;
+
+ int end = getSelectedRow(evt.getY() + scrollOffset);
+
+ if (start != end)
+ {
+ // Swap these annotations
+ AlignmentAnnotation startAA = ap.av.alignment
+ .getAlignmentAnnotation()[start];
+ if (end == -1)
+ {
+ end = ap.av.alignment.getAlignmentAnnotation().length - 1;
+ }
+ AlignmentAnnotation endAA = ap.av.alignment
+ .getAlignmentAnnotation()[end];
+
+ ap.av.alignment.getAlignmentAnnotation()[end] = startAA;
+ ap.av.alignment.getAlignmentAnnotation()[start] = endAA;
+ }
+ }