javafx.beans.property.ReadOnlyDoubleProperty.divide()方法的使用及代码示例

x33g5p2x  于2022-01-28 转载在 其他  
字(9.7k)|赞(0)|评价(0)|浏览(68)

本文整理了Java中javafx.beans.property.ReadOnlyDoubleProperty.divide方法的一些代码示例,展示了ReadOnlyDoubleProperty.divide的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ReadOnlyDoubleProperty.divide方法的具体详情如下:
包路径:javafx.beans.property.ReadOnlyDoubleProperty
类名称:ReadOnlyDoubleProperty
方法名:divide

ReadOnlyDoubleProperty.divide介绍

暂无

代码示例

代码示例来源:origin: jfoenixadmin/JFoenix

bottomBar.setMaxHeight(64);
bottomBar.getTransforms().add(scale);
scale.pivotYProperty().bind(bottomBar.heightProperty().divide(2));
bottomBar.setPickOnBounds(false);

代码示例来源:origin: jfoenixadmin/JFoenix

scale = new Scale(1, 1, 0, 0);
rotate = new Rotate(0, 0, 1);
rotate.pivotYProperty().bind(selectedTabLine.heightProperty().divide(2));

代码示例来源:origin: at.bestsolution.efxclipse.rt/org.eclipse.fx.ui.controls

public void bindHorizontalScrollbar(ScrollBar bar) {
  bar.setMin(0);
  DoubleBinding max = this.contentBody.widthProperty().subtract(widthProperty());
  DoubleBinding factor = this.contentBody.widthProperty().divide(max);
  bar.maxProperty().bind(this.contentBody.widthProperty().divide(factor));
  bar.visibleAmountProperty().bind(widthProperty().divide(factor));
  this.offsetX.bind(bar.valueProperty());
}

代码示例来源:origin: PhoenicisOrg/phoenicis

private InstallationDetailsPanel createInstallationDetailsPanel() {
  final InstallationDetailsPanel detailsPanel = new InstallationDetailsPanel();
  detailsPanel.setOnClose(this::closeDetailsView);
  detailsPanel.prefWidthProperty().bind(content.widthProperty().divide(2));
  return detailsPanel;
}

代码示例来源:origin: PhoenicisOrg/phoenicis

private ShortcutEditingDetailsPanel createShortcutEditingPanel() {
  final ShortcutEditingDetailsPanel shortcutEditingDetailsPanel = new ShortcutEditingDetailsPanel(objectMapper);
  shortcutEditingDetailsPanel.setOnClose(this::closeDetailsView);
  shortcutEditingDetailsPanel.setOnShortcutChanged(shortcutManager::updateShortcut);
  shortcutEditingDetailsPanel.prefWidthProperty().bind(content.widthProperty().divide(3));
  return shortcutEditingDetailsPanel;
}

代码示例来源:origin: PhoenicisOrg/phoenicis

private ShortcutCreationDetailsPanel createShortcutCreationPanel() {
  final ShortcutCreationDetailsPanel shortcutCreationDetailsPanel = new ShortcutCreationDetailsPanel();
  shortcutCreationDetailsPanel.setOnClose(this::closeDetailsView);
  shortcutCreationDetailsPanel.setContainersPath(containersPath);
  shortcutCreationDetailsPanel.setOnCreateShortcut(this::createShortcut);
  shortcutCreationDetailsPanel.prefWidthProperty().bind(content.widthProperty().divide(3));
  return shortcutCreationDetailsPanel;
}

代码示例来源:origin: PhoenicisOrg/phoenicis

private EngineDetailsPanel createEngineDetailsPanel() {
  final EngineDetailsPanel detailsPanel = new EngineDetailsPanel();
  detailsPanel.setOnClose(this::closeDetailsView);
  detailsPanel.setOnEngineInstall(this::installEngine);
  detailsPanel.setOnEngineDelete(this::deleteEngine);
  detailsPanel.prefWidthProperty().bind(content.widthProperty().divide(3));
  return detailsPanel;
}

代码示例来源:origin: org.jrebirth.af/core

/**
 * Bind a task to a progress property to follow its progression.
 *
 * @param task the service task that we need to follow the progression
 * @param progressBar graphical progress bar
 */
private void bindProgressProperty(final ServiceTaskBase<?> task, final DoubleProperty progressProperty) {
  // Perform this binding into the JAT to respect widget and task API
  JRebirth.runIntoJAT("Bind Progress Property to " + task.getServiceHandlerName(),
            () -> {
              // Avoid the progress bar to display 100% at start up
              task.updateProgress(0, 0);
              // Bind the progress bar
              progressProperty.bind(task.workDoneProperty().divide(task.totalWorkProperty()));
            });
}

代码示例来源:origin: PhoenicisOrg/phoenicis

private LibraryDetailsPanel createLibraryDetailsPanel() {
  final LibraryDetailsPanel detailsPanel = new LibraryDetailsPanel(objectMapper, selectedShortcut);
  detailsPanel.setOnClose(this::closeDetailsView);
  detailsPanel.setOnShortcutRun(this::runShortcut);
  detailsPanel.setOnShortcutStop(this::stopShortcut);
  detailsPanel.setOnShortcutUninstall(this::uninstallShortcut);
  detailsPanel.prefWidthProperty().bind(content.widthProperty().divide(3));
  return detailsPanel;
}

代码示例来源:origin: org.jrebirth.af/core

/**
 * Bind a task to a progress bar widget to follow its progression.
 *
 * @param task the service task that we need to follow the progression
 * @param progressBar graphical progress bar
 */
private void bindProgressBar(final ServiceTaskBase<?> task, final ProgressBar progressBar) {
  // Perform this binding into the JAT to respect widget and task API
  JRebirth.runIntoJAT("Bind ProgressBar to " + task.getServiceHandlerName(),
            () -> {
              // Avoid the progress bar to display 100% at start up
              task.updateProgress(0, 0);
              // Bind the progress bar
              progressBar.progressProperty().bind(task.workDoneProperty().divide(task.totalWorkProperty()));
            });
}

代码示例来源:origin: PhoenicisOrg/phoenicis

private ObjectBinding<ApplicationDetailsPanel> createApplicationDetailsPanel() {
  final ApplicationDetailsPanel applicationPanel = new ApplicationDetailsPanel(scriptInterpreter, filter,
      selectedApplication);
  applicationPanel.setShowScriptSource(javaFxSettingsManager.isViewScriptSource());
  applicationPanel.setOnClose(this::closeDetailsView);
  applicationPanel.webEngineStylesheetProperty().bind(themeManager.webEngineStylesheetProperty());
  applicationPanel.prefWidthProperty().bind(content.widthProperty().divide(3));
  return Bindings.when(Bindings.isNotNull(selectedApplication))
      .then(applicationPanel)
      .otherwise((ApplicationDetailsPanel) null);
}

代码示例来源:origin: org.gillius/jfxutils

group.scaleXProperty().bind( ret.widthProperty().divide( w ) );
group.scaleYProperty().bind( ret.heightProperty().divide( h ) );

代码示例来源:origin: com.nexitia.emaginplatform/emagin-jfxcore-engine

/**
  * Constructor
  */
 public NotifsFilter() {
  //allNotifs.setText(ms.getMessage("ALL_NOTIFICATIONS_LABEL", null, null));
  //newNotifs.setText(ms.getMessage("NEW_NOTIFICATIONS_LABEL", null, null));
  allNotifs.setText("ALL_NOTIFICATIONS_LABEL");
  newNotifs.setText("NEW_NOTIFICATIONS_LABEL");
  NodeHelper.setHgrow(allNotifs, newNotifs);
  allNotifs.getStyleClass().addAll("notifications-filter-button", "transparent-focus", "scale-down-on-click");
  newNotifs.getStyleClass().addAll("notifications-filter-button", "transparent-focus", "scale-down-on-click");
  allNotifs.prefHeightProperty().bind(heightProperty());
  newNotifs.prefHeightProperty().bind(heightProperty());
  allNotifs.prefWidthProperty().bind(widthProperty().divide(2));
  newNotifs.prefWidthProperty().bind(widthProperty().divide(2));
  getChildren().addAll(allNotifs, newNotifs);
  getStyleClass().add("notifications-filters-container");
  allNotifs.setOnAction(e -> filter.setAll(NotificationStatus.NEW, NotificationStatus.READEN));
  newNotifs.setOnAction(e -> filter.setAll(NotificationStatus.NEW));
 }
}

代码示例来源:origin: at.bestsolution.efxclipse.rt/org.eclipse.fx.ui.controls

this.icon.layoutXProperty().bind(this.icon.widthProperty().divide(-2));
  this.icon.layoutYProperty().bind(this.icon.heightProperty().divide(-2));
} else if( location == Location.TOP_RIGHT ) {
  this.icon.layoutXProperty().bind(Bindings.createDoubleBinding(() -> {
    return Double.valueOf(c.getWidth() - this.icon.widthProperty().get() / 2);
  },this.icon.widthProperty(), c.widthProperty()));
  this.icon.layoutYProperty().bind(this.icon.heightProperty().divide(-2));
} else if( location == Location.BOTTOM_LEFT ) {
  this.icon.layoutXProperty().bind(this.icon.widthProperty().divide(-2));
  this.icon.layoutYProperty().bind(Bindings.createDoubleBinding(() -> {
    return Double.valueOf(c.getHeight() - this.icon.heightProperty().get() / 2);

代码示例来源:origin: com.github.almasb/fxgl-base

barGroup.setTranslateX(0);
  barGroup.setTranslateY(0);
  label.translateXProperty().bind(width.divide(2).subtract(label.widthProperty().divide(2)));
  label.translateYProperty().bind(height);
  break;
  barGroup.setTranslateY(0);
  label.setTranslateX(0);
  label.translateYProperty().bind(height.divide(2).subtract(label.heightProperty().divide(2)));
  break;
case RIGHT:
  barGroup.setTranslateY(0);
  label.translateXProperty().bind(width.add(10));
  label.translateYProperty().bind(height.divide(2).subtract(label.heightProperty().divide(2)));
  break;
case TOP:
  barGroup.setTranslateX(0);
  barGroup.translateYProperty().bind(label.heightProperty());
  label.translateXProperty().bind(width.divide(2).subtract(label.widthProperty().divide(2)));
  label.setTranslateY(0);
  break;

代码示例来源:origin: com.github.almasb/fxgl-ui

barGroup.setTranslateX(0);
  barGroup.setTranslateY(0);
  label.translateXProperty().bind(width.divide(2).subtract(label.widthProperty().divide(2)));
  label.translateYProperty().bind(height);
  break;
  barGroup.setTranslateY(0);
  label.setTranslateX(0);
  label.translateYProperty().bind(height.divide(2).subtract(label.heightProperty().divide(2)));
  break;
case RIGHT:
  barGroup.setTranslateY(0);
  label.translateXProperty().bind(width.add(10));
  label.translateYProperty().bind(height.divide(2).subtract(label.heightProperty().divide(2)));
  break;
case TOP:
  barGroup.setTranslateX(0);
  barGroup.translateYProperty().bind(label.heightProperty());
  label.translateXProperty().bind(width.divide(2).subtract(label.widthProperty().divide(2)));
  label.setTranslateY(0);
  break;

代码示例来源:origin: PhoenicisOrg/phoenicis

panel.prefWidthProperty().bind(this.containersView.getTabPane().widthProperty().divide(3));

代码示例来源:origin: com.jfoenix/jfoenix

bottomBar.setMaxHeight(64);
bottomBar.getTransforms().add(scale);
scale.pivotYProperty().bind(bottomBar.heightProperty().divide(2));
bottomBar.setPickOnBounds(false);

代码示例来源:origin: com.jfoenix/jfoenix

scale = new Scale(1, 1, 0, 0);
rotate = new Rotate(0, 0, 1);
rotate.pivotYProperty().bind(selectedTabLine.heightProperty().divide(2));

代码示例来源:origin: com.github.wshackle/poseList3DPlot

subScene3D.widthProperty().bind(SCENE_PARENT.widthProperty());
scene3DController.getCenterWinTranslate().xProperty().bind(SCENE_PARENT.widthProperty().divide(3));
scene3DController.getCenterWinTranslate().yProperty().bind(SCENE_PARENT.heightProperty().multiply(2.0 / 3.0));

相关文章