/* Auteur: Nicolas JANEY          */
/* nicolas.janey@univ-fcomte.fr   */
/* Fevrier 2005                   */

public class CurseurCanvasConsole extends Thread {
  public boolean run = false;
  public int tempo;
  public CanvasConsole cc;
  
  public CurseurCanvasConsole(CanvasConsole cc,int tempo) {
    this.cc = cc;
    this.tempo = tempo;
  }

  public void run() {
    run = true;
    while ( run ) {
      try {
        sleep(tempo,100); }
      catch(Exception e) { }
      cc.curseur = !cc.curseur;
      cc.repaint(); }
  }

  public void arret() {
    run = false ;
  }
}