|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
java.awt.Window
java.awt.Frame
javax.swing.JFrame
fr.lip6.sma.simulacion.app.map.MapTest
public abstract class MapTest
Classe pour la fenêtre principale du test de la carte.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JFrame |
---|
JFrame.AccessibleJFrame |
Nested classes/interfaces inherited from class java.awt.Frame |
---|
Frame.AccessibleAWTFrame |
Nested classes/interfaces inherited from class java.awt.Window |
---|
Window.AccessibleAWTWindow |
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 Map |
mAgents
Configuration des agents qui sont des joueurs. |
private MapTestApp |
mApplication
Application de test. |
private JPanel |
mBlackFrame
Background frame. |
private Configuration |
mConfiguration
Configuration. |
private Map |
mLocalAgentConfig
Configuration du joueur local (choisi au hasard). |
private String |
mLocalAgentName
Nom de l'agent local (choisi au hasard). |
private JPanel |
mMapLayout
Panel with the map. |
private MapPanel |
mMapPanel
Référence sur la carte. |
Fields inherited from class javax.swing.JFrame |
---|
accessibleContext, EXIT_ON_CLOSE, rootPane, rootPaneCheckingEnabled |
Fields inherited from class java.awt.Frame |
---|
CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, MAXIMIZED_BOTH, MAXIMIZED_HORIZ, MAXIMIZED_VERT, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSOR |
Fields inherited from class java.awt.Component |
---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface javax.swing.WindowConstants |
---|
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, HIDE_ON_CLOSE |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
MapTest(String inConfigPath)
Constructeur à partir du chemin du fichier de configuration. |
Method Summary | |
---|---|
protected void |
addMapPanel(MapPanel inMapPanel)
Ajoute la carte au cadre. |
protected void |
centerWindow()
Méthode pour centrer la fenêtre. |
protected Map |
getAgents()
Accesseur sur le tableau des joueurs. |
protected MapTestApp |
getApplication()
Accesseur sur l'application. |
protected Configuration |
getConfiguration()
Accesseur sur la configuration. |
protected Map |
getLocalAgentConfig()
Accesseur sur la configuration du joueur local. |
protected String |
getLocalAgentName()
Accesseur sur le nom du joueur local. |
void |
homeClicked()
Méthode invoquée à chaque fois que la maison du joueur local est cliquée (sans la touche majuscule). |
void |
houseClicked(String inAgentName)
Méthode invoquée à chaque fois que la maison d'un autre joueur est cliquée (sans la touche majuscule). |
protected void |
initComponents()
Méthode pour initialiser les composants au démarrage de l'application. |
String |
localizeString(String inKeyString)
Traduit une chaîne. |
void |
selectionChanged()
Méthode invoquée lorsque l'ensemble des joueurs choisis sur la carte change. |
private void |
thisWindowClosing(WindowEvent inEvent)
Méthode invoquée lorsque la case de fermeture est cliquée. |
Methods inherited from class java.awt.Frame |
---|
addNotify, finalize, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setCursor, setExtendedState, setMaximizedBounds, setMenuBar, setResizable, setState, setTitle, setUndecorated |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.awt.MenuContainer |
---|
getFont, postEvent |
Field Detail |
---|
private final MapTestApp mApplication
private final Configuration mConfiguration
private final Map mAgents
private final String mLocalAgentName
private final Map mLocalAgentConfig
private MapPanel mMapPanel
private final JPanel mBlackFrame
private final JPanel mMapLayout
Constructor Detail |
---|
public MapTest(String inConfigPath)
inConfigPath
- chemin du fichier de configuration.Method Detail |
---|
protected void initComponents()
protected final void addMapPanel(MapPanel inMapPanel)
inMapPanel
- référence sur la carte.protected final MapTestApp getApplication()
protected final Configuration getConfiguration()
protected final Map getAgents()
protected final Map getLocalAgentConfig()
protected final String getLocalAgentName()
private void thisWindowClosing(WindowEvent inEvent)
inEvent
- l'événement de fermeture de la fenêtre (ignoré).public final String localizeString(String inKeyString)
localizeString
in interface MapPanelListener
inKeyString
- chaîne à traduire.
public final void selectionChanged()
selectionChanged
in interface MapPanelListener
public final void homeClicked()
homeClicked
in interface MapPanelListener
selectionChanged()
,
houseClicked(java.lang.String)
public final void houseClicked(String inAgentName)
houseClicked
in interface MapPanelListener
inAgentName
- nom du joueur à qui appartient la maison.selectionChanged()
,
homeClicked()
protected final void centerWindow()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |