if (scrollThread != null)
{
scrollThread.stopScrolling();
+ scrollThread = null;
}
}
{
if (scrollThread == null)
{
- // finished and nulled itself
+ // IdPanel.stopScrolling called
t.stop();
}
}
{
if (scrollThread != null)
{
- scrollThread.stopScrolling();
+ stopScrolling();
}
MousePos pos = alignPanel.getSeqPanel().findMousePosition(e);
{
this.up = up;
setName("IdPanel$ScrollThread$" + String.valueOf(up));
- start();
}
/**
* Javascript - run every 20ms until scrolling stopped
* or reaches the limit of scrollable alignment
*/
- // java.util.Timer version:
- // Timer t = new Timer("ScrollThreadTimer", true);
- // TimerTask task = new TimerTask()
- // {
- // @Override
- // public void run()
- // {
- // if (!scrollThread.scrollOnce())
- // {
- // cancel();
- // }
- // }
- // };
- // t.schedule(task, 20, 20);
Timer t = new Timer(20, new ActionListener()
{
@Override
{
if (scrollThread == null)
{
- // finished and nulled itself
+ // SeqPanel.stopScrolling called
t.stop();
}
}