|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.rubecula.darwin.examples.pepperedmoth.VisualizationFactory_PepperedMoth
public class VisualizationFactory_PepperedMoth
Lifespan: Transient TODO add property angle for peppered moth to lean (once symbol is no longer circle) Class responsible for creating visualization objects for the PepperedMoth application. TODO consider extending AToString
Constructor Summary | |
---|---|
VisualizationFactory_PepperedMoth(org.apache.commons.math.random.RandomGenerator random)
Public primary constructor. |
Method Summary | |
---|---|
static java.awt.Color |
convertToGrayLevel(float greyValue,
float max)
|
int |
getHeight()
|
int |
getWidth()
|
static WingColor |
getWingColor(Organism organism)
TODO Consider moving this somewhere else. |
Avatar |
makeAvatar(Individual individual,
java.util.Map<java.lang.String,java.lang.Object> properties)
XXX properties is unused. |
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 |
---|
public VisualizationFactory_PepperedMoth(org.apache.commons.math.random.RandomGenerator random)
random
- Method Detail |
---|
public static java.awt.Color convertToGrayLevel(float greyValue, float max)
greyValue
- the color in range 0=white ... max
=blackmax
- the maximum color value
geryValue
given.
XXX consider moving this methodpublic static WingColor getWingColor(Organism organism)
organism
-
public int getHeight()
getHeight
in interface VisualizationFactory
VisualizationFactory.getHeight()
public int getWidth()
getWidth
in interface VisualizationFactory
VisualizationFactory.getWidth()
public Avatar makeAvatar(Individual individual, java.util.Map<java.lang.String,java.lang.Object> properties)
makeAvatar
in interface VisualizationFactory
individual
- the individual to be represented by the Avatar
.properties
- the properties of the visualization model
AvatarFactory.makeAvatar(Individual, Point, Color)
VisualizationFactory.makeAvatar(Individual,
java.util.Map)
public java.awt.Color makeColor(Individual individual)
VisualizationFactory
makeColor
in interface VisualizationFactory
VisualizationFactory.makeColor(Individual)
public java.awt.Point makeLocation(Individual individual)
VisualizationFactory
makeLocation
in interface VisualizationFactory
VisualizationFactory.makeLocation(Individual)
public void setHeight(int height)
VisualizationFactory
setHeight
in interface VisualizationFactory
VisualizationFactory.setHeight(int)
public void setWidth(int width)
VisualizationFactory
setWidth
in interface VisualizationFactory
VisualizationFactory.setWidth(int)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |