@Component @Lazy @DependentInitialisation(value=ch.sahits.game.openpatrician.model.initialisation.StartNewGameBean.class) public class ClientViewState extends Object implements ch.sahits.game.openpatrician.utilities.service.IPostLoadOperation
| Type | Property and Description |
|---|---|
javafx.beans.property.ObjectProperty<EViewState> |
state
Main state
|
| Modifier and Type | Field and Description |
|---|---|
protected com.google.common.eventbus.AsyncEventBus |
clientEventBus |
private com.google.common.eventbus.AsyncEventBus |
clientServerEventBus |
private org.springframework.context.ApplicationContext |
context |
private Optional<ch.sahits.game.openpatrician.clientserverinterface.client.ICityPlayerProxyJFX> |
currentCityProxy
proxy for the city is only present when the state is city
|
private org.apache.logging.log4j.Logger |
logger |
private ch.sahits.game.openpatrician.model.IHumanPlayer |
player
The player behind the client
|
private javafx.beans.property.ObjectProperty<EViewState> |
state
Main state
|
| Constructor and Description |
|---|
ClientViewState() |
| Modifier and Type | Method and Description |
|---|---|
EViewState |
getState()
Gets the value of the property state.
|
void |
handleSwitchToCity(ch.sahits.game.openpatrician.event.data.SwitchCity event) |
private void |
initEventBus() |
void |
initializeState(ch.sahits.game.openpatrician.event.data.NewGameClient newGameDTO)
Initialize the player that goes with this client.
|
void |
postLoad() |
void |
setState(EViewState state)
Sets the value of the property state.
|
javafx.beans.property.ObjectProperty<EViewState> |
stateProperty()
Main state
|
private void |
unregister() |
public javafx.beans.property.ObjectProperty<EViewState> stateProperty
getState(),
setState(EViewState)private final org.apache.logging.log4j.Logger logger
private javafx.beans.property.ObjectProperty<EViewState> state
private Optional<ch.sahits.game.openpatrician.clientserverinterface.client.ICityPlayerProxyJFX> currentCityProxy
private ch.sahits.game.openpatrician.model.IHumanPlayer player
@Autowired @Qualifier(value="serverClientEventBus") private com.google.common.eventbus.AsyncEventBus clientServerEventBus
@Autowired @Qualifier(value="clientEventBus") protected com.google.common.eventbus.AsyncEventBus clientEventBus
@Autowired private org.springframework.context.ApplicationContext context
@PostConstruct private void initEventBus()
@PreDestroy private void unregister()
public void initializeState(ch.sahits.game.openpatrician.event.data.NewGameClient newGameDTO)
newGameDTO - public void handleSwitchToCity(ch.sahits.game.openpatrician.event.data.SwitchCity event)
public EViewState getState()
public javafx.beans.property.ObjectProperty<EViewState> stateProperty()
getState(),
setState(EViewState)public void setState(EViewState state)
public void postLoad()
postLoad in interface ch.sahits.game.openpatrician.utilities.service.IPostLoadOperationCopyright © 2011-2018 Sahits GmbH. All Rights Reserved.