Class RequiredWareCityStorage
- java.lang.Object
-
- ch.sahits.game.openpatrician.display.model.RequiredWareCityStorage
-
public class RequiredWareCityStorage extends java.lang.ObjectClass to store the required amount in to facilitate the binding. Based on the amount in storage and in the city together with the required amount bindings for the buy amount and buy price is calculated, along with the possibility that not enough wares can be purchased.- Author:
- Andi Hotz, (c) Sahits GmbH, 2017 Created on Sep 16, 2017
-
-
Constructor Summary
Constructors Constructor Description RequiredWareCityStorage(int needed, javafx.beans.property.IntegerProperty inStorageAmount, javafx.beans.property.IntegerProperty inCityAmount, ch.sahits.game.openpatrician.model.product.IWare ware, ch.sahits.game.openpatrician.model.product.ComputablePriceV2 computablePrice)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description javafx.beans.binding.IntegerBindingbuyAmountProperty()javafx.beans.binding.IntegerBindingbuyPriceProperty()javafx.beans.binding.BooleanBindingcanBuyProperty()java.lang.NumbergetBuyAmount()java.lang.NumbergetBuyPrice()java.lang.BooleangetCanBuy()javafx.beans.property.IntegerPropertyinCityProperty()javafx.beans.property.IntegerPropertyinStorageProperty()javafx.beans.property.IntegerPropertyrequiredProperty()voidsetRequired(int required)
-
-
-
Constructor Detail
-
RequiredWareCityStorage
public RequiredWareCityStorage(int needed, javafx.beans.property.IntegerProperty inStorageAmount, javafx.beans.property.IntegerProperty inCityAmount, ch.sahits.game.openpatrician.model.product.IWare ware, ch.sahits.game.openpatrician.model.product.ComputablePriceV2 computablePrice)
-
-
Method Detail
-
requiredProperty
public javafx.beans.property.IntegerProperty requiredProperty()
-
setRequired
public void setRequired(int required)
-
inStorageProperty
public javafx.beans.property.IntegerProperty inStorageProperty()
-
inCityProperty
public javafx.beans.property.IntegerProperty inCityProperty()
-
getBuyAmount
public java.lang.Number getBuyAmount()
-
buyAmountProperty
public javafx.beans.binding.IntegerBinding buyAmountProperty()
-
getBuyPrice
public java.lang.Number getBuyPrice()
-
buyPriceProperty
public javafx.beans.binding.IntegerBinding buyPriceProperty()
-
getCanBuy
public java.lang.Boolean getCanBuy()
-
canBuyProperty
public javafx.beans.binding.BooleanBinding canBuyProperty()
-
-