Package plane

Source Code of plane.Tail

package plane;

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

public class Tail extends Group{

  private static final Color MY_WHEAT= Color.WHEAT.deriveColor(0.0, 1.0, 0.5, 1.0);
  private static final Color MY_GREEN= Color.GREEN.deriveColor(0.0, 1.0, 0.5, 1.0);
 
  public Tail() {

    Rectangle elevator= new Rectangle(30, 8);
    elevator.setTranslateX(-15);   
    elevator.setFill(MY_WHEAT);
   
    Rectangle rudder= new Rectangle(15, 8);
    rudder.setTranslateX(-7.5);
    rudder.setTranslateZ(7.5);
    rudder.setRotationAxis(Rotate.Y_AXIS);
    rudder.setRotate(-90);
    rudder.setFill(MY_GREEN);
   
    getChildren().addAll(elevator, rudder);
  }
}
TOP

Related Classes of plane.Tail

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.