Package fr.formiko.views
Interface View
- All Superinterfaces:
 fr.formiko.usual.Progression
public interface View
extends fr.formiko.usual.Progression
Main view interface.
All views need to implement this interface !
All action sould be independent and should be launchable after 1 launch of view.ini().
All views need to implement this interface !
All action sould be independent and should be launchable after 1 launch of view.ini().
- Author:
 - Hydrolien
 
- 
Method Summary
Modifier and TypeMethodDescriptionbooleanLaunch action game part.default voidCenter map over a Case.booleanclose()close all the thing that need to be close after using view.booleanendActionGame(boolean withButton, int nextLevel, String message, GJoueur gj, boolean canResumeGame) Stop game and print the end menu.booleanintgetAntChoice(int[] t) Return the chosen value for ant action.getCCase()Return the chosen CCase.Return the value of the looked CCase.default booleanTrue if in moveMode.booleanini()Initialize all the thing that need to be Initialize before using view.default booleanTrue if grass blades are enable.voidloadingMessage(String message, int percentageDone) Print a loading message.default intmakeUserChooseInt(int min, int max, String varName) Make user choose an int in [min, max].default StringmakeUserChooseOnArray(String[] array, String varName) Make user choose in a String array.booleanLoad the save load menu.booleanmenuMain()Load main menu.booleanLoad new game menu.booleanoptions menu.booleanpersonalise a game menu.voidPrint a message.voidmove(ObjetSurCarteAId o, CCase from, CCase to) move ObjetSurCarteAId.booleanpaint()Refrech actual view.intStop game and print the escape menu.voidpopUpMessage(String message) Print a message in a new window.popUpQuestion(String message) Print a question in a new window.default booleanpopUpQuestionYN(String message) default booleanpopUpQuestionYN(String message, boolean important) booleanpopUpQuestionYN(String message, boolean important, fr.formiko.usual.CheckFunction cf) Print a yes/no question in a new window.booleansetLookedCCase(CCase cc) Change the value of the looked CCase.default voidsetMoveMode(boolean b) Default fontion to move.voidset playing ant.default voidWait for end turn if we need.Methods inherited from interface fr.formiko.usual.Progression
closeLauncher, iniLauncher, setButtonRetryVisible, setDownloadingMessage, setDownloadingValue 
- 
Method Details
- 
getActionGameOn
boolean getActionGameOn() - 
ini
boolean ini()Initialize all the thing that need to be Initialize before using view.- Returns:
 - Return true if it work well. (Nothing goes wrong.)
 
 - 
close
boolean close()close all the thing that need to be close after using view.- Returns:
 - Return true if it work well. (Nothing goes wrong.)
 
 - 
paint
boolean paint()Refrech actual view.- Returns:
 - Return true if it work well. (Nothing goes wrong.)
 
 - 
actionGame
boolean actionGame()Launch action game part.- Returns:
 - Return true if it work well. (Nothing goes wrong.)
 
 - 
pauseActionGame
int pauseActionGame()Stop game and print the escape menu.
This action can only be run if action game is on.- Returns:
 - Return 0 if it work well. (Nothing goes wrong.)
 
 - 
endActionGame
boolean endActionGame(boolean withButton, int nextLevel, String message, GJoueur gj, boolean canResumeGame) Stop game and print the end menu.
This action can only be run if action game is on.- Parameters:
 withButton- true if we need to add button "return to main menu" and "next level".nextLevel- the number of the next level to link to the button. -1 = no next level.message- message to print.gj- sorted player list to print.- Returns:
 - Return true if it work well. (Nothing goes wrong.)
 
 - 
setLookedCCase
Change the value of the looked CCase.
We need to repaint the information about this Case.
This action can only be run if action game is on.- Returns:
 - Return true if it work well. (Nothing goes wrong.)
 
 - 
getLookedCCase
CCase getLookedCCase()Return the value of the looked CCase.
This action can only be run if action game is on.- Returns:
 - lookedCCase
 
 - 
getAntChoice
int getAntChoice(int[] t) Return the chosen value for ant action.
This action can only be run if action game is on.- Returns:
 - Return ant choice.
 
 - 
getCCase
CCase getCCase()Return the chosen CCase.
It is used to move ant. - 
message
Print a message.
If message.equals("") we may need to delete last message, but we don't need to print a new message.- Parameters:
 message- the message to print.doWeNeedToDoNextCmdNow- true if we need to do next commande now.
 - 
loadingMessage
Print a loading message.- Parameters:
 message- the message to print.percentageDone- the percentage of loading curently done.
 - 
popUpMessage
Print a message in a new window.- Parameters:
 message- the message to print.
 - 
popUpQuestion
Print a question in a new window.- Parameters:
 message- the message to print.- Returns:
 - the answer.
 
 - 
popUpQuestionYN
Print a yes/no question in a new window.- Parameters:
 message- the message to print.important- some gui action will be done if truecf- CheckFunction to use to get text, default checked & launch function- Returns:
 - the answer.
 
 - 
popUpQuestionYN
 - 
popUpQuestionYN
 - 
setPlayingAnt
set playing ant.
This action can only be run if action game is on. - 
move
move ObjetSurCarteAId.
This action can only be run if action game is on.- Parameters:
 o- object to move.from- CCase that o leave.to- CCase were o is going.
 - 
waitForEndTurn
default void waitForEndTurn()Wait for end turn if we need. - 
getMoveMode
default boolean getMoveMode()True if in moveMode. - 
setMoveMode
default void setMoveMode(boolean b) Default fontion to move. - 
centerOverCase
Center map over a Case.- Parameters:
 c- case to center over
 - 
isBladesEnable
default boolean isBladesEnable()True if grass blades are enable. - 
makeUserChooseOnArray
Make user choose in a String array.- Parameters:
 array- the array where to choosevarName- the name of the variable tp choose
 - 
makeUserChooseInt
Make user choose an int in [min, max].
Default use makeUserChooseOnArray() to let user choose.- Parameters:
 min- the min valuemax- the max valuevarName- the name of the variable tp choose
 
 -