com.rubecula.darwin.visualization.swing
Class Visualization_VisualizableListener

java.lang.Object
  extended by com.rubecula.darwin.visualization.swing.Visualization_
      extended by com.rubecula.darwin.visualization.swing.Visualization_VisualizableListener
All Implemented Interfaces:
VisualizableListener, Visualization
Direct Known Subclasses:
Visualization_PepperedMoth, Visualization_TS

public class Visualization_VisualizableListener
extends Visualization_
implements VisualizableListener

Implementer of VisualizableListener which updates a visualization model.

Author:
Robin Hillyard

Field Summary
 
Fields inherited from class com.rubecula.darwin.visualization.swing.Visualization_
LOG
 
Constructor Summary
Visualization_VisualizableListener(VisualizationFactory factory)
          Primary constructor.
 
Method Summary
 void onChange(Visualizable source, java.lang.Object context)
          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 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_VisualizableListener

public Visualization_VisualizableListener(VisualizationFactory factory)
Primary constructor.

Parameters:
factory -
Method Detail

onChange

public void onChange(Visualizable source,
                     java.lang.Object context)
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:
onChange in interface VisualizableListener
Parameters:
source - the source of the change, usually a population.
context - XXX
See Also:
VisualizableListener.onChange(Visualizable, Object), VisualizerTabs.getVisualizer(String), Visualizer.getModel()


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