|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectfr.lifl.jedi.gui.display.colorGrid.ColorGridModel
public class ColorGridModel
The model used by the GUI that displays the environment of the simulation as an image, where each agent is represented by a shape or an icon.
This model defines :
ColorRectangleDisplayer
).
ColorRectangleWithLineDisplayer
),
in which a line displays the direction of the agent.
ColorTriangleDisplayer
).
The triangle heads towards the direction of the agent.
EmptyDisplayer
).
In that case, the agent is not displayed.
IconDisplayer
).
StaticColorRectangleDisplayer
).
StaticColorTriangleDisplayer
).
The triangle heads towards the direction of the agent.
StaticIconDisplayer
).
JEDI V 2.2 |
Created the 4th nov. 2008 |
Modified the 5th may 2009 |
Yoann Kubera |
SMAC Team (Systèmes Multi-Agents et Comportement) |
LIFL (Laboratoire d'Informatique Fondamentale de Lille) |
University of Lille, France |
Constructor Summary | |
---|---|
ColorGridModel(int scaleFactor)
Default constructor of the simulation GUI's model. |
Method Summary | |
---|---|
AgentDisplayer |
getHowToDisplay(java.lang.Class<? extends Agent> a)
Gets how an agent from a particular agent class is displayed in the GUI. |
int |
getScaleFactor()
Gets the scaling factor of the model. |
void |
setHowToDisplay(java.lang.Class<? extends Agent> a,
AgentDisplayer das)
Defines how an agent from a particular agent class is displayed in the GUI. |
void |
setScaleFactor(int factor)
Sets the scaling factor of the model. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ColorGridModel(int scaleFactor)
Method Detail |
---|
public int getScaleFactor()
This value defines the number of pixels corresponding to a unit in the environment of the simulation.
public void setScaleFactor(int factor)
This value defines the number of pixels corresponding to a unit in the environment of the simulation.
factor
- the new scaling factor of the model.public void setHowToDisplay(java.lang.Class<? extends Agent> a, AgentDisplayer das)
a
- The class of the displayed agent.
It has to be the class the agent was instanciated with.das
- The instance that describes how agents of this class are displayed.AgentDisplayer
public AgentDisplayer getHowToDisplay(java.lang.Class<? extends Agent> a)
a
- The class of the displayed agent
AgentDisplayer
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |