import javax.swing.ToolTipManager;
/**
- * The main scrollable region containing the alignment and just to the right of
- * the IDPanel.
+ * DOCUMENT ME!
*
* @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;
}
SearchResultsI lastSearchResults;
/**
- * Create a new SeqPanel.
+ * Creates a new SeqPanel object
*
* @param viewport
* @param alignPanel
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;
}
- /*
- * start scrolling if mouse dragging, whether the drag started
- * in the scale panel or this panel
- */
- if (ap.getScalePanel().isMouseDragging())
- {
- ap.getScalePanel().mouseExited(e);
- }
- else if (mouseDragging && scrollThread == null)
+ if (mouseDragging && scrollThread == null)
{
startScrolling(e.getPoint());
}
// if (!scrollOnce() {t.stop();}) gives compiler error :-(
scrollThread.scrollOnce();
}
+ }
+ });
+ t.addActionListener(new ActionListener()
+ {
+ @Override
+ public void actionPerformed(ActionEvent e)
+ {
if (scrollThread == null)
{
// SeqPanel.stopScrolling called
- ((Timer) e.getSource()).stop();
+ t.stop();
}
}
});
t.start();
}
- else
- {
- /*
- * Java - run in a new thread
- */
- scrollThread.start();
- }
+ }
+ else
+ {
+ /*
+ * Java - run in a new thread
+ */
+ scrollThread.start();
}
}
{
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);
- }
-
}