Package javafx.beans.binding

Examples of javafx.beans.binding.StringBinding


        setHgap(10);
        GridPane.setConstraints(splineEditorControl, 0, 0, 1, 10
                , HPos.CENTER, VPos.CENTER, Priority.ALWAYS, Priority.ALWAYS);
        final Label codeLabel = new Label();
        codeLabel.setId("CodeLabel");
        codeLabel.textProperty().bind(new StringBinding() {
            { bind(splineEditorControl.controlPoint1xProperty(),
                    splineEditorControl.controlPoint1yProperty(),
                    splineEditorControl.controlPoint2xProperty(),
                    splineEditorControl.controlPoint2yProperty()); }
            @Override protected String computeValue() {
View Full Code Here


       
        Slider saturationSlider = SliderBuilder.create().min(0).max(100).id("SaturationSlider").build();
        saturationSlider.valueProperty().bindBidirectional(sat);
        GridPane.setConstraints(saturationSlider, 1, 1);
       
        saturationSlider.styleProperty().bind(new StringBinding() {
            { bind(color); }
            @Override protected String computeValue() {
                return "picker-color: hsb("+hue.get()+",100%,100%);";
            }
        });
View Full Code Here

        setMinWidth(USE_PREF_SIZE);
        setMaxWidth(Double.MAX_VALUE);
        setAlignment(Pos.BASELINE_LEFT);
        getStyleClass().add("color-picker");
        color.set(startColor);
        textProperty().bind(new StringBinding() {
            { bind(color); }
            @Override protected String computeValue() {
                return getWebColor(getColor());
            }
        });
View Full Code Here

        baseColorPicker.setMaxWidth(120);
        GridPane.setConstraints(desiredColorPicker, 1, 6);
        desiredColorPicker.setPrefWidth(120);
        desiredColorPicker.setMaxWidth(120);
        // FORWARD
        forwardDerivationLabel.textProperty().bind(new StringBinding() {
            { bind(derivationSlider.valueProperty()); }
            @Override protected String computeValue() {
                return String.format("%3.1f%%", derivationSlider.getValue());
            }
        });
        derivedResultColor = new Region();
        derivedResultColor.setPrefSize(50, 20);
        derivedResultLabel.setGraphic(derivedResultColor);
        derivedResultColor.styleProperty().bind(new StringBinding() {
            { bind(derivationSlider.valueProperty(),baseColorPicker.colorProperty()); }
            @Override protected String computeValue() {
                return "-fx-border-color: black; -fx-background-color: derive("+baseColorPicker.getWebColor()+", "+derivationSlider.getValue()+"%);";
            }
        });
        derivedResultLabel.textProperty().bind(new StringBinding() {
            { bind(derivationSlider.valueProperty(),baseColorPicker.colorProperty()); }
            @Override protected String computeValue() {
                Color base = baseColorPicker.getColor();
                double derivation = derivationSlider.getValue();
                Color result = Utils.deriveColor(base, derivation/100);
View Full Code Here

  private final ObjectProperty<ResourceBundle> resourceBundle = new SimpleObjectProperty<ResourceBundle>();

  @Override
  public StringProperty getString(final Element element, final NodeType nodeType) {
    SimpleStringProperty string = new SimpleStringProperty();
    string.bind(new StringBinding() {

      {
        bind(resourceBundle);
      }
View Full Code Here

    @Override
    public void initialize(URL location, ResourceBundle resources) {

        lblServer.textProperty().bind(viewModel.server);

        lblPort.textProperty().bind(new StringBinding() {
            {
                super.bind(viewModel.port);
            }

            @Override
            protected String computeValue() {
                return viewModel.port.getValue() != null ? Integer.toString(viewModel.port.get()) : "";
            }
        });

        lblStatus.textProperty().bind(new StringBinding() {
            {
                super.bind(viewModel.status);
            }

            @Override
View Full Code Here

                        }
                    }
                    return null;
                }
            });
            lblName.textProperty().bind(new StringBinding() {
                {
                    super.bind(contactItem.contact);
                }

                @Override
View Full Code Here

    final Slider rSlider = new Slider(50, 150, 86);
    rSlider.disableProperty().bind(activateCB.selectedProperty().not());
    radius.bind(rSlider.valueProperty());
    Label rL = new Label();
    rL.textProperty().bind(new StringBinding() {
      {
        bind(rSlider.valueProperty());
      }

      @Override
      protected String computeValue() {
        return df.format(rSlider.getValue()) + "px";
      }
    });

    final Slider fmSlider = new Slider(3, 10, 5.5);
    fmSlider.disableProperty().bind(activateCB.selectedProperty().not());
    frameWidth.bind(fmSlider.valueProperty());
    Label fmL = new Label();
    fmL.textProperty().bind(new StringBinding() {
      {
        bind(fmSlider.valueProperty());
      }

      @Override
      protected String computeValue() {
        return df.format(fmSlider.getValue()) + "px";
      }
    });

    final Slider sfSlider = new Slider(1, 8, 3);
    sfSlider.disableProperty().bind(activateCB.selectedProperty().not());
    scaleFactor.bind(sfSlider.valueProperty());
    Label sfL = new Label();
    sfL.textProperty().bind(new StringBinding() {
      {
        bind(sfSlider.valueProperty());
      }

      @Override
      protected String computeValue() {
        return df.format(sfSlider.getValue()) + "";
      }
    });

    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
      protected boolean computeValue() {
        if (!activateCB.isSelected() || !slVisibleCB.isSelected()) {
          return true;
        }
        return false;
      }
    });
    scopeLineWidth.bind(sllider.valueProperty());
    Label slL = new Label();
    slL.textProperty().bind(new StringBinding() {
      {
        bind(sllider.valueProperty());
      }

      @Override
View Full Code Here

        this.formatProvider = formatProvider;
    }

    public Node createNode(final ElementController controller) throws NodeCreationException {
        Label label = new Label();
        label.textProperty().bind(new StringBinding() {

            {
                bind(controller);
            }
View Full Code Here

     *
     * @return
     */
    public StringProperty getLabel() {
        StringProperty stringProperty = new SimpleStringProperty();
        stringProperty.bind(new StringBinding() {
            {
                super.bind(resourceBundle);
            }

            @Override
View Full Code Here

TOP

Related Classes of javafx.beans.binding.StringBinding

Copyright © 2018 www.massapicom. 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.