com.rubecula.darwin.visualization
Interface Painter

All Known Implementing Classes:
Painter_, Painter_ColoredCircle, Painter_PepperedMoth, Painter_TS

public interface Painter

This interface defines the methods which allow painting of specific visualization model items. These methods are called the Visualizer_ wants to visualize the model(s).

Author:
Robin Hillyard

Field Summary
static java.lang.String BACKGROUND_COLOR
          backgroundColor
 
Method Summary
 boolean isIdentify()
           
 void paintBase(java.awt.Graphics g, int width, int height)
          Method to paint a representation of the organisms described by the VisualizationModel instance.
 void paintIndividual(java.awt.Graphics g, Avatar avatar)
          Method to paint a representation of an organism.
 void paintVisualization(VisualizationModel visualizationModel, java.awt.Graphics g, int width, int height)
          Method to paint visualization model which.
 void setIdentify(boolean identify)
           
 

Field Detail

BACKGROUND_COLOR

static final java.lang.String BACKGROUND_COLOR
backgroundColor

See Also:
Constant Field Values
Method Detail

isIdentify

boolean isIdentify()
Returns:
the identify

paintBase

void paintBase(java.awt.Graphics g,
               int width,
               int height)
Method to paint a representation of the organisms described by the VisualizationModel instance. This method is called by Visualizer_.paintComponent(Graphics) method, before any other painting is done.

Parameters:
g - a graphics context, typically a buffered image.
width - the width of the area in which we may draw (0..width are legal for x coordinates).
height - the height of the area in which we may draw (0..height are legal for y coordinates).

paintIndividual

void paintIndividual(java.awt.Graphics g,
                     Avatar avatar)
Method to paint a representation of an organism. This method is called (indirectly) by Visualizer_.paintComponent(Graphics) method, once for each individual.

Parameters:
g - a graphics context, typically a buffered image.
avatar - the individual from the population model to be painted.

paintVisualization

void paintVisualization(VisualizationModel visualizationModel,
                        java.awt.Graphics g,
                        int width,
                        int height)
Method to paint visualization model which. This method is called (indirectly) by Visualizer_.paintComponent(Graphics) method, once for each model.

Parameters:
visualizationModel -
g -
width -
height -

setIdentify

void setIdentify(boolean identify)
Parameters:
identify - the identify to set


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