|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.awt.Component java.awt.Container javax.swing.JComponent javax.swing.JPanel fr.lip6.sma.simulacion.app.map.MapPanel
public abstract class MapPanel
Classe de base pour le panneau qui gère la carte.
MapTest
,
Serialized FormNested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JPanel |
---|
JPanel.AccessibleJPanel |
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
JComponent.AccessibleJComponent |
Nested classes/interfaces inherited from class java.awt.Container |
---|
Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy |
Field Summary | |
---|---|
private boolean |
mAllowMultipleSelection
Si on peut choisir plusieurs agents à la fois. |
private String |
mLocalAgentName
Nom de l'agent local, null si l'agent
local n'est pas sur la carte. |
private MapPanelListener |
mMapListener
Référence sur l'objet pour gérer les événements dans la carte. |
private Set |
mSelectedAgents
Ensemble des agents choisis. |
Fields inherited from class javax.swing.JComponent |
---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
Fields inherited from class java.awt.Component |
---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
protected |
MapPanel(MapPanelListener inMapListener,
String inLocalAgentName)
Constructeur à partir du client et du nom de l'agent local. |
Method Summary | |
---|---|
protected boolean |
getAllowMultipleSelection()
Accesseur sur la possibilité de choisir plusieurs agents à la fois. |
String |
getLocalAgentName()
Accesseur sur le nom de l'agent local ou null si l'agent
local n'est pas sur la carte. |
protected MapPanelListener |
getMapListener()
Accesseur sur le client. |
Set |
getSelectedAgents()
Accesseur sur une copie de l'ensemble des agents choisis. |
protected Set |
getSelectedAgentsSet()
Accesseur sur l'ensemble des agents choisis. |
static boolean |
isAgentOnMap(Configuration inConfiguration,
String inAgentName)
Détermine si un agent est sur la carte à partir de son nom (et de la configuration). |
void |
selectAgent(String inAgentName)
Méthode pour choisir un agent. |
void |
selectAgents(Set inAgentNames)
Méthode pour choisir des agents. |
void |
setAllowMultipleSelection(boolean inAllowMultipleSelection)
Détermine si on peut choisir plus d'un agent à la fois. |
protected abstract void |
updateSelection(Set inSelectedAgents)
Méthode appelée lorsque la sélection a changé. |
Methods inherited from class javax.swing.JPanel |
---|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private final MapPanelListener mMapListener
private final String mLocalAgentName
null
si l'agent
local n'est pas sur la carte.
private final Set mSelectedAgents
private boolean mAllowMultipleSelection
Constructor Detail |
---|
protected MapPanel(MapPanelListener inMapListener, String inLocalAgentName)
inMapListener
- référence sur le client.inLocalAgentName
- nom de l'agent local, null
si
l'agent local n'est pas sur la carte.Method Detail |
---|
protected final Set getSelectedAgentsSet()
public final Set getSelectedAgents()
protected final MapPanelListener getMapListener()
public final String getLocalAgentName()
null
si l'agent
local n'est pas sur la carte.
protected final boolean getAllowMultipleSelection()
true
si on peut choisir plus d'un agent à la fois.public final void setAllowMultipleSelection(boolean inAllowMultipleSelection)
inAllowMultipleSelection
- si on peut choisir plus d'un agent.public final void selectAgent(String inAgentName)
inAgentName
- nom de l'agent.public final void selectAgents(Set inAgentNames)
inAgentNames
- nom des agents.public static final boolean isAgentOnMap(Configuration inConfiguration, String inAgentName)
inConfiguration
- configuration générale.inAgentName
- nom de l'agent à tester.
true
si l'agent est sur la carte,
false
sinon.protected abstract void updateSelection(Set inSelectedAgents)
inSelectedAgents
- la liste des noms des agents sélectionnés.
(le processus léger courant possède le
moniteur dessus).
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |