crowdmodel.styles
Class CrowdAgentStyle2D

java.lang.Object
  extended by repast.simphony.visualization.visualization2D.style.DefaultStyle2D
      extended by crowdmodel.styles.CrowdAgentStyle2D
All Implemented Interfaces:
repast.simphony.visualization.visualization2D.style.Style2D<java.lang.Object>

public class CrowdAgentStyle2D
extends repast.simphony.visualization.visualization2D.style.DefaultStyle2D

Style for crowd members in 2D displays. A distinction between crowd members can be made here in terms of visualisation. Use the circle shape and size specified in DefaultStyle2D.

Author:
Nanda Wijermans

Field Summary
private  java.awt.Color tan
           
 
Fields inherited from class repast.simphony.visualization.visualization2D.style.DefaultStyle2D
color, rect, rotation, s, stroke, strokeColor
 
Constructor Summary
CrowdAgentStyle2D()
           
 
Method Summary
 java.awt.Color getBehaviourColour(java.lang.String myBehaviour)
          Returns a colour that represents the behaviour an agent shows
 java.awt.Color getDomColour(int domGoal, boolean cannotMove, boolean satisfied)
          Returns the colour depending on what goal is dominant
 java.awt.Color getDummyColor(int colorNr)
           
 java.awt.Color getGroupColour(CrowdAgent ca)
          Returns the colour depending on the group it belongs to in the sense that group members have the same color
 java.awt.Paint getPaint(java.lang.Object o)
           
 double getRotation(CrowdAgent ca)
          Returns the heading of an agent to indicate the rotation of the shape that is used to represent an agent on the display
 java.awt.Stroke getStroke(java.lang.Object o)
          Indicates how the stroke should be painted null : don't paint the outline of the shape
 
Methods inherited from class repast.simphony.visualization.visualization2D.style.DefaultStyle2D
getBounds, getLabel, getPNode, getRotation, getStrokePaint, isScaled, setBounds, setPaint, setRotation, setStroke
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

tan

private java.awt.Color tan
Constructor Detail

CrowdAgentStyle2D

public CrowdAgentStyle2D()
Method Detail

getPaint

public java.awt.Paint getPaint(java.lang.Object o)
Specified by:
getPaint in interface repast.simphony.visualization.visualization2D.style.Style2D<java.lang.Object>
Overrides:
getPaint in class repast.simphony.visualization.visualization2D.style.DefaultStyle2D

getRotation

public double getRotation(CrowdAgent ca)
Returns the heading of an agent to indicate the rotation of the shape that is used to represent an agent on the display

Parameters:
ca -
Returns:

getStroke

public java.awt.Stroke getStroke(java.lang.Object o)
Indicates how the stroke should be painted null : don't paint the outline of the shape

Specified by:
getStroke in interface repast.simphony.visualization.visualization2D.style.Style2D<java.lang.Object>
Overrides:
getStroke in class repast.simphony.visualization.visualization2D.style.DefaultStyle2D

getBehaviourColour

public java.awt.Color getBehaviourColour(java.lang.String myBehaviour)
Returns a colour that represents the behaviour an agent shows

Parameters:
myBehaviour -
Returns:
behaviour colour

getDomColour

public java.awt.Color getDomColour(int domGoal,
                                   boolean cannotMove,
                                   boolean satisfied)
Returns the colour depending on what goal is dominant


getGroupColour

public java.awt.Color getGroupColour(CrowdAgent ca)
Returns the colour depending on the group it belongs to in the sense that group members have the same color


getDummyColor

public java.awt.Color getDummyColor(int colorNr)