|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectfr.lip6.sma.simulacion.app.map.MapShapesItemCollection
public abstract class MapShapesItemCollection
Classe pour une collection de représentation des agents. Cette collection est mise à jour lorsque les agents apparaissent et, optionnellement, disparaissent.
Field Summary | |
---|---|
private Map |
mCollection
Collection des formes. |
private MapMultiCellModel |
mMapModel
Modèle de l'environnement. |
private boolean |
mRemoveAgents
Si on supprime les agents lorsqu'ils disparaissent. |
private MapShapesModel |
mShapesModel
Modèle avec les formes. |
Constructor Summary | |
---|---|
MapShapesItemCollection(MapShapesModel inShapesModel,
MapMultiCellModel inEnvModel,
boolean inRemoveAgents)
Constructeur à partir du modèle des formes et d'un booléen. |
Method Summary | |
---|---|
void |
addAgent(String inName)
Ajoute un agent dans la collection. |
protected abstract JPanel |
createItem(String inName,
int inShapeID,
Color inColor)
Méthode qui construit un élément à partir d'information sur la forme. |
private void |
doRemoveAgent(String inName)
Supprime un agent de la collection. |
private void |
doUpdateAgentSet(Set inAgentSet)
Mise à jour de la liste des formes des agents. |
JPanel |
getAgent(String inName)
Accesseur sur un agent de la collection. |
void |
removeAgent(String inName)
Supprime un agent de la collection. |
void |
updateAgentSet()
Mise à jour de la liste des agents. |
void |
updateAgentSet(Set inAgentSet)
Mise à jour de la liste des agents. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private final MapShapesModel mShapesModel
private final MapMultiCellModel mMapModel
private final boolean mRemoveAgents
private final Map mCollection
Constructor Detail |
---|
public MapShapesItemCollection(MapShapesModel inShapesModel, MapMultiCellModel inEnvModel, boolean inRemoveAgents)
inShapesModel
- modèle des formes.inEnvModel
- modèle de l'environnement.inRemoveAgents
- si on supprime vraiment les agents.Method Detail |
---|
protected abstract JPanel createItem(String inName, int inShapeID, Color inColor)
inName
- nom de l'agent.inShapeID
- identifiant de la forme.inColor
- couleur de l'avatar.
public void addAgent(String inName)
inName
- nom de l'agent.public JPanel getAgent(String inName)
inName
- nom de l'agent.
null
si la collection ne
contient pas l'objet en question.public void removeAgent(String inName)
inName
- nom de l'agent.private void doRemoveAgent(String inName)
inName
- nom de l'agent.public void updateAgentSet()
public void updateAgentSet(Set inAgentSet)
inAgentSet
- liste des agents.private void doUpdateAgentSet(Set inAgentSet)
inAgentSet
- liste des agents.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |