private void updateDrawerAnimation(double translation) { translateProperty.set(translation); translateTo = translation; }
/** * sets the horizontal spacing in the grid * * @param spacing horizontal spacing */ public final void setHSpacing(final double spacing) { this.hSpacingProperty().set(spacing); }
/** * sets the vertical spacing in the grid * * @param spacing vertical spacing */ public final void setVSpacing(final double spacing) { this.vSpacingProperty().set(spacing); }
/** * sets the cell height of the masonry pane grid * * @param cellHeight of the grid */ public final void setCellHeight(final double cellHeight) { this.cellHeightProperty().set(cellHeight); }
/** * sets the cell width of the masonry pane grid * * @param cellWidth of the grid */ public final void setCellWidth(final double cellWidth) { this.cellWidthProperty().set(cellWidth); }
public final void setFixedCellSize(double value) { fixedCellSizeProperty().set(value); } public final double getFixedCellSize() { return fixedCellSizeProperty().get(); }
public void setSecondaryProgress(double secondaryProgress) { secondaryProgressProperty().set(secondaryProgress); } }
public final void setScalingFactor(final double scalingFactor) { this.scalingFactorProperty().set(scalingFactor); }
/** * set mini drawer mode (the drawer will be animated by changing the size instead * of translation).You can disable this mode, by setting the size value <= 0 * * @param size value */ public void setMiniDrawerSize(double size) { this.miniDrawerSize.set(size); if (size > 0) { updateSize(size); initTranslate.unbind(); initTranslate.set(0); paddingSizeProperty.set(size); } else { updateSize(getDefaultDrawerSize()); initTranslate.bind(initTranslateBinding); paddingSizeProperty.set(0); } resizeTo = size; }
public void setDefaultDrawerSize(double size) { defaultSizeProperty.set(size); if (getMiniDrawerSize() < 0) { updateSize(size); } }
private void updateTextPos() { double textWidth = textNode.getLayoutBounds().getWidth(); final double promptWidth = promptText == null ? 0 : promptText.getLayoutBounds().getWidth(); switch (getHAlignment()) { case CENTER: linesWrapper.promptTextScale.setPivotX(promptWidth / 2); double midPoint = textRight.get() / 2; double newX = midPoint - textWidth / 2; if (newX + textWidth <= textRight.get()) { textTranslateX.set(newX); } break; case LEFT: linesWrapper.promptTextScale.setPivotX(0); break; case RIGHT: linesWrapper.promptTextScale.setPivotX(promptWidth); break; } }
private void updateTextPos() { double textWidth = textNode.getLayoutBounds().getWidth(); final double promptWidth = promptText == null ? 0 : promptText.getLayoutBounds().getWidth(); switch (getHAlignment()) { case CENTER: linesWrapper.promptTextScale.setPivotX(promptWidth / 2); double midPoint = textRight.get() / 2; double newX = midPoint - textWidth / 2; if (newX + textWidth <= textRight.get()) { textTranslateX.set(newX); } break; case LEFT: linesWrapper.promptTextScale.setPivotX(0); break; case RIGHT: linesWrapper.promptTextScale.setPivotX(promptWidth); break; } }
angle.set(Math.toDegrees(2 * Math.PI / 12)); int tmp = Integer.parseInt(selectedHourLabel.getText()); if (is24HourView) { timeLabel.set(selectedHourLabel); } else if (newVal == TimeUnit.MINUTES) { angle.set(Math.toDegrees(2 * Math.PI / 60)); pointerRotate.set(minsPointerRotate); timeLabel.set(selectedMinLabel);
scrollDriection.set(Math.min(Math.max(scrollDriection.get() + dy / size, 0), 1)); if (Math.abs(dy) < 0.001) { timeline.stop();
private void updateContent() { paddingPane.setPrefSize(0, 0); paddingPane.setMinSize(0, 0); Node contentNode = content; switch (getDirection()) { case TOP: contentNode = new VBox(paddingPane, content); VBox.setVgrow(content, Priority.ALWAYS); break; case BOTTOM: contentNode = new VBox(content, paddingPane); VBox.setVgrow(content, Priority.ALWAYS); break; case LEFT: contentNode = new HBox(paddingPane, content); HBox.setHgrow(content, Priority.ALWAYS); break; case RIGHT: contentNode = new HBox(content, paddingPane); HBox.setHgrow(content, Priority.ALWAYS); break; } contentNode.setPickOnBounds(false); if (isOpened()) { paddingSizeProperty.set(computePaddingSize()); } contentHolder.getChildren().setAll(contentNode); }
container.setCursor(Cursor.HAND); container.setOnMousePressed(press -> { offsetProperty.set(header.scrollOffset); double offset = isLeftArrow ? header.scrollOffset + header.headersRegion.getWidth() : header.scrollOffset - header.headersRegion .getWidth();
myScale.set(scale);