Class LobbiesController
java.lang.Object
it.polimi.ingsw.eriantys.client.gui.controllers.Controller
it.polimi.ingsw.eriantys.client.gui.controllers.LobbiesController
- All Implemented Interfaces:
javafx.fxml.Initializable
A class representing the controller for the
LOBBIES scene.- See Also:
-
SceneName.LOBBIESScene
-
Field Summary
Fields inherited from class it.polimi.ingsw.eriantys.client.gui.controllers.Controller
app, client, showError, showInfo -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionjavafx.scene.layout.PaneA getter for thePaneobject associated with the FXML tag of highest level in the*.fxmlfile associated withthis.voidinitialize(URL url, ResourceBundle resourceBundle) Gets all the child nodes representing the elements of the scene from the FXML.voidEncloses the workflow ofthison a scene change event.voidupdateLobbies(List<GameInfo> availableLobbies) Gets the information about lobbies from passed parameter and shows the list in the scene.Methods inherited from class it.polimi.ingsw.eriantys.client.gui.controllers.Controller
applyGrayscale, applyGreenShade, roundBorders, setApp, setClient, setShowError, setShowInfo
-
Constructor Details
-
LobbiesController
public LobbiesController()
-
-
Method Details
-
initialize
Gets all the child nodes representing the elements of the scene from the FXML. Associates the event handlers with the buttons on the scene. -
onChangeScene
public void onChangeScene()Encloses the workflow ofthison a scene change event. The method is called before the implementation of the controller itself to pre-process eventual data. The default behaviour of the method returns immediately. Any controller should override the method if necessary. Asks for the available lobbies list and shows a reconnection message if related settings are found.- Overrides:
onChangeScenein classController
-
getTopLevelPane
public javafx.scene.layout.Pane getTopLevelPane()Description copied from class:ControllerA getter for thePaneobject associated with the FXML tag of highest level in the*.fxmlfile associated withthis. The method is called in order to process a popup. Any controller should override the method if necessary.- Specified by:
getTopLevelPanein classController- Returns:
- the highest level
Pane
-
updateLobbies
Gets the information about lobbies from passed parameter and shows the list in the scene.- Parameters:
availableLobbies- the lobbies inside which the user could join
-