choco.visu
Class Tracer

java.lang.Object
  extended by choco.visu.Tracer
All Implemented Interfaces:
IObserver

public final class Tracer
extends Object
implements IObserver


Field Summary
protected  int breaklength
           
protected  HashMap<Var,VisuVariable> mapvars
           
protected  ArrayList<VisuVariable> vars
           
 
Constructor Summary
Tracer()
           
 
Method Summary
 void addObservable(IObservable observable)
          Set the variable event queue to observe
 void setBreaklength(int breaklength)
          Change the break length value
 void setVariables(Collection<VisuVariable> vars)
          Set the variables to draw
 void update(IObservable o, Object arg)
          This method is called whenever the observed object is changed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

vars

protected ArrayList<VisuVariable> vars

mapvars

protected HashMap<Var,VisuVariable> mapvars

breaklength

protected int breaklength
Constructor Detail

Tracer

public Tracer()
Method Detail

setBreaklength

public final void setBreaklength(int breaklength)
Change the break length value

Parameters:
breaklength - the new break length

addObservable

public final void addObservable(IObservable observable)
Set the variable event queue to observe

Parameters:
observable -

setVariables

public final void setVariables(Collection<VisuVariable> vars)
Set the variables to draw

Parameters:
vars -

update

public final void update(IObservable o,
                         Object arg)
This method is called whenever the observed object is changed. An application calls an Observable object's notifyObservers method to have all the object's observers notified of the change.

Specified by:
update in interface IObserver
Parameters:
o - the observable object.
arg - an argument passed to the notifyObservers method.

In that case, it redraw the canvas of the modified variable or redraw every canvas if "fail" (arg = 1).



Copyright © 2012. All Rights Reserved.