com.rubecula.darwin.examples.travelingsalesman
Class VisualizationFactory_TS

java.lang.Object
  extended by com.rubecula.darwin.examples.travelingsalesman.VisualizationFactory_TS
All Implemented Interfaces:
VisualizationFactory

public class VisualizationFactory_TS
extends java.lang.Object
implements VisualizationFactory

Author:
Robin Hillyard TODO consider extending AToString

Constructor Summary
VisualizationFactory_TS(int width, int height)
           
 
Method Summary
 int getHeight()
           
 int getWidth()
           
 Avatar makeAvatar(Individual individual, java.util.Map<java.lang.String,java.lang.Object> properties)
          Method to create a new Avatar, based on an organism.
 java.awt.Color makeColor(Individual individual)
          Method to determine a suitable color for visualizing the organism
 java.awt.Point makeLocation(Individual individual)
          Method to determine a suitable location for visualizing the organism
 void setHeight(int height)
          set the height of the space available for visualization.
 void setWidth(int width)
          the width of the space available for visualization.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VisualizationFactory_TS

public VisualizationFactory_TS(int width,
                               int height)
Parameters:
width -
height -
Method Detail

getHeight

public int getHeight()
Specified by:
getHeight in interface VisualizationFactory
Returns:
the height

getWidth

public int getWidth()
Specified by:
getWidth in interface VisualizationFactory
Returns:
the width

makeAvatar

public Avatar makeAvatar(Individual individual,
                         java.util.Map<java.lang.String,java.lang.Object> properties)
Description copied from interface: VisualizationFactory
Method to create a new Avatar, based on an organism.

Specified by:
makeAvatar in interface VisualizationFactory
Parameters:
individual - the individual to be represented by the Avatar.
properties - the properties of the visualization model
Returns:
a newly constructed Avatar.
See Also:
VisualizationFactory.makeAvatar(com.rubecula.darwin.foundation.Individual, java.util.Map)

makeColor

public java.awt.Color makeColor(Individual individual)
Description copied from interface: VisualizationFactory
Method to determine a suitable color for visualizing the organism

Specified by:
makeColor in interface VisualizationFactory
Returns:
the appropriate color
See Also:
VisualizationFactory.makeColor(com.rubecula.darwin.foundation.Individual)

makeLocation

public java.awt.Point makeLocation(Individual individual)
Description copied from interface: VisualizationFactory
Method to determine a suitable location for visualizing the organism

Specified by:
makeLocation in interface VisualizationFactory
Returns:
the appropriate location
See Also:
VisualizationFactory.makeLocation(com.rubecula.darwin.foundation.Individual)

setHeight

public void setHeight(int height)
Description copied from interface: VisualizationFactory
set the height of the space available for visualization.

Specified by:
setHeight in interface VisualizationFactory
See Also:
VisualizationFactory.setHeight(int)

setWidth

public void setWidth(int width)
Description copied from interface: VisualizationFactory
the width of the space available for visualization.

Specified by:
setWidth in interface VisualizationFactory
See Also:
VisualizationFactory.setWidth(int)


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