當前位置: 首頁>>代碼示例>>Java>>正文


Java Node.rotateProperty方法代碼示例

本文整理匯總了Java中javafx.scene.Node.rotateProperty方法的典型用法代碼示例。如果您正苦於以下問題:Java Node.rotateProperty方法的具體用法?Java Node.rotateProperty怎麽用?Java Node.rotateProperty使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在javafx.scene.Node的用法示例。


在下文中一共展示了Node.rotateProperty方法的11個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: FlipInXTransition

import javafx.scene.Node; //導入方法依賴的package包/類
/**
 * Create new FlipInXTransition
 * 
 * @param node The node to affect
 */
public FlipInXTransition(final Node node) {
    super(
        node,
   new Timeline(
                new KeyFrame(Duration.millis(0), 
                    new KeyValue(node.rotateProperty(), -90, WEB_EASE),
                    new KeyValue(node.opacityProperty(), 0, WEB_EASE)
                ),
                new KeyFrame(Duration.millis(400), 
                    new KeyValue(node.rotateProperty(), 10, WEB_EASE)
                ),
                new KeyFrame(Duration.millis(700), 
                    new KeyValue(node.rotateProperty(), -10, WEB_EASE)
                ),
                new KeyFrame(Duration.millis(1000), 
                    new KeyValue(node.rotateProperty(), 0, WEB_EASE),
                    new KeyValue(node.opacityProperty(), 1, WEB_EASE)
                )
            )
        );
    setCycleDuration(Duration.seconds(1));
    setDelay(Duration.seconds(0.2));
}
 
開發者ID:EricCanull,項目名稱:fxexperience2,代碼行數:29,代碼來源:FlipInXTransition.java

示例2: FlipOutXTransition

import javafx.scene.Node; //導入方法依賴的package包/類
/**
 * Create new FlipOutXTransition
 * 
 * @param node The node to affect
 */
public FlipOutXTransition(final Node node) {
    super(
        node,
       new Timeline(
                new KeyFrame(Duration.millis(0), 
                    new KeyValue(node.rotateProperty(), 0, WEB_EASE),
                    new KeyValue(node.opacityProperty(), 1, WEB_EASE)
                ),
                new KeyFrame(Duration.millis(1000), 
                    new KeyValue(node.rotateProperty(), -90, WEB_EASE),
                    new KeyValue(node.opacityProperty(), 0, WEB_EASE)
                )
            )
        );
    setCycleDuration(Duration.seconds(1));
    setDelay(Duration.seconds(0.2));
}
 
開發者ID:EricCanull,項目名稱:fxexperience2,代碼行數:23,代碼來源:FlipOutXTransition.java

示例3: FlipOutYTransition

import javafx.scene.Node; //導入方法依賴的package包/類
/**
 * Create new FlipOutYTransition
 * 
 * @param node The node to affect
 */
public FlipOutYTransition(final Node node) {
    super(
        node,
     new Timeline(
                new KeyFrame(Duration.millis(0), 
                    new KeyValue(node.rotateProperty(), 0, WEB_EASE),
                    new KeyValue(node.opacityProperty(), 1, WEB_EASE)
                ),
                new KeyFrame(Duration.millis(1000), 
                    new KeyValue(node.rotateProperty(), -90, WEB_EASE),
                    new KeyValue(node.opacityProperty(), 0, WEB_EASE)
                )
            )
        );
    setCycleDuration(Duration.seconds(1));
    setDelay(Duration.seconds(0.2));
}
 
開發者ID:EricCanull,項目名稱:fxexperience2,代碼行數:23,代碼來源:FlipOutYTransition.java

示例4: RotateInTransition

import javafx.scene.Node; //導入方法依賴的package包/類
/**
 * Create new RotateInTransition
 * 
 * @param node The node to affect
 */
public RotateInTransition(final Node node) {
    super(
        node,
         new Timeline(
                new KeyFrame(Duration.millis(0),    
                    new KeyValue(node.opacityProperty(), 0, WEB_EASE),
                    new KeyValue(node.rotateProperty(), -200, WEB_EASE)
                ),
                new KeyFrame(Duration.millis(1000),    
                    new KeyValue(node.opacityProperty(), 1, WEB_EASE),
                    new KeyValue(node.rotateProperty(), 0, WEB_EASE)
                )
            ));
    setCycleDuration(Duration.seconds(1));
    setDelay(Duration.seconds(0.2));
}
 
開發者ID:EricCanull,項目名稱:fxexperience2,代碼行數:22,代碼來源:RotateInTransition.java

示例5: FlipTransition

import javafx.scene.Node; //導入方法依賴的package包/類
/**
 * Create new FlipTransition
 *
 * @param node The node to affect
 */
public FlipTransition(final Node node) {
    super(node, new Timeline(
            new KeyFrame(Duration.millis(0),
                    new KeyValue(node.rotateProperty(), 0, Interpolator.EASE_OUT),
                    new KeyValue(node.translateZProperty(), 0, Interpolator.EASE_OUT)),
            new KeyFrame(Duration.millis(400),
                    new KeyValue(node.translateZProperty(), -150, Interpolator.EASE_OUT),
                    new KeyValue(node.rotateProperty(), -170, Interpolator.EASE_OUT)),
            new KeyFrame(Duration.millis(500),
                    new KeyValue(node.translateZProperty(), -150, Interpolator.EASE_IN),
                    new KeyValue(node.rotateProperty(), -190, Interpolator.EASE_IN),
                    new KeyValue(node.scaleXProperty(), 1, Interpolator.EASE_IN),
                    new KeyValue(node.scaleYProperty(), 1, Interpolator.EASE_IN)),
            new KeyFrame(Duration.millis(800),
                    new KeyValue(node.translateZProperty(), 0, Interpolator.EASE_IN),
                    new KeyValue(node.rotateProperty(), -360, Interpolator.EASE_IN),
                    new KeyValue(node.scaleXProperty(), 0.95, Interpolator.EASE_IN),
                    new KeyValue(node.scaleYProperty(), 0.95, Interpolator.EASE_IN)),
            new KeyFrame(Duration.millis(1000),
                    new KeyValue(node.scaleXProperty(), 1, Interpolator.EASE_IN),
                    new KeyValue(node.scaleYProperty(), 1, Interpolator.EASE_IN))));
    this.flipNode = node;
    setCycleDuration(Duration.seconds(1));
    setDelay(Duration.seconds(0.2));
}
 
開發者ID:EricCanull,項目名稱:fxexperience2,代碼行數:31,代碼來源:FlipTransition.java

示例6: FlipInYTransition

import javafx.scene.Node; //導入方法依賴的package包/類
/**
 * Create new FlipInYTransition
 *
 * @param node The node to affect
 */
public FlipInYTransition(final Node node) {
    super(
            node,
            new Timeline(
                    new KeyFrame(Duration.millis(0),
                            new KeyValue(node.rotateProperty(), -90, WEB_EASE),
                            new KeyValue(node.opacityProperty(), 0, WEB_EASE)
                    ),
                    new KeyFrame(Duration.millis(400),
                            new KeyValue(node.rotateProperty(), 10, WEB_EASE)
                    ),
                    new KeyFrame(Duration.millis(700),
                            new KeyValue(node.rotateProperty(), -10, WEB_EASE)
                    ),
                    new KeyFrame(Duration.millis(1000),
                            new KeyValue(node.rotateProperty(), 0, WEB_EASE),
                            new KeyValue(node.opacityProperty(), 1, WEB_EASE)
                    )
            )
    );
    setCycleDuration(Duration.seconds(1));
    setDelay(Duration.seconds(0.2));
}
 
開發者ID:EricCanull,項目名稱:fxexperience2,代碼行數:29,代碼來源:FlipInYTransition.java

示例7: SwingTransition

import javafx.scene.Node; //導入方法依賴的package包/類
/**
 * Create new SwingTransition
 * 
 * @param node The node to affect
 */
public SwingTransition(final Node node) {
    super(
        node,
      new Timeline(
                new KeyFrame(Duration.millis(0), new KeyValue(node.rotateProperty(), 0, WEB_EASE)),
                new KeyFrame(Duration.millis(200), new KeyValue(node.rotateProperty(), 15, WEB_EASE)),
                new KeyFrame(Duration.millis(400), new KeyValue(node.rotateProperty(), -10, WEB_EASE)),
                new KeyFrame(Duration.millis(600), new KeyValue(node.rotateProperty(), 5, WEB_EASE)),
                new KeyFrame(Duration.millis(800), new KeyValue(node.rotateProperty(), -5, WEB_EASE)),
                new KeyFrame(Duration.millis(1000), new KeyValue(node.rotateProperty(), 0, WEB_EASE))
            )
        );
    setCycleDuration(Duration.seconds(1));
    setDelay(Duration.seconds(0.2));
}
 
開發者ID:EricCanull,項目名稱:fxexperience2,代碼行數:21,代碼來源:SwingTransition.java

示例8: RotateOutTransition

import javafx.scene.Node; //導入方法依賴的package包/類
/**
 * Create new RotateOutTransition
 * 
 * @param node The node to affect
 */
public RotateOutTransition(final Node node) {
    super(node,new Timeline(
                new KeyFrame(Duration.millis(0),    
                    new KeyValue(node.opacityProperty(), 1, WEB_EASE),
                    new KeyValue(node.rotateProperty(), 0, WEB_EASE)
                ),
                new KeyFrame(Duration.millis(1000),    
                    new KeyValue(node.opacityProperty(), 0, WEB_EASE),
                    new KeyValue(node.rotateProperty(), 200, WEB_EASE)
                )));
  
    setCycleDuration(Duration.seconds(1));
    setDelay(Duration.seconds(0.2));
}
 
開發者ID:EricCanull,項目名稱:fxexperience2,代碼行數:20,代碼來源:RotateOutTransition.java

示例9: WobbleTransition

import javafx.scene.Node; //導入方法依賴的package包/類
/**
 * Create new WobbleTransition
 * 
 * @param node The node to affect
 */
public WobbleTransition(final Node node) {
    super(
        node,
       new Timeline(
                new KeyFrame(Duration.millis(0),    
                    new KeyValue(node.translateXProperty(), 0, WEB_EASE),
                    new KeyValue(node.rotateProperty(), 0, WEB_EASE)
                ),
                new KeyFrame(Duration.millis(150),    
                    new KeyValue(node.translateXProperty(), -0.25*node.getBoundsInParent().getWidth(), WEB_EASE),
                    new KeyValue(node.rotateProperty(), -5, WEB_EASE)
                ),
                new KeyFrame(Duration.millis(300),    
                    new KeyValue(node.translateXProperty(), 0.2*node.getBoundsInParent().getWidth(), WEB_EASE),
                    new KeyValue(node.rotateProperty(), 3, WEB_EASE)
                ),
                new KeyFrame(Duration.millis(450),    
                    new KeyValue(node.translateXProperty(), -0.15*node.getBoundsInParent().getWidth(), WEB_EASE),
                    new KeyValue(node.rotateProperty(), -3, WEB_EASE)
                ),
                new KeyFrame(Duration.millis(600),    
                    new KeyValue(node.translateXProperty(), 0.1*node.getBoundsInParent().getWidth(), WEB_EASE),
                    new KeyValue(node.rotateProperty(), 2, WEB_EASE)
                ),
                new KeyFrame(Duration.millis(750),    
                    new KeyValue(node.translateXProperty(), -0.05*node.getBoundsInParent().getWidth(), WEB_EASE),
                    new KeyValue(node.rotateProperty(), -1, WEB_EASE)
                ),
                new KeyFrame(Duration.millis(1000),    
                    new KeyValue(node.translateXProperty(), 0, WEB_EASE),
                    new KeyValue(node.rotateProperty(), 0, WEB_EASE)
                )
            )
        );
    setCycleDuration(Duration.seconds(1));
    setDelay(Duration.seconds(0.2));
}
 
開發者ID:EricCanull,項目名稱:fxexperience2,代碼行數:43,代碼來源:WobbleTransition.java

示例10: IconRotation

import javafx.scene.Node; //導入方法依賴的package包/類
/**
 * An animation which rotates the icon of a button.
 *
 * @param graphic The graphic on which the icon should be animated, must not be null.
 */
public IconRotation(Node graphic) {
    rotateProperty = graphic.rotateProperty();

    rotation = new RotateTransition(DURATION, graphic);
    rotation.setInterpolator(EASE_BOTH);
    rotation.setCycleCount(INDEFINITE);
    rotation.setFromAngle(0);
    rotation.setToAngle(360);
}
 
開發者ID:tbressler,項目名稱:waterrower-workout,代碼行數:15,代碼來源:IconRotation.java

示例11: TadaTransition

import javafx.scene.Node; //導入方法依賴的package包/類
/**
 * Create new TadaTransition
 * 
 * @param node The node to affect
 */
public TadaTransition(final Node node) {
    super(
        node,
        new Timeline(
                new KeyFrame(Duration.millis(0),    
                    new KeyValue(node.scaleXProperty(), 1, WEB_EASE),
                    new KeyValue(node.scaleYProperty(), 1, WEB_EASE),
                    new KeyValue(node.rotateProperty(), 0, WEB_EASE)
                ),
                new KeyFrame(Duration.millis(100),    
                    new KeyValue(node.scaleXProperty(), 0.9, WEB_EASE),
                    new KeyValue(node.scaleYProperty(), 0.9, WEB_EASE),
                    new KeyValue(node.rotateProperty(), -3, WEB_EASE)
                ),
                new KeyFrame(Duration.millis(200),    
                    new KeyValue(node.scaleXProperty(), 0.9, WEB_EASE),
                    new KeyValue(node.scaleYProperty(), 0.9, WEB_EASE),
                    new KeyValue(node.rotateProperty(), -3, WEB_EASE)
                ),
                new KeyFrame(Duration.millis(300),    
                    new KeyValue(node.scaleXProperty(), 1.1, WEB_EASE),
                    new KeyValue(node.scaleYProperty(), 1.1, WEB_EASE),
                    new KeyValue(node.rotateProperty(), 3, WEB_EASE)
                ),
                new KeyFrame(Duration.millis(400),    
                    new KeyValue(node.scaleXProperty(), 1.1, WEB_EASE),
                    new KeyValue(node.scaleYProperty(), 1.1, WEB_EASE),
                    new KeyValue(node.rotateProperty(), -3, WEB_EASE)
                ),
                new KeyFrame(Duration.millis(500),    
                    new KeyValue(node.scaleXProperty(), 1.1, WEB_EASE),
                    new KeyValue(node.scaleYProperty(), 1.1, WEB_EASE),
                    new KeyValue(node.rotateProperty(), 3, WEB_EASE)
                ),
                new KeyFrame(Duration.millis(600),    
                    new KeyValue(node.scaleXProperty(), 1.1, WEB_EASE),
                    new KeyValue(node.scaleYProperty(), 1.1, WEB_EASE),
                    new KeyValue(node.rotateProperty(), -3, WEB_EASE)
                ),
                new KeyFrame(Duration.millis(700),    
                    new KeyValue(node.scaleXProperty(), 1.1, WEB_EASE),
                    new KeyValue(node.scaleYProperty(), 1.1, WEB_EASE),
                    new KeyValue(node.rotateProperty(), 3, WEB_EASE)
                ),
                new KeyFrame(Duration.millis(800),    
                    new KeyValue(node.scaleXProperty(), 1.1, WEB_EASE),
                    new KeyValue(node.scaleYProperty(), 1.1, WEB_EASE),
                    new KeyValue(node.rotateProperty(), -3, WEB_EASE)
                ),
                new KeyFrame(Duration.millis(900),    
                    new KeyValue(node.scaleXProperty(), 1.1, WEB_EASE),
                    new KeyValue(node.scaleYProperty(), 1.1, WEB_EASE),
                    new KeyValue(node.rotateProperty(), 3, WEB_EASE)
                ),
                new KeyFrame(Duration.millis(1000),    
                    new KeyValue(node.scaleXProperty(), 1, WEB_EASE),
                    new KeyValue(node.scaleYProperty(), 1, WEB_EASE),
                    new KeyValue(node.rotateProperty(), 0, WEB_EASE)
                )
            )
        );
    setCycleDuration(Duration.seconds(1));
    setDelay(Duration.seconds(0.2));
}
 
開發者ID:EricCanull,項目名稱:fxexperience2,代碼行數:70,代碼來源:TadaTransition.java


注:本文中的javafx.scene.Node.rotateProperty方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。