Class Pop2D

All Implemented Interfaces:
HasAttachHandlers, HasHandlers, EventListener, HasVisibility, IsRenderable, IsWidget, ProvidesResize, RequiresResize, AbstractGraph.Controller, GenericPopGraph.PopGraphController, TooltipProvider, TooltipProvider.Index, ChangeListener, MilestoneListener, BasicTooltipProvider

public class Pop2D extends GenericPop<String,Network2D,PopGraph2D>
The view to display configuration of the current state of the model in 2D. The visual representation depends on the geometry of the model. Lattice structures have a fixed layout but all other strutures are dynamically generated through a process insipired by the physical arrangement of charged spheres that are connected by springs. The spheres represent members of the population and the springs represent their interaction (or competition) neighbourhood. The size of the sphere scales with the size of the individual's neighbourhood. Moreover, the colour of the spheres reflects the state of the individual, for example their trait or fitness.
Author:
Christoph Hauert
  • Constructor Details

    • Pop2D

      public Pop2D(EvoLudoGWT engine, Data type)
      Construct a new view to display the configuration of the current state of the EvoLudo model in 2D.
      Parameters:
      engine - the pacemaker for running the model
      type - the type of data to display
  • Method Details

    • allocateGraphs

      protected void allocateGraphs()
      Description copied from class: AbstractView
      Allocate all graphs managed by this view. This is called when loading the view. Once all views are attached to the browser DOM a call to the graph's calcBounds(int, int) is triggered through setBounds(int, int) to properly calculate the layout.
      Specified by:
      allocateGraphs in class AbstractView
      See Also:
    • clear

      public void clear()
      Description copied from class: AbstractView
      Clear the view.
      Overrides:
      clear in class AbstractView
    • reset

      public void reset(boolean hard)
      Description copied from class: AbstractView
      Called when a module has been reset. All graphs are reset and updated if needed, unless hard is true.
      Overrides:
      reset in class AbstractView
      Parameters:
      hard - the flag to indicate whether to do a hard reset
    • exportTypes

      protected AbstractView.ExportType[] exportTypes()
      Description copied from class: AbstractView
      Return the list of export types that are acceptable for _all_ graphs in this view.
      Overrides:
      exportTypes in class AbstractView
      Returns:
      the list of viable export types