OpenPatricianSmallWaxButton back = new OpenPatricianSmallWaxButton("<"); back.getStyleClass().add("actionButton"); back.setId("back"); back.setOnAction(createPreviousAction()); OpenPatricianSmallWaxButton next = new OpenPatricianSmallWaxButton(">"); next.getStyleClass().add("actionButton"); next.setId("next"); next.setOnAction(createNextAction()); OpenPatricianLargeWaxButton action = new OpenPatricianLargeWaxButton(messageSource.getMessage("ch.sahits.game.openpatrician.display.dialog.TavernBaseSideRoomPersonDialog.accept", new Object[]{}, locale.getCurrentLocal()));
OpenPatricianSmallWaxButton yes = new OpenPatricianSmallWaxButton(messageSource.getMessage("yes", new Object[]{}, locale.getCurrentLocal())); yes.getStyleClass().add("actionButton"); yes.setId("yes"); yes.setOnAction((evt) -> { try { OpenPatricianSmallWaxButton no = new OpenPatricianSmallWaxButton(messageSource.getMessage("no", new Object[]{}, locale.getCurrentLocal())); no.getStyleClass().add("actionButton"); no.setId("no"); no.setOnAction((evt) -> { try {
previous.setId("previous"); previous.getStyleClass().add("actionButton"); previous.setOnAction(event -> previous()); setLeft(previous); final OpenPatricianSmallWaxButton next = new OpenPatricianSmallWaxButton(">"); next.setId("next"); next.getStyleClass().add("actionButton"); next.setOnAction(event -> next());
previous.setId("prev"); previous.getStyleClass().add("actionButton"); previous.setLayoutX(actionButtonX - 62 - 4); previous.disableProperty().bind(disableNavigation); final OpenPatricianSmallWaxButton next = new OpenPatricianSmallWaxButton(">"); next.setId("next"); next.getStyleClass().add("actionButton"); next.setLayoutX(actionButtonX + 124 + 4);
OpenPatricianSmallWaxButton buyButton = new OpenPatricianSmallWaxButton(""); buyButton.getStyleClass().add("actionButton"); buyButton.setId("buy"+weapon); buyButton.setDisable(storage == null); final IntegerBinding buyPriceBinding = buyPriceBinding(movableAmount, weapon);
OpenPatricianSmallWaxButton weaponBuyBtn = new OpenPatricianSmallWaxButton(""); weaponBuyBtn.disableProperty().bind(getAmountInArmory(weapon).greaterThan(0).not()); weaponBuyBtn.setId("buyWeapon"+weapon); weaponBuyBtn.textProperty().bind(weaponBuyPrice.asString()); row.add(new ControlTableCell(weaponBuyBtn)); OpenPatricianSmallWaxButton weaponSellBtn = new OpenPatricianSmallWaxButton(""); weaponSellBtn.disableProperty().bind(weaponStorage.getWeaponProperty(weapon).greaterThan(0).not()); weaponSellBtn.setId("sellWeapon"+weapon); weaponSellBtn.textProperty().bind(weaponSellPrice.asString()); row.add(new ControlTableCell(weaponSellBtn));
OpenPatricianSmallWaxButton weaponBuyBtn = new OpenPatricianSmallWaxButton(""); weaponBuyBtn.disableProperty().bind(getAmountInArmory(weapon).greaterThan(0).not()); weaponBuyBtn.setId("buyWeapon"+weapon); weaponBuyBtn.textProperty().bind(weaponPrice.asString()); row.add(new ControlTableCell(weaponBuyBtn));