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


Java Rotate.angleProperty方法代碼示例

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


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

示例1: starting

import javafx.scene.transform.Rotate; //導入方法依賴的package包/類
@Override protected void starting() {
    super.starting();
    rotate = new Rotate(0,
            node.getBoundsInLocal().getWidth(),
            node.getBoundsInLocal().getHeight());
    timeline = new Timeline(
            new KeyFrame(Duration.millis(0),    
                new KeyValue(node.opacityProperty(), 0, WEB_EASE),
                new KeyValue(rotate.angleProperty(), 90, WEB_EASE)
            ),
            new KeyFrame(Duration.millis(1000),    
                new KeyValue(node.opacityProperty(), 1, WEB_EASE),
                new KeyValue(rotate.angleProperty(), 0, WEB_EASE)
            )
        );
    node.getTransforms().add(rotate);
}
 
開發者ID:EricCanull,項目名稱:fxexperience2,代碼行數:18,代碼來源:RotateInDownRightTransition.java

示例2: starting

import javafx.scene.transform.Rotate; //導入方法依賴的package包/類
@Override protected void starting() {
    super.starting();
    rotate = new Rotate(0,
            node.getBoundsInLocal().getWidth(),
            node.getBoundsInLocal().getHeight());
    timeline = new Timeline(
            new KeyFrame(Duration.millis(0),    
                new KeyValue(node.opacityProperty(), 1, WEB_EASE),
                new KeyValue(rotate.angleProperty(), 0, WEB_EASE)
            ),
            new KeyFrame(Duration.millis(1000),    
                new KeyValue(node.opacityProperty(), 0, WEB_EASE),
                new KeyValue(rotate.angleProperty(), 90, WEB_EASE)
            )
        );
    node.getTransforms().add(rotate);
}
 
開發者ID:EricCanull,項目名稱:fxexperience2,代碼行數:18,代碼來源:RotateOutUpRightTransition.java

示例3: starting

import javafx.scene.transform.Rotate; //導入方法依賴的package包/類
@Override protected void starting() {
    super.starting();
    rotate = new Rotate(0,
            node.getBoundsInLocal().getWidth(),
            node.getBoundsInLocal().getHeight());
  timeline = new Timeline(
            new KeyFrame(Duration.millis(0),    
                new KeyValue(node.opacityProperty(), 0, WEB_EASE),
                new KeyValue(rotate.angleProperty(), -90, WEB_EASE)
            ),
            new KeyFrame(Duration.millis(1000),    
                new KeyValue(node.opacityProperty(), 1, WEB_EASE),
                new KeyValue(rotate.angleProperty(), 0, WEB_EASE)
            )
        );
    node.getTransforms().add(rotate);
}
 
開發者ID:EricCanull,項目名稱:fxexperience2,代碼行數:18,代碼來源:RotateInUpRightTransition.java

示例4: starting

import javafx.scene.transform.Rotate; //導入方法依賴的package包/類
@Override protected void starting() {
    super.starting();
    rotate = new Rotate(0,
            node.getBoundsInLocal().getWidth(),
            node.getBoundsInLocal().getHeight());
    timeline = new Timeline(
            new KeyFrame(Duration.millis(0),    
                new KeyValue(node.opacityProperty(), 1, WEB_EASE),
                new KeyValue(rotate.angleProperty(), 0, WEB_EASE)
            ),
            new KeyFrame(Duration.millis(1000),    
                new KeyValue(node.opacityProperty(), 0, WEB_EASE),
                new KeyValue(rotate.angleProperty(), -90, WEB_EASE)
            )
        );
    node.getTransforms().add(rotate);
}
 
開發者ID:EricCanull,項目名稱:fxexperience2,代碼行數:18,代碼來源:RotateOutDownRightTransition.java

示例5: starting

import javafx.scene.transform.Rotate; //導入方法依賴的package包/類
@Override protected void starting() {
    super.starting();
    rotate = new Rotate(0,0,node.getBoundsInLocal().getHeight());
    timeline = new Timeline(
            new KeyFrame(Duration.millis(0),    
                new KeyValue(node.opacityProperty(), 0, WEB_EASE),
                new KeyValue(rotate.angleProperty(), -90, WEB_EASE)
            ),
            new KeyFrame(Duration.millis(1000),    
                new KeyValue(node.opacityProperty(), 1, WEB_EASE),
                new KeyValue(rotate.angleProperty(), 0, WEB_EASE)
            )
        );
    node.getTransforms().add(rotate);
}
 
開發者ID:EricCanull,項目名稱:fxexperience2,代碼行數:16,代碼來源:RotateInDownLeftTransition.java

示例6: starting

import javafx.scene.transform.Rotate; //導入方法依賴的package包/類
@Override protected void starting() {
    super.starting();
    rotate = new Rotate(0,0,node.getBoundsInLocal().getHeight());
    timeline = new Timeline(
            new KeyFrame(Duration.millis(0),    
                new KeyValue(node.opacityProperty(), 1, WEB_EASE),
                new KeyValue(rotate.angleProperty(), 0, WEB_EASE)
            ),
            new KeyFrame(Duration.millis(1000),    
                new KeyValue(node.opacityProperty(), 0, WEB_EASE),
                new KeyValue(rotate.angleProperty(), -90, WEB_EASE)
            )
        );
    node.getTransforms().add(rotate);
}
 
開發者ID:EricCanull,項目名稱:fxexperience2,代碼行數:16,代碼來源:RotateOutUpLeftTransition.java

示例7: starting

import javafx.scene.transform.Rotate; //導入方法依賴的package包/類
@Override protected void starting() {
    super.starting();
    rotate = new Rotate(0,0,node.getBoundsInLocal().getHeight());
      timeline = new Timeline(
            new KeyFrame(Duration.millis(0),    
                new KeyValue(node.opacityProperty(), 1, WEB_EASE),
                new KeyValue(rotate.angleProperty(), 0, WEB_EASE)
            ),
            new KeyFrame(Duration.millis(1000),    
                new KeyValue(node.opacityProperty(), 0, WEB_EASE),
                new KeyValue(rotate.angleProperty(), 90, WEB_EASE)
            )
        );
    node.getTransforms().add(rotate);
}
 
開發者ID:EricCanull,項目名稱:fxexperience2,代碼行數:16,代碼來源:RotateOutDownLeftTransition.java

示例8: starting

import javafx.scene.transform.Rotate; //導入方法依賴的package包/類
@Override protected void starting() {
    super.starting();
    double endY = node.getScene().getHeight() - node.localToScene(0, 0).getY();
    rotate = new Rotate(0,0,0);
    timeline = new Timeline(
            new KeyFrame(Duration.millis(0),
                    new KeyValue(rotate.angleProperty(), 0, Interpolator.EASE_BOTH)
            ),
            new KeyFrame(Duration.millis(200),
                    new KeyValue(rotate.angleProperty(), 80, Interpolator.EASE_BOTH)
            ),
            new KeyFrame(Duration.millis(400),
                    new KeyValue(rotate.angleProperty(), 60, Interpolator.EASE_BOTH)
            ),
            new KeyFrame(Duration.millis(600),
                    new KeyValue(rotate.angleProperty(), 80, Interpolator.EASE_BOTH)
            ),
            new KeyFrame(Duration.millis(800),
                    new KeyValue(node.opacityProperty(), 1, Interpolator.EASE_BOTH),
                    new KeyValue(node.translateYProperty(), 0, Interpolator.EASE_BOTH),
                    new KeyValue(rotate.angleProperty(), 60, Interpolator.EASE_BOTH)
            ),
            new KeyFrame(Duration.millis(1000),
                    new KeyValue(node.opacityProperty(), 0, Interpolator.EASE_BOTH),
                    new KeyValue(node.translateYProperty(), endY, Interpolator.EASE_BOTH),
                    new KeyValue(rotate.angleProperty(), 60, Interpolator.EASE_BOTH)
            )
    );
    node.getTransforms().add(rotate);
}
 
開發者ID:EricCanull,項目名稱:fxexperience2,代碼行數:31,代碼來源:HingeTransition.java

示例9: starting

import javafx.scene.transform.Rotate; //導入方法依賴的package包/類
@Override protected void starting() {
    super.starting();
    rotate = new Rotate(0,0,node.getBoundsInLocal().getHeight());
   timeline = new Timeline(
            new KeyFrame(Duration.millis(0),    
                new KeyValue(node.opacityProperty(), 0, WEB_EASE),
                new KeyValue(rotate.angleProperty(), 90, WEB_EASE)
            ),
            new KeyFrame(Duration.millis(1000),    
                new KeyValue(node.opacityProperty(), 1, WEB_EASE),
                new KeyValue(rotate.angleProperty(), 0, WEB_EASE)
            )
        );
    node.getTransforms().add(rotate);
}
 
開發者ID:EricCanull,項目名稱:fxexperience2,代碼行數:16,代碼來源:RotateInUpLeftTransition.java

示例10: setAnimations

import javafx.scene.transform.Rotate; //導入方法依賴的package包/類
public void setAnimations() {
    // Reset animations
    tlWalkLeft.getKeyFrames().clear();
    tlWalkRight.getKeyFrames().clear();

    // Define walking rotations
    rtLeftLeg = new Rotate(0,
            rgLeftLeg.getX() + rgLeftLeg.getWidth() / 2,
            rgLeftLeg.getY());

    rtRightLeg = new Rotate(0,
            rgRightLeg.getX() + rgRightLeg.getWidth() / 2,
            rgRightLeg.getY());

    rgLeftLeg.getTransforms().add(rtLeftLeg);
    rgRightLeg.getTransforms().add(rtRightLeg);

    // Animate walking left
    KeyValue kvWalkLeftF1LL = new KeyValue(rtLeftLeg.angleProperty(), playerAngleWalk);
    KeyValue kvWalkLeftF1LR = new KeyValue(rtRightLeg.angleProperty(), 0);
    KeyValue kvWalkLeftF2LL = new KeyValue(rtLeftLeg.angleProperty(), 0);
    KeyValue kvWalkLeftF2LR = new KeyValue(rtRightLeg.angleProperty(), 0);
    KeyValue kvWalkLeftF4LL = new KeyValue(rtLeftLeg.angleProperty(), 0);
    KeyValue kvWalkLeftF4LR = new KeyValue(rtRightLeg.angleProperty(), playerAngleWalk);
    KeyValue kvWalkLeftF5LL = new KeyValue(rtLeftLeg.angleProperty(), 0);
    KeyValue kvWalkLeftF5LR = new KeyValue(rtRightLeg.angleProperty(), 0);
    KeyFrame kfWalkLeftF1 = new KeyFrame(Duration.millis((playerSpeedWalk / 4) * 1), kvWalkLeftF1LL, kvWalkLeftF1LR);
    KeyFrame kfWalkLeftF2 = new KeyFrame(Duration.millis((playerSpeedWalk / 4) * 2), kvWalkLeftF2LL, kvWalkLeftF2LR);
    KeyFrame kfWalkLeftF4 = new KeyFrame(Duration.millis((playerSpeedWalk / 4) * 3), kvWalkLeftF4LL, kvWalkLeftF4LR);
    KeyFrame kfWalkLeftF5 = new KeyFrame(Duration.millis((playerSpeedWalk / 4) * 4), kvWalkLeftF5LL, kvWalkLeftF5LR);
    tlWalkLeft.setCycleCount(1);
    tlWalkLeft.setAutoReverse(false);
    tlWalkLeft.getKeyFrames().addAll(kfWalkLeftF1, kfWalkLeftF2, kfWalkLeftF4, kfWalkLeftF5);

    // Animate walking right
    KeyValue kvWalkRightF1LL = new KeyValue(rtLeftLeg.angleProperty(), 0);
    KeyValue kvWalkRightF1LR = new KeyValue(rtRightLeg.angleProperty(), -playerAngleWalk);
    KeyValue kvWalkRightF2LL = new KeyValue(rtLeftLeg.angleProperty(), 0);
    KeyValue kvWalkRightF2LR = new KeyValue(rtRightLeg.angleProperty(), 0);
    KeyValue kvWalkRightF4LL = new KeyValue(rtLeftLeg.angleProperty(), -playerAngleWalk);
    KeyValue kvWalkRightF4LR = new KeyValue(rtRightLeg.angleProperty(), 0);
    KeyValue kvWalkRightF5LL = new KeyValue(rtLeftLeg.angleProperty(), 0);
    KeyValue kvWalkRightF5LR = new KeyValue(rtRightLeg.angleProperty(), 0);
    KeyFrame kfWalkRightF1 = new KeyFrame(Duration.millis((playerSpeedWalk / 4) * 1), kvWalkRightF1LL, kvWalkRightF1LR);
    KeyFrame kfWalkRightF2 = new KeyFrame(Duration.millis((playerSpeedWalk / 4) * 2), kvWalkRightF2LL, kvWalkRightF2LR);
    KeyFrame kfWalkRightF4 = new KeyFrame(Duration.millis((playerSpeedWalk / 4) * 3), kvWalkRightF4LL, kvWalkRightF4LR);
    KeyFrame kfWalkRightF5 = new KeyFrame(Duration.millis((playerSpeedWalk / 4) * 4), kvWalkRightF5LL, kvWalkRightF5LR);
    tlWalkRight.setCycleCount(1);
    tlWalkRight.setAutoReverse(false);
    tlWalkRight.getKeyFrames().addAll(kfWalkRightF1, kfWalkRightF2, kfWalkRightF4, kfWalkRightF5);
}
 
開發者ID:spencerhendon,項目名稱:projectintern,代碼行數:52,代碼來源:Player.java

示例11: setAnimations

import javafx.scene.transform.Rotate; //導入方法依賴的package包/類
public void setAnimations() {
    // Reset animations
    tlWalkLeft.getKeyFrames().clear();
    tlWalkRight.getKeyFrames().clear();

    // Define walking rotations
    rtLeftLeg = new Rotate(0,
            rgLeftLeg.getX() + rgLeftLeg.getWidth() / 2,
            rgLeftLeg.getY());
    
    rtRightLeg = new Rotate(0,
            rgRightLeg.getX() + rgRightLeg.getWidth() / 2,
            rgRightLeg.getY());

    rgLeftLeg.getTransforms().add(rtLeftLeg);
    rgRightLeg.getTransforms().add(rtRightLeg);

    // Animate walking left
    KeyValue kvWalkLeftF1LL = new KeyValue(rtLeftLeg.angleProperty(), playerAngleWalk);
    KeyValue kvWalkLeftF1LR = new KeyValue(rtRightLeg.angleProperty(), 0);
    KeyValue kvWalkLeftF2LL = new KeyValue(rtLeftLeg.angleProperty(), 0);
    KeyValue kvWalkLeftF2LR = new KeyValue(rtRightLeg.angleProperty(), 0);
    KeyValue kvWalkLeftF4LL = new KeyValue(rtLeftLeg.angleProperty(), 0);
    KeyValue kvWalkLeftF4LR = new KeyValue(rtRightLeg.angleProperty(), playerAngleWalk);
    KeyValue kvWalkLeftF5LL = new KeyValue(rtLeftLeg.angleProperty(), 0);
    KeyValue kvWalkLeftF5LR = new KeyValue(rtRightLeg.angleProperty(), 0);
    KeyFrame kfWalkLeftF1 = new KeyFrame(Duration.millis((playerSpeedWalk / 4) * 1), kvWalkLeftF1LL, kvWalkLeftF1LR);
    KeyFrame kfWalkLeftF2 = new KeyFrame(Duration.millis((playerSpeedWalk / 4) * 2), kvWalkLeftF2LL, kvWalkLeftF2LR);
    KeyFrame kfWalkLeftF4 = new KeyFrame(Duration.millis((playerSpeedWalk / 4) * 3), kvWalkLeftF4LL, kvWalkLeftF4LR);
    KeyFrame kfWalkLeftF5 = new KeyFrame(Duration.millis((playerSpeedWalk / 4) * 4), kvWalkLeftF5LL, kvWalkLeftF5LR);
    tlWalkLeft.setCycleCount(1);
    tlWalkLeft.setAutoReverse(false);
    tlWalkLeft.getKeyFrames().addAll(kfWalkLeftF1, kfWalkLeftF2, kfWalkLeftF4, kfWalkLeftF5);

    // Animate walking right
    KeyValue kvWalkRightF1LL = new KeyValue(rtLeftLeg.angleProperty(), 0);
    KeyValue kvWalkRightF1LR = new KeyValue(rtRightLeg.angleProperty(), -playerAngleWalk);
    KeyValue kvWalkRightF2LL = new KeyValue(rtLeftLeg.angleProperty(), 0);
    KeyValue kvWalkRightF2LR = new KeyValue(rtRightLeg.angleProperty(), 0);
    KeyValue kvWalkRightF4LL = new KeyValue(rtLeftLeg.angleProperty(), -playerAngleWalk);
    KeyValue kvWalkRightF4LR = new KeyValue(rtRightLeg.angleProperty(), 0);
    KeyValue kvWalkRightF5LL = new KeyValue(rtLeftLeg.angleProperty(), 0);
    KeyValue kvWalkRightF5LR = new KeyValue(rtRightLeg.angleProperty(), 0);
    KeyFrame kfWalkRightF1 = new KeyFrame(Duration.millis((playerSpeedWalk / 4) * 1), kvWalkRightF1LL, kvWalkRightF1LR);
    KeyFrame kfWalkRightF2 = new KeyFrame(Duration.millis((playerSpeedWalk / 4) * 2), kvWalkRightF2LL, kvWalkRightF2LR);
    KeyFrame kfWalkRightF4 = new KeyFrame(Duration.millis((playerSpeedWalk / 4) * 3), kvWalkRightF4LL, kvWalkRightF4LR);
    KeyFrame kfWalkRightF5 = new KeyFrame(Duration.millis((playerSpeedWalk / 4) * 4), kvWalkRightF5LL, kvWalkRightF5LR);
    tlWalkRight.setCycleCount(1);
    tlWalkRight.setAutoReverse(false);
    tlWalkRight.getKeyFrames().addAll(kfWalkRightF1, kfWalkRightF2, kfWalkRightF4, kfWalkRightF5);
}
 
開發者ID:spencerhendon,項目名稱:projectintern,代碼行數:52,代碼來源:Player.java

示例12: LoadingArc

import javafx.scene.transform.Rotate; //導入方法依賴的package包/類
public LoadingArc() {
    Arc arc = new Arc();

    arc.setCenterX(25);
    arc.setCenterY(25);
    arc.setRadiusX(25.0f);
    arc.setRadiusY(25.0f);
    arc.setLength(30.0f);
    arc.setStrokeWidth(5);

    Stop[] stops = new Stop[] { new Stop(0, Color.WHITE), new Stop(1, Color.BLUE)};
    LinearGradient lg1 = new LinearGradient(0, 0, 1, 0, true, CycleMethod.NO_CYCLE, stops);

    arc.setStroke(lg1);

    Rectangle rect = new Rectangle(50, 50);
    rect.setFill(null);
    rect.setStroke(Color.RED);

    getChildren().addAll(rect, arc);


    double time = 0.75;

    Rotate r = new Rotate(0, 25, 25);
    arc.getTransforms().add(r);
    //arc.getTransforms().add(new Scale(-1, 1, 25, 25));

    Timeline timeline = new Timeline();
    KeyFrame kf2 = new KeyFrame(Duration.seconds(time), new KeyValue(r.angleProperty(), 270));


    timeline.getKeyFrames().addAll(kf2);

    Timeline timeline3 = new Timeline(new KeyFrame(Duration.seconds(time), new KeyValue(r.angleProperty(), 360)));


    SequentialTransition st = new SequentialTransition(timeline, timeline3);
    st.setCycleCount(Timeline.INDEFINITE);
    st.setInterpolator(Interpolator.EASE_BOTH);
    st.play();

    //////////

    Timeline timeline2 = new Timeline();
    timeline2.setAutoReverse(true);
    timeline2.setCycleCount(Timeline.INDEFINITE);


    KeyFrame kf = new KeyFrame(Duration.seconds(time), new KeyValue(arc.lengthProperty(), 270, Interpolator.EASE_BOTH));

    timeline2.getKeyFrames().add(kf);
    timeline2.play();
}
 
開發者ID:AlmasB,項目名稱:FXTutorials,代碼行數:55,代碼來源:FarCry4Loading.java


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