implementation of the gui coupling with AntView
The AntFactory class is basically the same as AntMain but the static
methods return a Mediator to a fully configured Ant Environment.
This Environment needs just to be started as thread.
It can be received from the Mediator (called acom here) with this:
acom.getEnvironment();
After the user presses the Start/Stop button this happens:
first we check if the mediator is not null
if it isn't we create a new antview if necessarry and start it as it's
own thread
else we update the existing applet with the new mediator object
then we add ourselves as observer to the antView object
add the antView as observer to the environment (so the applet can pull
the data for drawing the graph etc.)
create a new thread for running the Environment
start it and change the button text