Example #1
0
 /** Called by ImageJ when the user selects Quit. */
 public void quit() {
   quitMacro = IJ.macroRunning();
   Thread thread = new Thread(this, "Quit");
   thread.setPriority(Thread.NORM_PRIORITY);
   thread.start();
   IJ.wait(10);
 }
Example #2
0
 public void start() {
   Dimension size = getSize();
   for (int i = 0; i < animpts.length; i += 2) {
     animpts[i + 0] = (float) (Math.random() * size.width);
     animpts[i + 1] = (float) (Math.random() * size.height);
     deltas[i + 0] = (float) (Math.random() * 4.0 + 2.0);
     deltas[i + 1] = (float) (Math.random() * 4.0 + 2.0);
     if (animpts[i + 0] > size.width / 6.0f) {
       deltas[i + 0] = -deltas[i + 0];
     }
     if (animpts[i + 1] > size.height / 6.0f) {
       deltas[i + 1] = -deltas[i + 1];
     }
   }
   anim = new Thread(this);
   anim.setPriority(Thread.MIN_PRIORITY);
   anim.start();
 }
Example #3
0
 /** Called by ImageJ when the user selects Quit. */
 public void quit() {
   Thread thread = new Thread(this, "Quit");
   thread.setPriority(Thread.NORM_PRIORITY);
   thread.start();
   IJ.wait(10);
 }
 public void start() {
   running = true;
   Thread thread = new Thread(this);
   thread.setPriority(Thread.MAX_PRIORITY);
   thread.start();
 }