fr.lip6.sma.simulacion.app
Class TestApp

java.lang.Object
  extended by fr.lip6.sma.simulacion.app.ApplicationImpl
      extended by fr.lip6.sma.simulacion.app.GameApplicationImpl
          extended by fr.lip6.sma.simulacion.app.TestApp
All Implemented Interfaces:
Application, GameApplication, SplashWindow, SimulacionMTListener
Direct Known Subclasses:
MapTestApp

public abstract class TestApp
extends GameApplicationImpl
implements SplashWindow

Classe pour les applications de test. Charge les images.

Version:
$Revision: 3 $
Author:
Paul Guyot

Field Summary
private  boolean mLoaded
          Le chargement est-il terminé?
 
Constructor Summary
TestApp(String inConfigPath)
          Constructeur à partir du chemin de configuration.
 
Method Summary
 void dispose()
          Méthode pour libérer la fenêtre.
 double getProgress()
          Accesseur sur le niveau de progression actuel.
protected  SplashWindow getSplashWindow()
          Crée et retourne la fenêtre de démarrage.
 void imageLoaded(String inURI)
          Méthode appelée lorsqu'une image est chargée.
 void indicateProgress(double inIncrement)
          Indicateur de chargement.
 void setImageIncrement(double inNewIncrement)
          Sélecteur sur l'incrément pour les images.
protected  void setupServer()
          Démarre le serveur.
 void setVisible(boolean inVisible)
          Méthode pour afficher ou masquer la fenêtre.
protected  void startGame()
          Démarre le jeu.
 void waitForTracker()
          Attend que le chargement soit terminé.
 
Methods inherited from class fr.lip6.sma.simulacion.app.GameApplicationImpl
finishSetup, getAgentListManager, getLocalPlayer, getPlayer, init, quit, start
 
Methods inherited from class fr.lip6.sma.simulacion.app.ApplicationImpl
getAgentConfig, getAvatar, getAvatars, getConfiguration, getPlayerAgentClass, getPlayerAgentNames, getPlayerNameFromAvatarName, getTracker, loadImages, setupApplication
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface fr.lip6.sma.simulacion.app.GameApplication
getConfiguration, getGameController, getGameModel
 
Methods inherited from interface fr.lip6.sma.simulacion.app.Application
getAgentConfig, getAvatar, getAvatars, getPlayerAgentClass, getPlayerAgentNames, getPlayerNameFromAvatarName, getTracker
 

Field Detail

mLoaded

private boolean mLoaded
Le chargement est-il terminé?

Constructor Detail

TestApp

public TestApp(String inConfigPath)
Constructeur à partir du chemin de configuration.

Parameters:
inConfigPath - chemin de configuration.
Method Detail

getSplashWindow

protected final SplashWindow getSplashWindow()
Crée et retourne la fenêtre de démarrage. Cette méthode n'est appelée qu'une seule fois.

Specified by:
getSplashWindow in class ApplicationImpl
Returns:
this.

setupServer

protected void setupServer()
Démarre le serveur. Ne fait rien.

Overrides:
setupServer in class GameApplicationImpl

startGame

protected final void startGame()
Démarre le jeu. Indique que le chargement est terminé.

Specified by:
startGame in class GameApplicationImpl

waitForTracker

public final void waitForTracker()
Attend que le chargement soit terminé.


setVisible

public final void setVisible(boolean inVisible)
Méthode pour afficher ou masquer la fenêtre. (interface SplashWindow).

Specified by:
setVisible in interface SplashWindow
Parameters:
inVisible - si on doit afficher ou masquer la fenêtre.

dispose

public final void dispose()
Méthode pour libérer la fenêtre. (interface SplashWindow).

Specified by:
dispose in interface SplashWindow

setImageIncrement

public final void setImageIncrement(double inNewIncrement)
Sélecteur sur l'incrément pour les images. (interface SplashWindow).

Specified by:
setImageIncrement in interface SplashWindow
Parameters:
inNewIncrement - la nouvelle valeur de l'incrément, ajouté pour les prochaines images chargées.

getProgress

public final double getProgress()
Accesseur sur le niveau de progression actuel. (interface SplashWindow).

Specified by:
getProgress in interface SplashWindow
Returns:
le niveau de progression actuel, compris entre 0 et 1.

indicateProgress

public final void indicateProgress(double inIncrement)
Indicateur de chargement. (interface SplashWindow).

Specified by:
indicateProgress in interface SplashWindow
Parameters:
inIncrement - incrément de l'état du chargement (nombre entre 0 et 1).

imageLoaded

public final void imageLoaded(String inURI)
Méthode appelée lorsqu'une image est chargée. (interface SplashWindow).

Specified by:
imageLoaded in interface SplashWindow
Specified by:
imageLoaded in interface SimulacionMTListener
Parameters:
inURI - URI de l'image