com.rubecula.darwin.examples.pepperedmoth
Class PopulationListener_PepperedMoth

java.lang.Object
  extended by com.rubecula.darwin.visualization.PopulationListener_UpdateVisualizationModel
      extended by com.rubecula.darwin.examples.pepperedmoth.PopulationListener_PepperedMoth
All Implemented Interfaces:
PopulationListener

public final class PopulationListener_PepperedMoth
extends PopulationListener_UpdateVisualizationModel

Implementer of PopulationListener 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

Constructor Summary
PopulationListener_PepperedMoth(VisualizationFactory factory, VisualizerTabs visualizers, boolean verbose)
          Constructor for a new PopulationListener_PepperedMoth
 
Method Summary
 void populationChanged(Population p)
          This method loops through all the organisms in population p and, for each one, and, if it is not viable [either just born or newly dead], either removes the corresponding individual, or (providing that the age is 0) adds a newly created individual.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PopulationListener_PepperedMoth

public PopulationListener_PepperedMoth(VisualizationFactory factory,
                                       VisualizerTabs visualizers,
                                       boolean verbose)
Constructor for a new PopulationListener_PepperedMoth

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

populationChanged

public void populationChanged(Population p)
Description copied from class: PopulationListener_UpdateVisualizationModel
This method loops through all the organisms in population p and, for each one, and, if it is not viable [either just born or newly dead], either removes the corresponding individual, or (providing that the age is 0) adds a newly created individual.

Specified by:
populationChanged in interface PopulationListener
Overrides:
populationChanged in class PopulationListener_UpdateVisualizationModel
Parameters:
p - the population which has changed.
See Also:
PopulationListener.populationChanged(com.rubecula.darwin.core.Population), VisualizerTabs.getVisualizer(Population), Visualizer.getModel()