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

x33g5p2x  于2022-01-31 转载在 其他  
字(2.0k)|赞(0)|评价(0)|浏览(100)

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

VBox.setTranslateX介绍

暂无

代码示例

代码示例来源:origin: org.copper-engine/copper-monitoring-client

private void createLegend() {
  VBox pane = new VBox();
  // pane.setScaleX(0.5);
  // pane.setScaleY(0.5);
  pane.getChildren().add(new Label("Legend"));
  pane.getChildren().add(createLegendEntry("adapter", AdapterAnimation.ADAPTER_COLOR));
  pane.getChildren().add(createLegendEntry("adapter method call", CallAnimation.ADAPTER_CALL_COLOR));
  pane.getChildren().add(createLegendEntry("notify correlation id ", NotifyAnimation.ADAPTER_NOTIFY_COLOR));
  pane.getChildren().add(createLegendEntry("workflow launch", LaunchAnimation.ADAPTER_LAUNCH_COLOR));
  pane.getChildren().add(createLegendEntry("workflow instance", WorkflowAnimation.WORKFLOW_COLOR));
  pane.setStyle("-fx-border-color: black; -fx-border-width: 1;");
  pane.setTranslateX(3);
  pane.setTranslateY(animationPane.getHeight() - 150);
  animationPane.getChildren().add(pane);
}

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

menu.setTranslateX(-190);
TranslateTransition menuTranslation = new TranslateTransition(Duration.millis(500), menu);

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

public GTAVMenu(GameApplication app, MenuType type) {
  super(app, type);
  menuBody = type == MenuType.MAIN_MENU
      ? createMenuBodyMainMenu()
      : createMenuBodyGameMenu();
  vbox.getChildren().addAll(new Pane(), new Pane());
  vbox.setTranslateX(50);
  vbox.setTranslateY(50);
  contentRoot.setTranslateX(280);
  contentRoot.setTranslateY(130);
  menuRoot.getChildren().add(vbox);
  contentRoot.getChildren().add(EMPTY);
  vbox.getChildren().set(0, makeMenuBar());
  activeProperty().addListener((observable, wasActive, isActive) -> {
    if (!isActive) {
      // the scene is no longer active so reset everything
      // so that next time scene is active everything is loaded properly
      switchMenuTo(menuBody);
      switchMenuContentTo(EMPTY);
    }
  });
}

相关文章