toShip.disableProperty().bind(disableToShip); } else { toShip.disableProperty().bind(weaponStorage.getWeaponProperty(EWeapon.HAND_WEAPON).lessThan(1)); toOffice.disableProperty().bind(shipAmountBinding.lessThan(1)); row.add(new ControlTableCell(toOffice)); // to office DynamicTextTableCell officeAmount = new DynamicTextTableCell();
previous.setOnAction(createPreviousAction()); BooleanProperty disableNavigation = disableNavigation(); previous.disableProperty().bind(disableNavigation); final OpenPatricianSmallWaxButton next = new OpenPatricianSmallWaxButton(">"); next.setId("next"); next.setLayoutY(CLOSE_BTN_Y_POS - 48); next.setOnAction(createNextAction()); next.disableProperty().bind(disableNavigation);
previous.getStyleClass().add("actionButton"); previous.setOnAction(createPreviousAction(ware)); previous.disableProperty().bind(removeEnabled); row.add(new ControlTableCell(previous)); final OpenPatricianSmallWaxButton next = new OpenPatricianSmallWaxButton(">"); next.getStyleClass().add("actionButton"); next.setOnAction(createNextAction(ware)); next.disableProperty().bind(donateEnabled); row.add(new ControlTableCell(next));
weaponBuyBtn.disableProperty().bind(getAmountInArmory(weapon).greaterThan(0).not()); weaponBuyBtn.setId("buyWeapon"+weapon); weaponBuyBtn.textProperty().bind(weaponBuyPrice.asString()); weaponSellBtn.disableProperty().bind(weaponStorage.getWeaponProperty(weapon).greaterThan(0).not()); weaponSellBtn.setId("sellWeapon"+weapon); weaponSellBtn.textProperty().bind(weaponSellPrice.asString());
IntegerBinding weaponPrice = buyPriceBinding(weapon); OpenPatricianSmallWaxButton weaponBuyBtn = new OpenPatricianSmallWaxButton(""); weaponBuyBtn.disableProperty().bind(getAmountInArmory(weapon).greaterThan(0).not()); weaponBuyBtn.setId("buyWeapon"+weapon); weaponBuyBtn.textProperty().bind(weaponPrice.asString());