Skip to content
Snippets Groups Projects
Commit 0ee9d8f1 authored by valot's avatar valot
Browse files

finition animation

git-svn-id: https://subversion.renater.fr/xtandempipeline/trunk@83 b8ef2a07-7df7-436f-90b9-41648038564b
parent 43c335c1
No related branches found
No related tags found
No related merge requests found
......@@ -96,7 +96,7 @@ public class Running {
this.actualised();
// on demarre le process
final int time = 500;
final int time = 150;
t.setDaemon(true);
t.start();
final Runnable timer = new Runnable() {
......@@ -119,20 +119,23 @@ public class Running {
}
protected void actualised() {
//animation de l'image
currentAnim++;
if (currentAnim == 8) {
currentAnim = 0;
}
anim.setImage(animatedImage[currentAnim]);
Runtime run = Runtime.getRuntime();
long used = (run.totalMemory() - run.freeMemory()) / 1000000;
long total = run.totalMemory() / 1000000;
String S = used + "/" + total + "Mo";
memory.setText(S);
text.setText(t.getView());
this.progress.setMaximum(t.get_max_progress());
this.progress.setSelection(t.get_current_progress());
//on ne met à jour l'interface complete que toute les 150*4=550ms
if (currentAnim == 0 || currentAnim == 4) {
Runtime run = Runtime.getRuntime();
long used = (run.totalMemory() - run.freeMemory()) / 1000000;
long total = run.totalMemory() / 1000000;
String S = used + "/" + total + "Mo";
memory.setText(S);
text.setText(t.getView());
this.progress.setMaximum(t.get_max_progress());
this.progress.setSelection(t.get_current_progress());
}
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment