|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.microedition.lcdui.Displayable
javax.microedition.lcdui.Canvas
javax.microedition.lcdui.game.GameCanvas
vue.Fenetre
public class Fenetre
Gère le plateau niveau graphique : Les pions visibles sont représentés par des images représentant un numéro avec un fond transparents. Les pions nont visibles seront représentés par la couleur correspondant au joueur
Field Summary | |
---|---|
private javax.microedition.lcdui.Image |
background
|
private javax.microedition.lcdui.Command |
commandeJouer
|
private javax.microedition.lcdui.Command |
commandeMenu
|
protected int[][] |
coordonnesXCases
|
protected int[][] |
coordonnesYCases
|
private int |
coordXCurseur
|
private int |
coordYCurseur
|
private javax.microedition.lcdui.Image |
curseurPNG
|
private javax.microedition.lcdui.Display |
display
|
private int |
margeGauche
|
private int |
margeHaute
|
private MenuInGame |
menuInGame
|
private Plateau |
modelePlateau
|
private java.lang.Thread |
runner
|
private Stratego |
stratego
|
private int |
tailleCase
|
private int |
tempsAttente
|
private boolean |
threadEnVie
|
private java.lang.Thread |
threadSource
|
Fields inherited from class javax.microedition.lcdui.game.GameCanvas |
---|
DOWN_PRESSED, FIRE_PRESSED, GAME_A_PRESSED, GAME_B_PRESSED, GAME_C_PRESSED, GAME_D_PRESSED, LEFT_PRESSED, RIGHT_PRESSED, UP_PRESSED |
Fields inherited from class javax.microedition.lcdui.Canvas |
---|
DOWN, FIRE, GAME_A, GAME_B, GAME_C, GAME_D, KEY_NUM0, KEY_NUM1, KEY_NUM2, KEY_NUM3, KEY_NUM4, KEY_NUM5, KEY_NUM6, KEY_NUM7, KEY_NUM8, KEY_NUM9, KEY_POUND, KEY_STAR, LEFT, RIGHT, UP |
Constructor Summary | |
---|---|
Fenetre(javax.microedition.lcdui.Display display,
Stratego stratego,
java.lang.Thread thread)
Constructeur |
Method Summary | |
---|---|
private void |
afficherLesPions(javax.microedition.lcdui.Graphics g)
Affiche les pions des joueurs sur le plateau |
void |
commandAction(javax.microedition.lcdui.Command c,
javax.microedition.lcdui.Displayable arg1)
Gère la pression des commande prédéfinies |
private java.lang.String |
convertGrade(int gradeInt)
Convertit le grade de sa forme entière en chaine |
private void |
dessinerGrilleDepart(javax.microedition.lcdui.Graphics g)
Dessine la grille en fonction du placement des pions |
private void |
envoyerPlateau()
Envoie le plateau par bluetooth |
Plateau |
getPlateau()
|
Stratego |
getStratego()
|
boolean |
isThreadEnVie()
|
private void |
mettreAjourEcran(javax.microedition.lcdui.Graphics g)
Met l'écran à jour à partir du modèle |
private void |
mouvementCurseur()
Gère le mouvement du curseur |
private void |
placerPion(Case uneCase,
Pion unPion)
Place un pion sur une case |
void |
revelerPion(Case uneCase)
Révèle le pion sur la case passée en paramètre. |
void |
run()
Exécute le thread. |
void |
setPlateau(Plateau plateau)
|
void |
setThreadEnVie(boolean threadEnVie)
|
void |
start(java.lang.Thread thread)
Démarre l'application à son état initial |
Methods inherited from class javax.microedition.lcdui.game.GameCanvas |
---|
flushGraphics, flushGraphics, getGraphics, getKeyStates, paint |
Methods inherited from class javax.microedition.lcdui.Canvas |
---|
getGameAction, getKeyCode, getKeyName, hasPointerEvents, hasPointerMotionEvents, hasRepeatEvents, hideNotify, isDoubleBuffered, keyPressed, keyReleased, keyRepeated, pointerDragged, pointerPressed, pointerReleased, repaint, repaint, serviceRepaints, setCommandListener, setFullScreenMode, showNotify, sizeChanged |
Methods inherited from class javax.microedition.lcdui.Displayable |
---|
addCommand, getHeight, getTicker, getTitle, getWidth, isShown, removeCommand, setTicker, setTitle |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private int tailleCase
private int margeGauche
private int margeHaute
protected int[][] coordonnesXCases
protected int[][] coordonnesYCases
private int coordXCurseur
private int coordYCurseur
private int tempsAttente
private Plateau modelePlateau
private javax.microedition.lcdui.Command commandeMenu
private javax.microedition.lcdui.Command commandeJouer
private Stratego stratego
private javax.microedition.lcdui.Display display
private java.lang.Thread runner
private java.lang.Thread threadSource
private javax.microedition.lcdui.Image background
private javax.microedition.lcdui.Image curseurPNG
private MenuInGame menuInGame
private boolean threadEnVie
Constructor Detail |
---|
public Fenetre(javax.microedition.lcdui.Display display, Stratego stratego, java.lang.Thread thread)
display
- instance de Display pour afficher une fenetrestratego
- instance du Strategothread
- threadMethod Detail |
---|
public void start(java.lang.Thread thread)
public void run()
run
in interface java.lang.Runnable
private void mouvementCurseur()
private void placerPion(Case uneCase, Pion unPion)
public void revelerPion(Case uneCase)
uneCase
- case dont on veut voir le pionprivate void mettreAjourEcran(javax.microedition.lcdui.Graphics g)
private void dessinerGrilleDepart(javax.microedition.lcdui.Graphics g)
private void afficherLesPions(javax.microedition.lcdui.Graphics g)
public void commandAction(javax.microedition.lcdui.Command c, javax.microedition.lcdui.Displayable arg1)
commandAction
in interface javax.microedition.lcdui.CommandListener
private void envoyerPlateau()
private java.lang.String convertGrade(int gradeInt)
public Stratego getStratego()
public Plateau getPlateau()
public void setPlateau(Plateau plateau)
public boolean isThreadEnVie()
public void setThreadEnVie(boolean threadEnVie)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |