javafx.scene.control.Label.translateYProperty()方法的使用及代码示例

x33g5p2x  于2022-01-23 转载在 其他  
字(2.1k)|赞(0)|评价(0)|浏览(144)

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

Label.translateYProperty介绍

暂无

代码示例

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

private void animateWaitingLabel() {
 waitingLabel.translateYProperty().set(30);
 KeyValue kv = new KeyValue(waitingLabel.opacityProperty(), 0);
 Timeline timeline = new Timeline(new KeyFrame(Duration.millis(1000), kv));
 timeline.setCycleCount(Timeline.INDEFINITE);
 timeline.setAutoReverse(true);
 timeline.play();
}

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

selectedLabel.translateYProperty().set(32);

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

barGroup.translateYProperty().unbind();
label.translateXProperty().unbind();
label.translateYProperty().unbind();
switch (pos) {
  case BOTTOM:
    barGroup.setTranslateY(0);
    label.translateXProperty().bind(width.divide(2).subtract(label.widthProperty().divide(2)));
    label.translateYProperty().bind(height);
    break;
  case LEFT:
    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:

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

barGroup.translateYProperty().unbind();
label.translateXProperty().unbind();
label.translateYProperty().unbind();
switch (pos) {
  case BOTTOM:
    barGroup.setTranslateY(0);
    label.translateXProperty().bind(width.divide(2).subtract(label.widthProperty().divide(2)));
    label.translateYProperty().bind(height);
    break;
  case LEFT:
    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:

相关文章