当前位置: 首页>>代码示例>>Java>>正文


Java Group.setTranslateY方法代码示例

本文整理汇总了Java中javafx.scene.Group.setTranslateY方法的典型用法代码示例。如果您正苦于以下问题:Java Group.setTranslateY方法的具体用法?Java Group.setTranslateY怎么用?Java Group.setTranslateY使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在javafx.scene.Group的用法示例。


在下文中一共展示了Group.setTranslateY方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createRectangle

import javafx.scene.Group; //导入方法依赖的package包/类
public static Group createRectangle(Color color, double tx, double ty, double sx, double sy) {
    Group squareGroup = new Group();
    Rectangle squareShape = new Rectangle(1.0, 1.0);
    squareShape.setFill(color);
    squareShape.setTranslateX(-0.5);
    squareShape.setTranslateY(-0.5);
    squareGroup.getChildren().add(squareShape);
    squareGroup.setTranslateX(tx);
    squareGroup.setTranslateY(ty);
    squareGroup.setScaleX(sx);
    squareGroup.setScaleY(sy);
    return squareGroup;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:14,代码来源:Xylophone.java

示例2: initializeLocationTypeIndicatorArrows

import javafx.scene.Group; //导入方法依赖的package包/类
private void initializeLocationTypeIndicatorArrows() {

        // Initial indicator
        final Group initialLocationGuideContainer = controller.initialLocationGuideContainer;
        final Path initialLocationGuideArrow = controller.initialLocationGuideArrow;
        final Label initialLocationGuideLabel = controller.initialLocationGuideLabel;

        drawIndicatorArrow(initialLocationGuideArrow);
        initialLocationGuideContainer.setRotate(-45-90);
        initialLocationGuideContainer.setTranslateX(2.3 * GRID_SIZE);
        initialLocationGuideContainer.setTranslateY(3.8 * GRID_SIZE);
        initialLocationGuideLabel.setRotate(180);
        initialLocationGuideLabel.setTranslateY(10.5);
        initialLocationGuideContainer.toFront();
        initialLocationGuideContainer.setOpacity(0);

        // Final indicator
        final Group finalLocationGuideContainer = controller.finalLocationGuideContainer;
        final Path finalLocationGuideArrow = controller.finalLocationGuideArrow;
        final Label finalLocationGuideLabel = controller.finalLocationGuideLabel;

        drawIndicatorArrow(finalLocationGuideArrow);
        finalLocationGuideContainer.setRotate(45);
        finalLocationGuideContainer.setTranslateX(-2.3 * GRID_SIZE);
        finalLocationGuideContainer.setTranslateY(-3.8 * GRID_SIZE);
        finalLocationGuideLabel.setTranslateY(10.5);
        finalLocationGuideContainer.toFront();
        finalLocationGuideContainer.setOpacity(0);

        if (!controller.getComponent().isFirsTimeShown()) {
            initialLocationGuideContainer.setOpacity(1);
            finalLocationGuideContainer.setOpacity(1);
            playIndicatorAnimations(Location.Type.INITIAL, initialLocationGuideContainer);
            playIndicatorAnimations(Location.Type.FINAl, finalLocationGuideContainer);
            controller.getComponent().setFirsTimeShown(true);
        }


    }
 
开发者ID:ulriknyman,项目名称:H-Uppaal,代码行数:40,代码来源:ComponentPresentation.java


注:本文中的javafx.scene.Group.setTranslateY方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。