public Paint getFill() { return fill.getValue(); }
private static void setSpinnerBehaviour( final IntegerSpinnerValueFactory svf, final boolean useDefaultValue, final ObservableIntegerValue defaultValue, final ObjectProperty<Integer> customValue ) { if (useDefaultValue) { svf.valueProperty().unbindBidirectional(customValue); svf.setValue(defaultValue.get()); } else { svf.setValue(customValue.getValue()); svf.valueProperty().bindBidirectional(customValue); } } }
private void refreshView() { if (glyph.getValue() == null) { idLabel.setText(""); nameLabel.setText(""); return; } sizeSlider.valueProperty().addListener(observable -> glyph.get().setSize(sizeSlider.getValue())); idLabel.setText(String.format("%04d", glyph.get().getGlyphId())); nameLabel.setText(glyph.get().getName()); glyph.get().setFill(colorPicker.getValue()); glyph.get().fillProperty().bind(colorPicker.valueProperty()); centeredGlyph.getChildren().setAll(glyph.get()); }
/** * @return the default font used by the widget */ public final Font getFont() { return this.font.getValue(); }
@Override public Paint getOuterFocusColor() { return outerFocusColor == null ? null : outerFocusColor.getValue(); } }
@Override public Paint getOuterFocusColor() { return outerFocusColor == null ? null : outerFocusColor.getValue(); } }
/** * @return ToggleGroup used internally */ public ToggleGroup getToggleGroup() { return this.toggleGroupProperty().getValue(); }
/** * @return get the current font */ public final Font getFont() { return this.font == null ? Font.getDefault() : this.font.getValue(); }
@Override public void run() { Platform.runLater(runnable); if (repeatsObjectProperty.getValue().booleanValue() == false) { stop(); } } };
private double calculateA21() { double y1 = point1.getValue().getSource().getY(); double y2 = point2.getValue().getSource().getY(); double x1 = point1.getValue().getSource().getX(); double x2 = point2.getValue().getSource().getX(); double y1d = point1.getValue().getDestination().getY(); double y2d = point2.getValue().getDestination().getY(); double top = y2d - y1d - a22*(y2 - y1); double bottom = x2 - x1; return top / bottom; }
private void clearStartGoalTextFields() { startXSpinner.valueFactoryProperty().getValue().setValue(0.0); startYSpinner.valueFactoryProperty().getValue().setValue(0.0); startZSpinner.valueFactoryProperty().getValue().setValue(0.0); goalXSpinner.valueFactoryProperty().getValue().setValue(0.0); goalYSpinner.valueFactoryProperty().getValue().setValue(0.0); goalZSpinner.valueFactoryProperty().getValue().setValue(0.0); startYawSpinner.valueFactoryProperty().getValue().setValue(0.0); goalYawSpinner.valueFactoryProperty().getValue().setValue(0.0); }
private double calculateA11() { double x1 = point1.getValue().getSource().getX(); double x2 = point2.getValue().getSource().getX(); double y1 = point1.getValue().getSource().getY(); double y2 = point2.getValue().getSource().getY(); double x1d = point1.getValue().getDestination().getX(); double x2d = point2.getValue().getDestination().getX(); double top = x2d - x1d - a12*(y2 - y1); double bottom = x2 - x1; return top / bottom; } private double calculateB1() {
/** * Creates a new {@link DateField} with given property * * @param binding The property from the model to be bound with. * @return Returns a new {@link DateField}. */ public static DateField ofDate(ObjectProperty<LocalDate> binding) { return new DateField(new SimpleObjectProperty<>(binding.getValue()), new SimpleObjectProperty<>(binding.getValue())).bind(binding); }
/** * Sets the field's current value to its persistent value, thus resetting * any changes made by the user. */ public void reset() { if (!hasChanged()) { return; } selection.setValue(persistentSelection.getValue()); fireEvent(FieldEvent.fieldResetEvent(this)); }
/** * Opens a backing {@link MediaPlayer} for the embedded video. */ private void openMediaPlayer() { CompletableFuture.supplyAsync(() -> new MediaPlayer(mediaProperty.getValue())) .thenAcceptAsync(mediaPlayer -> { mediaPlayer.setAutoPlay(true); mediaPlayer.setOnEndOfMedia(mediaPlayer::stop); mediaView.setOnMouseClicked(e -> onClickHandler(mediaPlayer)); mediaView.setMediaPlayer(mediaPlayer); }, Platform::runLater); }