Examples of BooleanBinding


Examples of javafx.beans.binding.BooleanBinding

        wordsArea.textProperty().addListener(o -> {
            if (origDate.equals(datePicker.getValue()))
                datePicker.setValue(null);
        });

        BooleanBinding datePickerIsInvalid = or(
                datePicker.valueProperty().isNull(),

                createBooleanBinding(() ->
                        datePicker.getValue().isAfter(LocalDate.now())
                , /* depends on */ datePicker.valueProperty())
        );

        // Don't let the user click restore if the words area contains the current wallet words, or are an invalid set,
        // or if the date field isn't set, or if it's in the future.
        restoreButton.disableProperty().bind(
                or(
                        or(
                                not(validator.valid),
                                equal(origWords, wordsArea.textProperty())
                        ),

                        datePickerIsInvalid
                )
        );

        // Highlight the date picker in red if it's empty or in the future, so the user knows why restore is disabled.
        datePickerIsInvalid.addListener((dp, old, cur) -> {
            if (cur) {
                datePicker.getStyleClass().add("validation_error");
            } else {
                datePicker.getStyleClass().remove("validation_error");
            }
View Full Code Here

Examples of javafx.beans.binding.BooleanBinding

        isValid = new TextFieldValidator(field, predicate).valid;
    }

    public static void autoDisableButton(Button button, ValidationLink... links) {
        List<BooleanProperty> props = stream(links).map(ValidationLink::isValidProperty).collect(toList());
        BooleanBinding allValid = GuiUtils.conjunction(props);
        button.disableProperty().bind(allValid.not());
    }
View Full Code Here

Examples of javafx.beans.binding.BooleanBinding

    public static void checkGuiThread() {
        checkState(Platform.isFxApplicationThread());
    }

    public static BooleanBinding conjunction(List<BooleanProperty> list) {
        BooleanBinding accumulator = new SimpleBooleanProperty(true).and(list.get(0));
        for (int i = 1; i < list.size(); i++) {
            accumulator = accumulator.and(list.get(i));
        }
        return accumulator;
    }
View Full Code Here

Examples of javafx.beans.binding.BooleanBinding

          flashProperty.set(false);
        }
      };
     
      flashTimeline.getKeyFrames().addAll(new KeyFrame(Duration.ZERO, startEvent), new KeyFrame(Duration.millis(500), endEvent), new KeyFrame(Duration.millis(1000)));
      caretVisible = new BooleanBinding() {
        {
          bind(selectedProperty(), flashProperty);
        }
        @Override
        protected boolean computeValue() {
View Full Code Here

Examples of org.jitterbit.ui.property.BooleanBinding

        cb.setOpaque(false);
        return cb;
    }

    private void bindProperties() {
        BooleanBinding b = BooleanBinding.bind(model, TableSelectionModel.INCLUDE_SCHEMA, includeSchemaBox);
        b.syncUi();
    }
View Full Code Here

Examples of org.jitterbit.ui.property.BooleanBinding

        if (replaceField != null) {
            Property<String> replaceString = model.getProperty(TextSearchModel.REPLACE_STRING);
            bindings.add(new TextBinding(replaceString, replaceField));
        }
        Property<Boolean> caseSensitive = model.getProperty(TextSearchModel.CASE_SENSITIVE);
        bindings.add(new BooleanBinding(caseSensitive, caseSensitiveSelector));
        Property<Boolean> wholeWords = model.getProperty(TextSearchModel.WHOLE_WORDS);
        bindings.add(new BooleanBinding(wholeWords, wholeWordsSelector));
        Property<Boolean> wrap = model.getProperty(TextSearchModel.WRAP_SEARCH);
        bindings.add(new BooleanBinding(wrap, wrapSelector));
        Property<SearchDirection> searchDirection = model.getProperty(TextSearchModel.DIRECTION);
        bindings.add(new SearchDirectionBinding(searchDirection, directionPanel));
        return bindings;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.