public CoinPriceAlwaysVisible() { amount = new SimpleStringProperty(this, "amount", ""); getStylesheets().add(this.getClass().getResource("icons.css").toExternalForm()); final ImageView imageView = new ImageView(img); final Label text = new Label(); text.getStyleClass().add("iconText"); text.textProperty().bind(amount); imageView.layoutXProperty().bind(text.widthProperty().add(3)); getChildren().addAll(text, imageView); } public void setAmount(Integer amount) {
template = messageSource.getMessage("ch.sahits.game.openpatrician.display.dialog.cityhall.TreasuryDialog.headAndPropertyTax", new Object[]{}, locale.getCurrentLocal()); row.add(new StaticTextTableCell(template)); CoinPriceAlwaysVisible control = new CoinPriceAlwaysVisible(); control.amountProperty().bind(treasury.paidTaxesProperty().asString()); row.add(new ControlTableCell(control)); tableModel.add(row); template = messageSource.getMessage("ch.sahits.game.openpatrician.display.dialog.cityhall.TreasuryDialog.specialTaxes", new Object[]{}, locale.getCurrentLocal()); row.add(new StaticTextTableCell(template)); control = new CoinPriceAlwaysVisible(); control.amountProperty().bind(treasury.paidSpecialTaxesProperty().asString()); row.add(new ControlTableCell(control)); tableModel.add(row); template = messageSource.getMessage("ch.sahits.game.openpatrician.display.dialog.cityhall.TreasuryDialog.donation", new Object[]{}, locale.getCurrentLocal()); row.add(new StaticTextTableCell(template)); control = new CoinPriceAlwaysVisible(); control.amountProperty().bind(treasury.donationsProperty().asString()); row.add(new ControlTableCell(control)); tableModel.add(row); template = messageSource.getMessage("ch.sahits.game.openpatrician.display.dialog.cityhall.TreasuryDialog.donation.guardsCost", new Object[]{}, locale.getCurrentLocal()); row.add(new StaticTextTableCell(template)); control = new CoinPriceAlwaysVisible(); control.amountProperty().bind(treasury.cityGuardCostsProperty().asString()); row.add(new ControlTableCell(control)); tableModel.add(row); template = messageSource.getMessage("ch.sahits.game.openpatrician.display.dialog.cityhall.TreasuryDialog.buildCosts", new Object[]{}, locale.getCurrentLocal());
row.add(new ControlTableCell(decreasePriceLbl)); CoinPriceAlwaysVisible price = new CoinPriceAlwaysVisible(); price.amountProperty().bind(autoTrading.priceProperty(ware).asString()); price.visibleProperty().bind(new VisibleTradeTypeBinding(autoTrading.tradingTypeProperty(ware))); row.add(new ControlTableCell(price));
@Override public void applyStyle(String style) { for (Node node : getChildren()) { if (node instanceof IApplicableStyle) { ((IApplicableStyle)node).applyStyle(style); } else { node.setStyle(style); } } } }
CoinPriceAlwaysVisible buyPrice = new CoinPriceAlwaysVisible(); buyPrice.amountProperty().bind(buyPrice(ware, storedAmountProperty)); row.add(new ControlTableCell(buyPrice)); CoinPriceAlwaysVisible sellPrice = new CoinPriceAlwaysVisible(); sellPrice.amountProperty().bind(sellPrice(ware, storedAmountProperty)); row.add(new ControlTableCell(sellPrice));
CoinPriceAlwaysVisible coinPrice = new CoinPriceAlwaysVisible(); coinPrice.amountProperty().bind(rentalIncomeLastWeek); row.add(new ControlTableCell(coinPrice)); row.add(new StaticTextTableCell("")); coinPrice = new CoinPriceAlwaysVisible(); coinPrice.amountProperty().bind(rentalIncomeForecast); row.add(new ControlTableCell(coinPrice)); model.add(row); coinPrice = new CoinPriceAlwaysVisible(); coinPrice.amountProperty().bind(wagesIncomeLastWeek); row.add(new ControlTableCell(coinPrice)); row.add(new StaticTextTableCell("")); coinPrice = new CoinPriceAlwaysVisible(); coinPrice.amountProperty().bind(wagesIncomeForecast); row.add(new ControlTableCell(coinPrice)); model.add(row); coinPrice = new CoinPriceAlwaysVisible(); coinPrice.amountProperty().bind(taxLastWeek); row.add(new ControlTableCell(coinPrice)); row.add(new StaticTextTableCell("")); coinPrice = new CoinPriceAlwaysVisible(); coinPrice.amountProperty().bind(taxForecast); row.add(new ControlTableCell(coinPrice)); model.add(row);
CoinPriceAlwaysVisible price = new CoinPriceAlwaysVisible(); price.amountProperty().bind(priceBinding.asString()); row.add(new ControlTableCell(price));
CoinPriceAlwaysVisible price = new CoinPriceAlwaysVisible(); price.amountProperty().bind(priceBinding.asString()); row.add(new ControlTableCell(price));