public class CityPlayerProxyJFX extends Object implements ch.sahits.game.openpatrician.clientserverinterface.client.ICityPlayerProxyJFX
| Type | Property and Description |
|---|---|
javafx.beans.property.ObjectProperty<ch.sahits.game.openpatrician.model.ship.INavigableVessel> |
activeShip
Reference the active ship of the player
|
| Modifier and Type | Field and Description |
|---|---|
private javafx.beans.property.ObjectProperty<ch.sahits.game.openpatrician.model.ship.INavigableVessel> |
activeShip
Reference the active ship of the player
|
private ch.sahits.game.openpatrician.model.city.ICity |
city |
private com.google.common.eventbus.AsyncEventBus |
clientServerEventBus |
private ch.sahits.game.openpatrician.utilities.spring.DependentAnnotationConfigApplicationContext |
context |
private ch.sahits.game.openpatrician.model.IHumanPlayer |
player |
private javafx.beans.binding.ListBinding<ch.sahits.game.openpatrician.model.ship.IShip> |
playersShips |
private javafx.collections.ObservableList<ch.sahits.game.openpatrician.model.ship.INavigableVessel> |
playersVessels
List holding all ships owned by the player currently present in the city
|
| Constructor and Description |
|---|
CityPlayerProxyJFX(ch.sahits.game.openpatrician.model.city.ICity city,
ch.sahits.game.openpatrician.model.IHumanPlayer player,
ch.sahits.game.openpatrician.model.ship.INavigableVessel activeShip)
/**
Constructor initializing the city and the player with one ship in port.
|
| Modifier and Type | Method and Description |
|---|---|
void |
activateShip(ch.sahits.game.openpatrician.model.ship.INavigableVessel ship)
Activate a ship.
|
javafx.beans.property.ObjectProperty<ch.sahits.game.openpatrician.model.ship.INavigableVessel> |
activeShipProperty()
Reference the active ship of the player
|
void |
arrive(ch.sahits.game.openpatrician.model.ship.INavigableVessel ship)
A ship arrives in the city
|
ch.sahits.game.openpatrician.model.ship.INavigableVessel |
getActiveShip()
Gets the value of the property activeShip.
|
javafx.collections.ObservableList<ch.sahits.game.openpatrician.model.ship.INavigableVessel> |
getPlayersNavalVessels() |
javafx.collections.ObservableList<ch.sahits.game.openpatrician.model.ship.IShip> |
getPlayersShips() |
void |
handleShipBecomesUnavailable(ch.sahits.game.openpatrician.event.data.ShipBecomesUnavailableEvent event) |
void |
handleShipEntersPort(ch.sahits.game.openpatrician.event.data.ShipEntersPortEvent event) |
void |
handleShipLeavesPort(ch.sahits.game.openpatrician.event.data.ShipLeavingPort event) |
void |
leave(ch.sahits.game.openpatrician.model.ship.INavigableVessel ship)
Ship leave the city
|
void |
postLoad()
Execute after savegame was loaded triggered from the ClientViewState.
|
private void |
register() |
private void |
unregister() |
public javafx.beans.property.ObjectProperty<ch.sahits.game.openpatrician.model.ship.INavigableVessel> activeShipProperty
activeShipProperty in interface ch.sahits.game.openpatrician.clientserverinterface.client.ICityPlayerProxyJFXgetActiveShip()private ch.sahits.game.openpatrician.model.city.ICity city
private ch.sahits.game.openpatrician.model.IHumanPlayer player
private javafx.collections.ObservableList<ch.sahits.game.openpatrician.model.ship.INavigableVessel> playersVessels
private javafx.beans.binding.ListBinding<ch.sahits.game.openpatrician.model.ship.IShip> playersShips
@Autowired @Qualifier(value="serverClientEventBus") private com.google.common.eventbus.AsyncEventBus clientServerEventBus
private javafx.beans.property.ObjectProperty<ch.sahits.game.openpatrician.model.ship.INavigableVessel> activeShip
@Autowired private ch.sahits.game.openpatrician.utilities.spring.DependentAnnotationConfigApplicationContext context
public CityPlayerProxyJFX(ch.sahits.game.openpatrician.model.city.ICity city,
ch.sahits.game.openpatrician.model.IHumanPlayer player,
ch.sahits.game.openpatrician.model.ship.INavigableVessel activeShip)
city - player - activeShip - @PostConstruct private void register()
@PreDestroy private void unregister()
public void activateShip(ch.sahits.game.openpatrician.model.ship.INavigableVessel ship)
IllegalArgumentException will be thrownactivateShip in interface ch.sahits.game.openpatrician.clientserverinterface.client.ICityPlayerProxyJFXship - IllegalArgumentException - if the ship cannot be activated due to its non existencepublic javafx.collections.ObservableList<ch.sahits.game.openpatrician.model.ship.INavigableVessel> getPlayersNavalVessels()
getPlayersNavalVessels in interface ch.sahits.game.openpatrician.clientserverinterface.client.ICityPlayerProxyJFXpublic void arrive(ch.sahits.game.openpatrician.model.ship.INavigableVessel ship)
arrive in interface ch.sahits.game.openpatrician.clientserverinterface.client.ICityPlayerProxyJFXship - public void leave(ch.sahits.game.openpatrician.model.ship.INavigableVessel ship)
leave in interface ch.sahits.game.openpatrician.clientserverinterface.client.ICityPlayerProxyJFXship - public javafx.collections.ObservableList<ch.sahits.game.openpatrician.model.ship.IShip> getPlayersShips()
getPlayersShips in interface ch.sahits.game.openpatrician.clientserverinterface.client.ICityPlayerProxyJFXpublic void handleShipLeavesPort(ch.sahits.game.openpatrician.event.data.ShipLeavingPort event)
public void handleShipEntersPort(ch.sahits.game.openpatrician.event.data.ShipEntersPortEvent event)
public void handleShipBecomesUnavailable(ch.sahits.game.openpatrician.event.data.ShipBecomesUnavailableEvent event)
public void postLoad()
public ch.sahits.game.openpatrician.model.ship.INavigableVessel getActiveShip()
getActiveShip in interface ch.sahits.game.openpatrician.clientserverinterface.client.ICityPlayerProxyJFXpublic javafx.beans.property.ObjectProperty<ch.sahits.game.openpatrician.model.ship.INavigableVessel> activeShipProperty()
activeShipProperty in interface ch.sahits.game.openpatrician.clientserverinterface.client.ICityPlayerProxyJFXgetActiveShip()Copyright © 2011-2018 Sahits GmbH. All Rights Reserved.