public BaleAmountAlwaysVisible() { getStylesheets().add(this.getClass().getResource("icons.css").toExternalForm()); amount = new SimpleStringProperty(this, "amount", ""); 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) {
row.add(new ControlTableCell(barrelAmount)); } else { BaleAmountAlwaysVisible baleAmount = new BaleAmountAlwaysVisible(); baleAmount.amountProperty().bind(needed.asString()); row.add(new ControlTableCell(baleAmount)); row.add(new ControlTableCell(barrelAmount)); } else { BaleAmountAlwaysVisible baleAmount = new BaleAmountAlwaysVisible(); baleAmount.amountProperty().bind(stored.asString()); row.add(new ControlTableCell(baleAmount)); row.add(new ControlTableCell(barrelAmount)); } else { BaleAmountAlwaysVisible baleAmount = new BaleAmountAlwaysVisible(); baleAmount.amountProperty().bind(buyAmount.asString()); row.add(new ControlTableCell(baleAmount));
row.add(new ControlTableCell(barrelAmount)); } else { BaleAmountAlwaysVisible baleAmount = new BaleAmountAlwaysVisible(); baleAmount.amountProperty().bind(stored.asString()); row.add(new ControlTableCell(baleAmount)); row.add(new ControlTableCell(barrelAmount)); } else { BaleAmountAlwaysVisible baleAmount = new BaleAmountAlwaysVisible(); baleAmount.setAmount(0); availableMap.addListener((MapChangeListener<IWare, IntegerProperty>) change -> { final IntegerProperty valueAdded = change.getValueAdded(); if (ware.equals(change.getKey()) && valueAdded != null) { baleAmount.amountProperty().setValue(String.valueOf(valueAdded.get()));
@Override public void applyStyle(String style) { for (Node node : getChildren()) { if (node instanceof IApplicableStyle) { ((IApplicableStyle)node).applyStyle(style); } else { node.setStyle(style); } } } }
row.add(new ControlTableCell(barrelAmount)); } else { BaleAmountAlwaysVisible baleAmount = new BaleAmountAlwaysVisible(); baleAmount.amountProperty().bind(needed.asString()); row.add(new ControlTableCell(baleAmount)); row.add(new ControlTableCell(barrelAmount)); } else { BaleAmountAlwaysVisible baleAmount = new BaleAmountAlwaysVisible(); baleAmount.amountProperty().bind(stored.asString()); row.add(new ControlTableCell(baleAmount)); row.add(new ControlTableCell(barrelAmount)); } else { BaleAmountAlwaysVisible baleAmount = new BaleAmountAlwaysVisible(); baleAmount.amountProperty().bind(buyAmount.asString()); row.add(new ControlTableCell(baleAmount));
row.add(new ControlTableCell(amount)); } else { BaleAmountAlwaysVisible amount = new BaleAmountAlwaysVisible(); amount.amountProperty().bind(autoTrading.amountProperty(ware).asString()); row.add(new ControlTableCell(amount));