com.rubecula.darwin.examples.pepperedmoth
Class Visualization_PepperedMoth

java.lang.Object
  extended by com.rubecula.darwin.visualization.swing.Visualization_
      extended by com.rubecula.darwin.visualization.swing.Visualization_VisualizableListener
          extended by com.rubecula.darwin.examples.pepperedmoth.Visualization_PepperedMoth
All Implemented Interfaces:
VisualizableListener, Visualization

public final class Visualization_PepperedMoth
extends Visualization_VisualizableListener

Lifespan: permanent. Implementer of VisualizableListener which updates a visualization model, and which is specific to the peppered moth application in that it chooses to ignore the control population for display purposes.

Author:
Robin Hillyard

Field Summary
 
Fields inherited from class com.rubecula.darwin.visualization.swing.Visualization_
LOG
 
Constructor Summary
Visualization_PepperedMoth(VisualizationFactory factory, boolean verbose)
          Constructor for a new Visualization_PepperedMoth
 
Method Summary
 void onChange(Visualizable source, java.lang.Object context)
          if verbose, then we write out the current number of moths.
 
Methods inherited from class com.rubecula.darwin.visualization.swing.Visualization_
getVisualizerTabs, setVisualizerTabs, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Visualization_PepperedMoth

public Visualization_PepperedMoth(VisualizationFactory factory,
                                  boolean verbose)
Constructor for a new Visualization_PepperedMoth

Parameters:
factory -
verbose - true if caller wants extra information printed on each population change.
Method Detail

onChange

public void onChange(Visualizable source,
                     java.lang.Object context)
if verbose, then we write out the current number of moths.

Specified by:
onChange in interface VisualizableListener
Overrides:
onChange in class Visualization_VisualizableListener
Parameters:
source - the source of the change, usually a population.
context - XXX
See Also:
Visualization_VisualizableListener.onChange(Visualizable, Object)


Copyright © 2010 Rubecula Software, LLC. All Rights Reserved.