javafx.scene.layout.BorderPane.widthProperty()方法的使用及代码示例

x33g5p2x  于2022-01-16 转载在 其他  
字(6.3k)|赞(0)|评价(0)|浏览(176)

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

BorderPane.widthProperty介绍

暂无

代码示例

代码示例来源:origin: com.github.giulianini.jestures/jestures

private void initProgressBar() {
  this.progressBar.minWidthProperty().bind(this.recorderPane.widthProperty());
}

代码示例来源: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: stackoverflow.com

private BorderPane root;
 private MapPane mapPane;
 private GUIPane guiPane;
 @Override
 public void start(Stage stage) {
   root = new BorderPane();
   mapPane = new MapPane();            
   guiPane = new GUIPane();
   guiPane.setManaged(false);
   root.setCenter(mapPane);
   root.getChildren().add(guiPane);
   Scene scene = new Scene(root, 800, 600);
   stage.setScene(scene);
   stage.show();
   guiPane.autosize();
   guiPane.layoutXProperty().bind(root.widthProperty().subtract(guiPane.widthProperty()).divide(2));
   guiPane.setLayoutY(20);
 }

代码示例来源: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 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: 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: stackoverflow.com

canvas.widthProperty().bind(root.widthProperty());
canvas.heightProperty().bind(heightBinding);

代码示例来源: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: com.github.giulianini.jestures/jestures

private void initUserCanvas() {
  this.userCanvas = new Canvas(this.recorderPane.getMinWidth(), this.recorderPane.getMinHeight());
  this.userCanvas.widthProperty().bind(this.recorderPane.widthProperty());
  this.userCanvas.heightProperty().bind(this.recorderPane.heightProperty());
  this.userCanvasContext = this.userCanvas.getGraphicsContext2D();
}

代码示例来源:origin: com.bitplan.gui/com.bitplan.javafx

/**
 * helper function for images
 * @param icon
 * @return the BoderPane that wraps the given icon
 */
public BorderPane wrapImageView(ImageView icon) {
 BorderPane pane = new BorderPane();
 pane.setCenter(icon);
 // resize images automatically
 // https://stackoverflow.com/a/12635224/1497139
 icon.setPreserveRatio(true);
 icon.fitHeightProperty().bind(pane.heightProperty());
 icon.fitWidthProperty().bind(pane.widthProperty());
 return pane;
}

代码示例来源:origin: com.github.giulianini.jestures/jestures

private void initLiveCanvas() {
  this.liveCanvas = new Canvas(this.recorderPane.getMinWidth(), this.recorderPane.getMinHeight());
  this.liveCanvas.widthProperty().bind(this.recorderPane.widthProperty());
  this.liveCanvas.heightProperty().bind(this.recorderPane.heightProperty());
  this.liveCanvasContext = this.liveCanvas.getGraphicsContext2D();
  this.liveCanvasStackPane.getChildren().setAll(this.liveCanvas);
}

代码示例来源: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: stackoverflow.com

clip.centerXProperty().bind(new DoubleBinding() {
    bind(root.widthProperty());

代码示例来源:origin: stackoverflow.com

showDetailsView();
detailsView.prefWidthProperty().bind(rootLayout.widthProperty());
detailsView.prefHeightProperty().bind(rootLayout.heightProperty());

代码示例来源:origin: stackoverflow.com

root.widthProperty().addListener((ChangeListener<Number>) (observable, oldValue, newValue) -> layoutItems());
pagination.currentPageIndexProperty().addListener((ChangeListener<Number>) (observable, oldValue, newValue) -> layoutItems());
pagination.pageCountProperty().addListener((ChangeListener<Number>) (observable, oldValue, newValue) -> layoutItems());

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

consolePane = new ScrollPane(console);
content.widthProperty()
    .addListener((observable, oldValue, newValue) -> console.setPrefWidth(content.getWidth() * 0.94));

代码示例来源:origin: ch.sahits.game/OpenPatricianJavaFX

overAllLayout.setCenter(placeHolder);
overAllLayout.setBottom(buttonRow);
buttonRow.prefWidthProperty().bind(overAllLayout.widthProperty());

相关文章