Package plane

Source Code of plane.Wings

package plane;

import javafx.scene.Group;
import javafx.scene.paint.Color;
import javafx.scene.shape.Rectangle;
import javafx.scene.transform.Rotate;

public class Wings extends Group {
 
  public Wings(Color color) {

    Rectangle right= new Rectangle(50, 20);
    right.setRotationAxis(Rotate.Y_AXIS);
    right.setRotate(10);
    right.setFill(color);
   
    Rectangle left= new Rectangle(50, 20);
    left.setTranslateX(-50);
    left.setRotationAxis(Rotate.Y_AXIS);
    left.setRotate(-10);
    left.setFill(color);
   
    getChildren().addAll(left, right);
  }
   
}
TOP

Related Classes of plane.Wings

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.