if (scrollThread != null)
{
scrollThread.stopScrolling();
+ scrollThread = null;
}
}
void startScrolling(boolean up)
{
scrollThread = new ScrollThread(up);
- if (!Platform.isJS())
- {
- /*
- * Java - run in a new thread
- */
- scrollThread.start();
- }
- else
+ if (Platform.isJS())
{
/*
* for JalviewJS using Swing Timer
{
if (scrollThread == null)
{
- // finished and nulled itself
+ // IdPanel.stopScrolling called
t.stop();
}
}
});
t.start();
}
+ else
+ /**
+ * Java only
+ *
+ * @j2sIgnore
+ */
+ {
+ scrollThread.start();
+ }
}
/**
{
if (scrollThread != null)
{
- scrollThread.stopScrolling();
+ stopScrolling();
}
MousePos pos = alignPanel.getSeqPanel().findMousePosition(e);
{
this.up = up;
setName("IdPanel$ScrollThread$" + String.valueOf(up));
- start();
}
/**