Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package tools.tracesviewer;
 
 import java.util.*;
 
 public class TracesAnimationThread implements Runnable {
 
     public Thread tracesThread;
     Hashtable arrows;
    int delay;
    public TracesAnimationThread(TracesCanvas tracesCanvas) {
         = null;
         = null;
         = 2000;
        this. = tracesCanvas;
         = tracesCanvas.arrows;
    }
    public void start() {
        try {
             = new Thread(this);
            .setPriority(1);
            .start();
        } catch (Exception exception) {
        }
    }
    public void stop() {
        try {
             = null;
            .repaint();
        } catch (Exception exception) {
        }
    }
    public void run() {
        try {
             = .;
            if (.size() != 0) {
                while ( != null) {
                    .unvisibleAllArrows();
                    for (int i = 0;
                        (i < .size()) && ( != null);
                        i++) {
                        Arrow arrow = (Arrow.get("arrow" + (i + 1));
                        arrow.visible = true;
                        .unselectAllArrows();
                        arrow.selected = true;
                        .repaint();
                        if ( != null)
                            Thread.sleep();
                    }
                }
            }
        } catch (Exception exception) {
        }
    }
    public void setDelay(int i) {
         = i * 1000;
    }
    public int getDelay() {
        return  / 1000;
    }
New to GrepCode? Check out our FAQ X