createPromptNodeRunnable.run(); usePromptText.addListener(observable -> { createPromptNodeRunnable.run(); control.requestLayout();
@Override public void addListener(InvalidationListener listener) { getDelegate().addListener(listener); }
@Override public void addListener(ChangeListener<? super Boolean> listener) { getDelegate().addListener(listener); }
@Override public void addListener(InvalidationListener listener) { if (listener instanceof UIThreadAware) { getDelegate().addListener(listener); } else { getDelegate().addListener(new UIThreadAwareInvalidationListener(listener)); } }
@Override public void addListener(ChangeListener<? super Boolean> listener) { if (listener instanceof UIThreadAware) { getDelegate().addListener(listener); } else { getDelegate().addListener(new UIThreadAwareChangeListener<>(listener)); } }
@PostConstruct private void initializeDialog() { setTitle(messageSource.getMessage("ch.sahits.game.openpatrician.display.dialog.church.ChurchGiftDialog.title", new Object[]{}, locale.getCurrentLocal())); String template = messageSource.getMessage("ch.sahits.game.openpatrician.display.dialog.church.ChurchGiftDialog.introText", new Object[]{}, locale.getCurrentLocal()); DecoratedText text = textFactory.createDecoratedText(template, new HashMap<>()); VBox box = new VBox(text); final ICompany company = city.getPlayer().getCompany(); moneyTransfer = fxUtils.getMoneyTransfer(imageLoader); moneyTransfer.setStepSize(500); moneyTransfer.maxTransfereableProperty().bind(company.cashProperty()); moneyTransfer.setAmount(0); box.setLayoutX(50); box.setLayoutY(CLOSE_BTN_Y_POS - 500); moneyTransfer.setPadding(new Insets(100, 0, 0, 100)); box.getChildren().addAll(moneyTransfer); final int actionButtonX = (WIDTH - 124) / 2; String s = messageSource.getMessage("ch.sahits.game.openpatrician.display.dialog.church.ChurchFeedingDialog.donate", new Object[]{}, locale.getCurrentLocal()); final OpenPatricianLargeWaxButton action = new OpenPatricianLargeWaxButton(s); action.getStyleClass().add("actionButton"); action.setOnAction(getAction()); action.setLayoutX(actionButtonX); action.setLayoutY(CLOSE_BTN_Y_POS - 24); BooleanBinding actionEnabled = actionEnabledBinding(); action.setDisable(!actionEnabled.get()); actionEnabled.addListener((observableValue, oldValue, newValue) -> action.setDisable(!newValue)); getContent().addAll(box, action); }
BooleanBinding actionEnabled = actionEnabledBinding(); action.setDisable(!actionEnabled.get()); actionEnabled.addListener((observableValue, oldValue, newValue) -> action.setDisable(!newValue));
action.setLayoutY(CLOSE_BTN_Y_POS - 24); action.setDisable(!capableShipPresent.get()); capableShipPresent.addListener((observable, oldFlag, newFlag) -> action.setDisable(!newFlag));
actionEnabled.addListener((observableValue, oldValue, newValue) -> action.setDisable(!newValue));
actionEnabled.addListener((observableValue, oldValue, newValue) -> action.setDisable(!newValue));
final BooleanBinding disableAcceptButton = disableAcceptButton(); acceptBtn.setDisable(disableAcceptButton.get()); disableAcceptButton.addListener((observableValue, oldValue, newValue) -> acceptBtn.setDisable(newValue)); getContent().addAll(nextBtn, acceptBtn);
BooleanBinding actionEnabled = actionEnabledBinding(); action.setDisable(!actionEnabled.get()); actionEnabled.addListener((observableValue, oldValue, newValue) -> action.setDisable(!newValue));
BooleanBinding disable = disableAcceptBinding(); acceptButton.setDisable(disable.get()); disable.addListener((observableValue, oldValue, newValue) -> acceptButton.setDisable(newValue));
enableAction.addListener((observableValue, oldValue, newValue) -> action.setDisable(!newValue)); getContent().add(action); timerEventBus.register(this);
action.setLayoutY(CLOSE_BTN_Y_POS - 24); enablePreviousNext.addListener((observableValue, oldVBoolean, newValue) -> { next.setDisable(!newValue); previous.setDisable(!newValue);
BooleanBinding disable = disableAcceptBinding(); acceptButton.setDisable(disable.get()); disable.addListener((observableValue, oldValue, newValue) -> acceptButton.setDisable(newValue));
validKey.addListener(booleanChangeListener); booleanChangeListener.changed(validKey,validKey.get(),validKey.get()); grid.disableProperty().bind(readOnly);
validKey.addListener(booleanChangeListener); booleanChangeListener.changed(validKey,null,validKey.get());
convoyJoinLeaveLbl.setGraphic(convoyJoinLeaveGraphic); setupConvoyJoinLeaveLabel(leaveConvoyImg, joinConvoyImg, convoyJoinLeaveGraphic, convoyJoinLeaveLbl, inConvoy().getValue()); inConvoy().addListener((observable, oldValue, newValue) -> setupConvoyJoinLeaveLabel(leaveConvoyImg, joinConvoyImg, convoyJoinLeaveGraphic, convoyJoinLeaveLbl, newValue));
nextShip.setDisable(!enablePrevNext.get()); shipCatalogue.add(nextShip, 2, 0); enablePrevNext.addListener((observableValue, oldValue, newValue) -> { nextShip.setDisable(!newValue); prevShip.setDisable(!newValue);