Examples of BooleanBinding


Examples of com.sleepycat.bind.tuple.BooleanBinding

        BooleanBinding.booleanToEntry(true, entry);
  assertEquals(1, entry.getData().length);
        assertEquals(true, BooleanBinding.entryToBoolean(entry));

        new BooleanBinding().objectToEntry(Boolean.TRUE, entry);
  assertEquals(1, entry.getData().length);

        ByteBinding.byteToEntry((byte) 123, entry);
  assertEquals(1, entry.getData().length);
        assertEquals((byte) 123, ByteBinding.entryToByte(entry));
View Full Code Here

Examples of com.sleepycat.bind.tuple.BooleanBinding

        BooleanBinding.booleanToEntry(true, entry);
  assertEquals(1, entry.getData().length);
        assertEquals(true, BooleanBinding.entryToBoolean(entry));

        new BooleanBinding().objectToEntry(Boolean.TRUE, entry);
  assertEquals(1, entry.getData().length);

        ByteBinding.byteToEntry((byte) 123, entry);
  assertEquals(1, entry.getData().length);
        assertEquals((byte) 123, ByteBinding.entryToByte(entry));
View Full Code Here

Examples of javafx.beans.binding.BooleanBinding

    }

    @Override
    public ObservableBooleanValue pendingProperty() {
        if(pending == null) {
            pending = new BooleanBinding() {
                @Override
                protected boolean computeValue() {
                    return state == State.ACC_HAS_EVENT;
                }
            };
View Full Code Here

Examples of javafx.beans.binding.BooleanBinding

    }

    @Override
    public ObservableBooleanValue pendingProperty() {
        if(pending == null) {
            pending = new BooleanBinding() {
                @Override
                protected boolean computeValue() {
                    return hasEvent;
                }
            };
View Full Code Here

Examples of javafx.beans.binding.BooleanBinding

    }

    @Override
    public ObservableBooleanValue pendingProperty() {
        if(pending == null) {
            pending = new BooleanBinding() {
                @Override
                protected boolean computeValue() {
                    return expectedFuture != null;
                }
            };
View Full Code Here

Examples of javafx.beans.binding.BooleanBinding

    final CheckBox slVisibleCB = new CheckBox();
    slVisibleCB.disableProperty().bind(activateCB.selectedProperty().not());
    scopeLinesVisible.bind(slVisibleCB.selectedProperty());

    final Slider sllider = new Slider(1, 4, 1.5);
    sllider.disableProperty().bind(new BooleanBinding() {
      {
        bind(activateCB.selectedProperty(), slVisibleCB.selectedProperty());
      }

      @Override
View Full Code Here

Examples of javafx.beans.binding.BooleanBinding

        box.highlightFillProperty().bind(highlightFill);
        box.highlightTextFillProperty().bind(highlightTextFill);
        box.wrapTextProperty().bind(area.wrapTextProperty());
        box.graphicFactoryProperty().bind(area.paragraphGraphicFactoryProperty());

        BooleanBinding hasCaret = Bindings.equal(
                box.indexProperty(),
                area.currentParagraphProperty());

        // caret is visible only in the paragraph with the caret
        BooleanBinding cellCaretVisible = hasCaret.and(caretVisible);
        box.caretVisibleProperty().bind(cellCaretVisible);

        // bind cell's caret position to area's caret column,
        // when the cell is the one with the caret
        org.fxmisc.easybind.Subscription caretPositionSub =
                EasyBind.when(hasCaret).bind(
                        box.caretPositionProperty(),
                        area.caretColumnProperty());

        // keep paragraph selection updated
        ObjectBinding<IndexRange> cellSelection = Bindings.createObjectBinding(() -> {
            int idx = box.getIndex();
            return idx != -1
                    ? area.getParagraphSelection(idx)
                    : StyledTextArea.EMPTY_RANGE;
        }, area.selectionProperty(), box.indexProperty());
        box.selectionProperty().bind(cellSelection);

        return new Cell<Paragraph<S>, ParagraphBox<S>>() {
            @Override
            public ParagraphBox<S> getNode() {
                return box;
            }

            @Override
            public void updateIndex(int index) {
                box.setIndex(index);
            }

            @Override
            public void dispose() {
                box.highlightFillProperty().unbind();
                box.highlightTextFillProperty().unbind();
                box.wrapTextProperty().unbind();
                box.graphicFactoryProperty().unbind();

                box.caretVisibleProperty().unbind();
                cellCaretVisible.dispose();
                hasCaret.dispose();
                caretPositionSub.unsubscribe();

                box.selectionProperty().unbind();
                cellSelection.dispose();
View Full Code Here

Examples of javafx.beans.binding.BooleanBinding

        textColorPicker.valueProperty().addListener((o, old, color) -> updateTextColor(color));

        undoBtn.disableProperty().bind(Bindings.not(area.undoAvailableProperty()));
        redoBtn.disableProperty().bind(Bindings.not(area.redoAvailableProperty()));

        BooleanBinding selectionEmpty = new BooleanBinding() {
            { bind(area.selectionProperty()); }

            @Override
            protected boolean computeValue() {
                return area.getSelection().getLength() == 0;
View Full Code Here

Examples of javafx.beans.binding.BooleanBinding

    public DefaultFilters(final TimeLineController controller) {
        super("apply default filters");
        this.controller = controller;
        eventsModel = controller.getEventsModel();
        disabledProperty().bind(new BooleanBinding() {
            {
                bind(eventsModel.getRequestedZoomParamters());
            }

            @Override
View Full Code Here

Examples of javafx.beans.binding.BooleanBinding

    public ZoomOut(final TimeLineController controller) {
        super("apply default filters");
        this.controller = controller;
        eventsModel = controller.getEventsModel();
        disabledProperty().bind(new BooleanBinding() {
            {
                bind(eventsModel.getRequestedZoomParamters());
            }

            @Override
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.