@Override public StringBinding asString() { return getDelegate().asString(); }
@Override public StringBinding asString(Locale locale, String format) { return getDelegate().asString(locale, format); }
@Override public StringBinding asString(String format) { return getDelegate().asString(format); }
@Override protected String computeValue() { if (optOffice.isPresent()) { ITradingOffice office = optOffice.get(); return office.storedAmountBinding().asString().get()+" / "+office.capacityProperty().get(); } else { return "0 / 0"; } } };
@Override protected String computeValue() { if (optOffice.isPresent()) { ITradingOffice office = optOffice.get(); return office.storedAmountBinding().asString().get() + " / " + office.capacityProperty().get(); } else { return "0 / 0"; } } };
@Override protected String computeValue() { return ship.getLoadBinding().asString().get()+" / "+(ship.getLoadableSpace())+" "+shipName; } };
@Override protected String computeValue() { return ship.getLoadBinding().asString().get()+" / "+ship.getLoadableSpace(); } };
@Override protected String computeValue() { return ship.getLoadBinding().asString().get()+" / "+(ship.getLoadableSpace())+" "+shipName; } };
@Override protected String computeValue() { return office.storedAmountBinding().asString().get() + " / " + office.capacityProperty().get(); } };
@Override protected String computeValue() { ICity actualCity = city.getCity(); return actualCity.getName()+" "+actualCity.getPopulationBinding().asString().get(); } };
@Override protected String computeValue() { ICity actualCity = city.getCity(); return actualCity.getName()+" "+actualCity.getPopulationBinding().asString().get(); } };
buyButton.setDisable(storage == null); final IntegerBinding buyPriceBinding = buyPriceBinding(movableAmount, weapon); buyButton.textProperty().bind(buyPriceBinding.asString()); buyButton.setOnAction(mouseEvent -> { if (storage != null) { sellButton.getStyleClass().add("actionButton"); final IntegerBinding sellPriceBinding = sellPriceBinding(weapon, amountToSell); sellButton.textProperty().bind(sellPriceBinding.asString()); sellButton.setOnAction(mouseEvent -> { try { amountStored.textProperty().bind(storedAmount.asString()); row.add(new ControlTableCell(amountStored));
barrelAmount.amountProperty().bind(buyAmount.asString()); row.add(new ControlTableCell(barrelAmount)); } else { BaleAmountAlwaysVisible baleAmount = new BaleAmountAlwaysVisible(); baleAmount.amountProperty().bind(buyAmount.asString()); row.add(new ControlTableCell(baleAmount)); price.amountProperty().bind(priceBinding.asString()); row.add(new ControlTableCell(price));
if (ware.isBarrelSizedWare()) { BarrelAmountAlwaysVisible barrelAmount = new BarrelAmountAlwaysVisible(); barrelAmount.amountProperty().bind(buyAmount.asString()); row.add(new ControlTableCell(barrelAmount)); } else { BaleAmountAlwaysVisible baleAmount = new BaleAmountAlwaysVisible(); baleAmount.amountProperty().bind(buyAmount.asString()); row.add(new ControlTableCell(baleAmount)); price.amountProperty().bind(priceBinding.asString()); row.add(new ControlTableCell(price));
Text amount = new Text(); amount.getStyleClass().add("dialogText"); amount.textProperty().bind(office.storedAmountBinding().divide(10).asString()); row.add(new ControlTableCell(amount)); Text additionalAmountTxt = new Text(); additionalAmountTxt.getStyleClass().add("dialogText"); additionalAmountTxt.textProperty().bind(additionalAmount.asString()); row.add(new ControlTableCell(additionalAmountTxt)); baleAmount = new BaleIconView(); Text storageCosts = new Text(); storageCosts.getStyleClass().add("dialogText"); storageCosts.textProperty().bind(storage.costsPerDayBinding().asString()); row.add(new ControlTableCell(storageCosts)); CoinIconView coinAmount = new CoinIconView(); Text guardsCosts = new Text(); guardsCosts.getStyleClass().add("dialogText"); guardsCosts.textProperty().bind(storage.guardCostsPerDayBinding().asString()); row.add(new ControlTableCell(guardsCosts)); coinAmount = new CoinIconView();
DynamicTextTableCell shipAmount = new DynamicTextTableCell(); IntegerBinding shipAmountBinding = shipAmount(weapon, ship); shipAmount.valueProperty().bind(shipAmountBinding.asString());
weaponBuyBtn.disableProperty().bind(getAmountInArmory(weapon).greaterThan(0).not()); weaponBuyBtn.setId("buyWeapon"+weapon); weaponBuyBtn.textProperty().bind(weaponBuyPrice.asString()); row.add(new ControlTableCell(weaponBuyBtn)); weaponBuyBtn.setOnAction(evt -> { weaponSellBtn.disableProperty().bind(weaponStorage.getWeaponProperty(weapon).greaterThan(0).not()); weaponSellBtn.setId("sellWeapon"+weapon); weaponSellBtn.textProperty().bind(weaponSellPrice.asString()); row.add(new ControlTableCell(weaponSellBtn)); weaponSellBtn.setOnAction(evt -> {
weaponBuyBtn.disableProperty().bind(getAmountInArmory(weapon).greaterThan(0).not()); weaponBuyBtn.setId("buyWeapon"+weapon); weaponBuyBtn.textProperty().bind(weaponPrice.asString()); row.add(new ControlTableCell(weaponBuyBtn)); weaponBuyBtn.setOnAction(evt -> {