choco.visu
Class Tracer
java.lang.Object
choco.visu.Tracer
- All Implemented Interfaces:
- IObserver
public final class Tracer
- extends Object
- implements IObserver
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
vars
protected ArrayList<VisuVariable> vars
mapvars
protected HashMap<Var,VisuVariable> mapvars
breaklength
protected int breaklength
Tracer
public Tracer()
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.