|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectfr.lifl.jedi.gui.display.colorGrid.view.agentDisplay.ColorTriangleDisplayer
fr.lifl.jedi.gui.display.colorGrid.view.agentDisplay.StaticColorTriangleDisplayer
public class StaticColorTriangleDisplayer
This class defines a tool used to display agents in the environment.
It displays agents as a triangle filled with a color. The size of the triangle is independent from the width and height of the agent. Nevertheless, it scales with the scaling factor of the simulation.
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 |
ColorGridModel.getScaleFactor()
Field Summary | |
---|---|
protected double |
height
The height, in environment units, of this triangle. |
protected double |
width
The width, in environment units, of this triangle. |
Fields inherited from class fr.lifl.jedi.gui.display.colorGrid.view.agentDisplay.ColorTriangleDisplayer |
---|
color, inBackground |
Constructor Summary | |
---|---|
StaticColorTriangleDisplayer(java.awt.Color color,
double size,
boolean inBg)
Constructor of the displayer. |
|
StaticColorTriangleDisplayer(java.awt.Color color,
double width,
double height,
boolean inBg)
Constructor of the displayer. |
Method Summary | |
---|---|
protected double |
getTriangleHeightInEnvironmentUnits(Agent a)
Gets the width of the triangle, in environment units. |
protected double |
getTriangleWidthInEnvironmentUnits(Agent a)
Gets the width of the triangle, in environment units. |
Methods inherited from class fr.lifl.jedi.gui.display.colorGrid.view.agentDisplay.ColorTriangleDisplayer |
---|
drawAgent, isDisplayable, isDisplayedInBackground |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected double width
protected double height
Constructor Detail |
---|
public StaticColorTriangleDisplayer(java.awt.Color color, double size, boolean inBg)
color
- The color used to fill the triangle displaying the agent.size
- The width of the triangle displaying the agent, in environment units.inBg
- true
if this displayer displays agents in
the background of the frame rather than in the foreground.public StaticColorTriangleDisplayer(java.awt.Color color, double width, double height, boolean inBg)
color
- The color used to fill the triangle displaying the agent.width
- The width of the triangle displaying the agent, in environment units.height
- The height of the triangle displaying the agent, in environment units.inBg
- true
if this displayer displays agents in
the background of the frame rather than in the foreground.Method Detail |
---|
protected double getTriangleWidthInEnvironmentUnits(Agent a)
getTriangleWidthInEnvironmentUnits
in class ColorTriangleDisplayer
a
- The displayed agent.
protected double getTriangleHeightInEnvironmentUnits(Agent a)
getTriangleHeightInEnvironmentUnits
in class ColorTriangleDisplayer
a
- The displayed agent.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |