git://source.jalview.org
/
jalview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
JAL-3748 allow AlignedCodonFrame.covers to optionally only require coverage for eithe...
[jalview.git]
/
src
/
jalview
/
gui
/
WebserviceInfo.java
diff --git
a/src/jalview/gui/WebserviceInfo.java
b/src/jalview/gui/WebserviceInfo.java
index
2b85141
..
8158718
100644
(file)
--- a/
src/jalview/gui/WebserviceInfo.java
+++ b/
src/jalview/gui/WebserviceInfo.java
@@
-82,7
+82,7
@@
public class WebserviceInfo extends GWebserviceInfo
Image image;
Image image;
- int angle = 0;
+ float angle = 0f;
String title = "";
String title = "";
@@
-797,24
+797,27
@@
protected void cancel_actionPerformed(ActionEvent e)
{
startTime = System.currentTimeMillis();
{
startTime = System.currentTimeMillis();
- float invSpeed = 30f;
+ float invSpeed = 15f;
+ float factor = 1f;
while (currentStatus < STATE_STOPPED_OK)
{
if (currentStatus == STATE_QUEUING)
{
invSpeed = 25f;
while (currentStatus < STATE_STOPPED_OK)
{
if (currentStatus == STATE_QUEUING)
{
invSpeed = 25f;
+ factor = 1f;
}
else if (currentStatus == STATE_RUNNING)
{
invSpeed = 10f;
}
else if (currentStatus == STATE_RUNNING)
{
invSpeed = 10f;
+ factor = (float) (0.5 + 1.5
+ * (0.5 - (0.5 * Math.sin(3.14159 / 180 * (angle + 45)))));
}
try
{
Thread.sleep(50);
}
try
{
Thread.sleep(50);
- int units = (int) ((System.currentTimeMillis() - startTime)
- / invSpeed);
- angle += units;
+ float delta = (System.currentTimeMillis() - startTime) / invSpeed;
+ angle += delta * factor;
angle %= 360;
startTime = System.currentTimeMillis();
angle %= 360;
startTime = System.currentTimeMillis();
@@
-839,13
+842,14
@@
protected void cancel_actionPerformed(ActionEvent e)
while (angle < 360)
{
while (angle < 360)
{
+ float invSpeed = 5f;
+ float factor = 1f;
try
{
Thread.sleep(25);
try
{
Thread.sleep(25);
- int units = (int) ((System.currentTimeMillis() - startTime)
- / 5f);
- angle += units;
+ float delta = (System.currentTimeMillis() - startTime) / invSpeed;
+ angle += delta * factor;
startTime = System.currentTimeMillis();
if (angle >= 360)
startTime = System.currentTimeMillis();
if (angle >= 360)
@@
-885,9
+889,9
@@
protected void cancel_actionPerformed(ActionEvent e)
if (image != null)
{
int x = image.getWidth(this) / 2, y = image.getHeight(this) / 2;
if (image != null)
{
int x = image.getWidth(this) / 2, y = image.getHeight(this) / 2;
- g.rotate(Math.toRadians(angle), x, y);
+ g.rotate(3.14159 / 180 * (angle), x, y);
g.drawImage(image, 0, 0, this);
g.drawImage(image, 0, 0, this);
- g.rotate(-Math.toRadians(angle), x, y);
+ g.rotate(-3.14159 / 180 * (angle), x, y);
}
}
}
}