Class Ellipse

  • All Implemented Interfaces:
    Styleable, EventTarget


    public class Ellipse
    extends Shape
    The Ellipse class creates a new ellipse with the specified size and location in pixels
    import javafx.scene.shape.*;
    
    Ellipse ellipse = new Ellipse(); {
    ellipse.setCenterX(50.0f);
    ellipse.setCenterY(50.0f);
    ellipse.setRadiusX(50.0f);
    ellipse.setRadiusY(25.0f);
    
    Since:
    JavaFX 2.0
    • Constructor Detail

      • Ellipse

        public Ellipse​()
        Creates an empty instance of Ellipse.
      • Ellipse

        public Ellipse​(double radiusX,
                       double radiusY)
        Creates an instance of Ellipse of the given size.
        Parameters:
        radiusX - the horizontal radius of the ellipse in pixels
        radiusY - the vertical radius of the ellipse in pixels
      • Ellipse

        public Ellipse​(double centerX,
                       double centerY,
                       double radiusX,
                       double radiusY)
        Creates an instance of Ellipse of the given position and size.
        Parameters:
        centerX - the horizontal position of the center of the ellipse in pixels
        centerY - the vertical position of the center of the ellipse in pixels
        radiusX - the horizontal radius of the ellipse in pixels
        radiusY - the vertical radius of the ellipse in pixels
    • Method Detail

      • setCenterX

        public final void setCenterX​(double value)
        Sets the value of the property centerX.
        Property description:
        Defines the horizontal position of the center of the ellipse in pixels.
        Default value:
        0.0
      • getCenterX

        public final double getCenterX​()
        Gets the value of the property centerX.
        Property description:
        Defines the horizontal position of the center of the ellipse in pixels.
        Default value:
        0.0
      • setCenterY

        public final void setCenterY​(double value)
        Sets the value of the property centerY.
        Property description:
        Defines the vertical position of the center of the ellipse in pixels.
        Default value:
        0.0
      • getCenterY

        public final double getCenterY​()
        Gets the value of the property centerY.
        Property description:
        Defines the vertical position of the center of the ellipse in pixels.
        Default value:
        0.0
      • setRadiusX

        public final void setRadiusX​(double value)
        Sets the value of the property radiusX.
        Property description:
        Defines the width of the ellipse in pixels.
        Default value:
        0.0
      • getRadiusX

        public final double getRadiusX​()
        Gets the value of the property radiusX.
        Property description:
        Defines the width of the ellipse in pixels.
        Default value:
        0.0
      • setRadiusY

        public final void setRadiusY​(double value)
        Sets the value of the property radiusY.
        Property description:
        Defines the height of the ellipse in pixels.
        Default value:
        0.0
      • getRadiusY

        public final double getRadiusY​()
        Gets the value of the property radiusY.
        Property description:
        Defines the height of the ellipse in pixels.
        Default value:
        0.0
      • toString

        public String toString​()
        Returns a string representation of this Ellipse object.
        Overrides:
        toString in class Node
        Returns:
        a string representation of this Ellipse object.