import javax.swing.ToolTipManager;
/**
- * DOCUMENT ME!
+ * The main scrollable region containing the alignment and just to the right of
+ * the IDPanel.
*
* @author $author$
* @version $Revision: 1.130 $
MousePos o = (MousePos) obj;
boolean b = (column == o.column && seqIndex == o.seqIndex
&& annotationIndex == o.annotationIndex);
- // System.out.println(obj + (b ? "= " : "!= ") + this);
return b;
}
return;
}
- // System.out.print(y1+" "+y2+" "+fixedLeft+" "+fixedRight+"~~");
// Selection spans a hidden region
if (fixedLeft < y1 && (fixedRight > y2 || fixedRight == -1))
{
{
lastMousePosition = null;
ap.alignFrame.setStatus(" ");
+
if (av.getWrapAlignment())
{
return;
}
+ // BH check was:
+// /*
+// * start scrolling if mouse dragging, whether the drag started
+// * in the scale panel or this panel
+// */
+// if (mouseDragging || ap.getScalePanel().isMouseDragging())
+// {
+// startScrolling(new Point(e.getX(), 0));
+// }
+
if (mouseDragging && scrollThread == null)
{
startScrolling(e.getPoint());
if (sequence != null)
{
PopupMenu pop = new PopupMenu(ap, sequence, column);
- pop.show(this, evt.getX(), evt.getY());
- }
+ pop.show(this, evt.getX(), evt.getY());
+ }
}
/**
* Map sequence selection
*/
SequenceGroup sg = MappingUtils.mapSequenceGroup(seqsel, sourceAv, av);
- av.setSelectionGroup(sg != null && sg.getSize() > 0 ? sg : null);
+ av.setSelectionGroup(sg);
av.isSelectionGroupChanged(true);
/*
{
return lastSearchResults;
}
+
+ /**
+ * scroll to the given row/column - or nearest visible location
+ *
+ * @param row
+ * @param column
+ */
+ public void scrollTo(int row, int column)
+ {
+
+ row = row < 0 ? ap.av.getRanges().getStartSeq() : row;
+ column = column < 0 ? ap.av.getRanges().getStartRes() : column;
+ ap.scrollTo(column, column, row, true, true);
+ }
+
+ /**
+ * scroll to the given row - or nearest visible location
+ *
+ * @param row
+ */
+ public void scrollToRow(int row)
+ {
+
+ row = row < 0 ? ap.av.getRanges().getStartSeq() : row;
+ ap.scrollTo(ap.av.getRanges().getStartRes(),
+ ap.av.getRanges().getStartRes(), row, true, true);
+ }
+
+ /**
+ * scroll to the given column - or nearest visible location
+ *
+ * @param column
+ */
+ public void scrollToColumn(int column)
+ {
+
+ column = column < 0 ? ap.av.getRanges().getStartRes() : column;
+ ap.scrollTo(column, column, ap.av.getRanges().getStartSeq(), true,
+ true);
+ }
+
}