public class MainControllerGUI extends Object implements GUIController, FxmlController
Constructor and Description |
---|
MainControllerGUI(MainController controller,
LanguageManagerInterface languageManager)
The basic constructor, with DI thanks to Guice.
|
Modifier and Type | Method and Description |
---|---|
MapArea |
addMapPane(int x,
int y)
Create a tab with an empty matrix.
|
MapArea |
addMapPane(List<String> file)
Create a new tab containing the results of file executing.
|
void |
closeApp()
Close the application.
|
void |
executeCommands(MowerCommands command)
Make the current mower to execute the command.
|
void |
executeProgramState(int abscissa,
int ordinate)
Execute the action corresponding to the program state on the selected area.
|
MapAction |
getActionPaneController() |
MainController |
getController() |
Mower |
getCurrentlySelectedMower()
Get the current selected mower.
|
MapArea |
getCurrentMap()
Get the currently selected map.
|
HistoricPaneController |
getHistoricController() |
MenuBarController |
getMenuBarController() |
MowerListController |
getMowersListController() |
ProgramState |
getProgramState()
Return the program state, the state corresponds to the action that will be executed by executeProgramState.
|
RemoteControlController |
getRemoteControlController() |
TabMapController |
getTabMapController() |
ToolbarController |
getToolbarController() |
void |
reloadApp()
Reload the interfaces and restore the saved data.
|
void |
resetApp()
Reset the app with empty data.
|
void |
setCurrentMap(MapArea mapArea)
Set the currently selected map.
|
void |
setGlobalText(String message)
Set the message text readable from anywhere.
|
void |
setProgramState(ProgramState state)
Set the program state.
|
void |
setStageAndSetupListeners(javafx.stage.Stage stage)
Store the stage in the current controller.
|
@Inject public MainControllerGUI(MainController controller, LanguageManagerInterface languageManager)
controller
- the mower's main controller to execute program's commandlanguageManager
- the language manager used for internationalizationpublic void setGlobalText(String message)
GUIController
setGlobalText
in interface GUIController
message
- the message to setpublic MapArea addMapPane(int x, int y)
GUIController
addMapPane
in interface GUIController
x
- the width of the matrixy
- the height of the matrixpublic MapArea addMapPane(List<String> file)
GUIController
addMapPane
in interface GUIController
file
- the file to execute.public void executeCommands(MowerCommands command)
GUIController
executeCommands
in interface GUIController
command
- the command to execute.public Mower getCurrentlySelectedMower()
GUIController
getCurrentlySelectedMower
in interface GUIController
public ProgramState getProgramState()
GUIController
getProgramState
in interface GUIController
public void setProgramState(ProgramState state)
GUIController
setProgramState
in interface GUIController
state
- the program statepublic void executeProgramState(int abscissa, int ordinate)
GUIController
executeProgramState
in interface GUIController
abscissa
- the abscissa of the selected areaordinate
- the ordinate of the selected areapublic void closeApp()
GUIController
closeApp
in interface GUIController
public void reloadApp()
GUIController
reloadApp
in interface GUIController
public MapArea getCurrentMap()
GUIController
getCurrentMap
in interface GUIController
public void setCurrentMap(MapArea mapArea)
GUIController
setCurrentMap
in interface GUIController
mapArea
- the currently selected mappublic void resetApp()
GUIController
resetApp
in interface GUIController
public MainController getController()
public MenuBarController getMenuBarController()
public ToolbarController getToolbarController()
public TabMapController getTabMapController()
public HistoricPaneController getHistoricController()
public RemoteControlController getRemoteControlController()
public MowerListController getMowersListController()
public MapAction getActionPaneController()
public void setStageAndSetupListeners(javafx.stage.Stage stage)
FxmlController
setStageAndSetupListeners
in interface FxmlController
stage
- the stage to store, where the controller is technically locatedCopyright © 2016. All Rights Reserved.