com.rubecula.darwin.examples.travelingsalesman
Class Painter_TS

java.lang.Object
  extended by com.rubecula.darwin.examples.travelingsalesman.Painter_TS
All Implemented Interfaces:
Painter

public class Painter_TS
extends java.lang.Object
implements Painter

Author:
Robin Hillyard

Field Summary
 
Fields inherited from interface com.rubecula.darwin.visualization.Painter
BACKGROUND_COLOR
 
Constructor Summary
Painter_TS()
           
Painter_TS(java.lang.String title)
           
 
Method Summary
 java.lang.String getTitle()
           
 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)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Painter_TS

public Painter_TS()

Painter_TS

public Painter_TS(java.lang.String title)
Parameters:
title -
Method Detail

getTitle

public java.lang.String getTitle()
Returns:
the title

isIdentify

public boolean isIdentify()
Specified by:
isIdentify in interface Painter
Returns:
the identify
See Also:
Painter.isIdentify()

paintBase

public void paintBase(java.awt.Graphics g,
                      int width,
                      int height)
Description copied from interface: Painter
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.

Specified by:
paintBase in interface Painter
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).
See Also:
Painter.paintBase(java.awt.Graphics, int, int)

paintIndividual

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

Specified by:
paintIndividual in interface Painter
Parameters:
g - a graphics context, typically a buffered image.
avatar - the individual from the population model to be painted.
See Also:
Painter.paintIndividual(java.awt.Graphics, com.rubecula.darwin.visualization.Avatar)

paintVisualization

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

Specified by:
paintVisualization in interface Painter
See Also:
Painter.paintVisualization(com.rubecula.darwin.visualization.VisualizationModel, java.awt.Graphics, int, int)

setIdentify

public void setIdentify(boolean identify)
Specified by:
setIdentify in interface Painter
Parameters:
identify - the identify to set
See Also:
Painter.setIdentify(boolean)


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