artoflife pre0.1.0-dev

Package org.artoflife.gui.population

Contains the central PopulationView with required support classes in order to provide a JComponent view on a Population of Individuals that use PaintablePhenotypes.

See:
          Description

Interface Summary
RecordPositionPolicy Used by PopulationView to implement a policy for positioning IndividualRecords horizontally and vertically within the view.
 

Class Summary
FreeVerticalFitnessPolicy A RecordPositionPolicy that positions individuals vertically by their Fitness (higher is fitter), but does not enforce a rigid horizontal position policy.
PopulationView Base class for JComponent-based views on a Population containing Individuals that have org.artoflife.gp.paintable.PaintablePhenotypes.
PopulationViewDropTargetListener A lot of this is copied from TransferHandler$DropHandler, the default Swing drop handler, modified to handle the distinction between MOVE within a PopulationView and COPY from another one.
PopulationViewTransferHandler Handles transfer of Individuals from a PopulationView for DnD and clipboard operations.
VerticalFitnessPolicy A RecordPositionPolicy that positions Individuals vertically according to their Fitness (scaled to some range) and horizontally by record index with a constant individual width to fit the population's ideal size across the entire width of the parent view.
 

Package org.artoflife.gui.population Description

Contains the central PopulationView with required support classes in order to provide a JComponent view on a Population of Individuals that use PaintablePhenotypes.

PopulationView uses IndividualRecords to manage view metadata for each Individual in the underlying Population. The IndividualCachingRecord adds simple image caching to IndividualRecord to avoid recreating the painted representation of an Individual unless the representation changes size.

A custom implementation of TransferHandler handles exporting Individuals with PaintablePhenotypes as PaintableIndividualTransferables. Also accepts drops for

flavors. Drops are handled by inserting the dragged Individuals into the underlying Population via the PopulationView drop target.

The positioning of Individual representations is delegated to instances of RecordPositionPolicy with a default implementation provided in VerticalFitnessPositionPolicy used by the Art Of Life GUI. This default positions Individual representations vertically by Fitness (fittest at the top) and horizontally ordered by Individual index within the view.


artoflife pre0.1.0-dev

Copyright © 2002 the Art Of Life team. All Rights Reserved.