本文整理了Java中javafx.scene.layout.VBox.setTranslateX()
方法的一些代码示例,展示了VBox.setTranslateX()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。VBox.setTranslateX()
方法的具体详情如下:
包路径:javafx.scene.layout.VBox
类名称: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);
}
});
}
内容来源于网络,如有侵权,请联系作者删除!