JavaFX: Bringing Rich Experiences To All the Screens Of Your Life

Profile: desktop, common

Overview

The Donut class defines a regular polygon with a hole in the middle

the code:

import org.jfxtras.scene.shape.Donut;
    import javafx.scene.paint.*;

    Donut {
        angle: 0
        centerX: 50
        centerY: 50
        outerRadius: 40
        innerRadius: 20
        sides: 7
        fill: Color.BLACK
    }

produces:

Variable Summary

accessnametypeCan ReadCan InitCan WriteDefault Valuedescription
publicangleNumber0

Defines the polygon's angle of rotation in degrees.

Defines the polygon's angle of rotation in degrees. The polygon rotates counter-clockwise.

0  
publiccenterXNumber0

Defines the horizontal position of the center of the polygon in pixels.

publiccenterYNumber0

Defines the vertical position of the center of the polygon in pixels.

publicinnerRadiusNumber10

Defines the radius of the hole in the middle of the polygon in pixels.

publicouterRadiusNumber30

Defines the outer radius (or total radius) of the polygon in pixels.

publicsidesNumber5

Defines the number of sides of the polygon.

Defines the number of sides of the polygon. A value of 3 is a triangle, 4 is a square, etc. Values below 3 are invalid.

5  

Inherited Variables

Inherited Functions