Class ClientViewState
- java.lang.Object
-
- ch.sahits.game.openpatrician.display.ClientViewState
-
- All Implemented Interfaces:
ch.sahits.game.openpatrician.utilities.service.IPostLoadOperation
@Component @Lazy @DependentInitialisation(ch.sahits.game.openpatrician.model.initialisation.StartNewGameBean.class) public class ClientViewState extends java.lang.Object implements ch.sahits.game.openpatrician.utilities.service.IPostLoadOperationThis is the state that represents the actual state of what the client currently displayes. This differeciates between the actual states:- City
- Map
- Sea
- Author:
- Andi Hotz, (c) Sahits GmbH, 2014 Created on Feb 15, 2014
-
-
Field Summary
Fields Modifier and Type Field Description protected com.google.common.eventbus.AsyncEventBusclientEventBus
-
Constructor Summary
Constructors Constructor Description ClientViewState()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description EViewStategetState()voidhandleConvoyCreation(ch.sahits.game.openpatrician.clientserverinterface.model.event.ConvoyCreateEvent event)voidhandleConvoyDissolving(ch.sahits.game.openpatrician.clientserverinterface.model.event.ConvoyDisolveEvent event)voidhandleConvoyEvent(ch.sahits.game.openpatrician.clientserverinterface.model.event.ConvoyEvent event)voidhandleSwitchToCity(ch.sahits.game.openpatrician.event.data.SwitchCity event)voidinitializeState(ch.sahits.game.openpatrician.event.data.NewGameClient newGameDTO)Initialize the player that goes with this client.voidpostLoad()voidsetState(EViewState state)javafx.beans.property.ObjectProperty<EViewState>stateProperty()
-
-
-
Method Detail
-
initializeState
public void initializeState(ch.sahits.game.openpatrician.event.data.NewGameClient newGameDTO)
Initialize the player that goes with this client. The player does not change later on,- Parameters:
newGameDTO- parameter object for the new game
-
handleSwitchToCity
public void handleSwitchToCity(ch.sahits.game.openpatrician.event.data.SwitchCity event)
-
getState
public EViewState getState()
-
stateProperty
public javafx.beans.property.ObjectProperty<EViewState> stateProperty()
-
setState
public void setState(EViewState state)
-
postLoad
public void postLoad()
- Specified by:
postLoadin interfacech.sahits.game.openpatrician.utilities.service.IPostLoadOperation
-
handleConvoyDissolving
public void handleConvoyDissolving(ch.sahits.game.openpatrician.clientserverinterface.model.event.ConvoyDisolveEvent event)
-
handleConvoyEvent
public void handleConvoyEvent(ch.sahits.game.openpatrician.clientserverinterface.model.event.ConvoyEvent event)
-
handleConvoyCreation
public void handleConvoyCreation(ch.sahits.game.openpatrician.clientserverinterface.model.event.ConvoyCreateEvent event)
-
-