Class Ellipse

All Implemented Interfaces:
Styleable, EventTarget

public non-sealed 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
  • Property Details

  • Constructor Details

    • 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 Details

    • setCenterX

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

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

      public final DoubleProperty centerXProperty()
      Defines the horizontal position of the center of the ellipse in pixels.
      Default value:
      0.0
      Returns:
      the centerX property
      See Also:
    • setCenterY

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

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

      public final DoubleProperty centerYProperty()
      Defines the vertical position of the center of the ellipse in pixels.
      Default value:
      0.0
      Returns:
      the centerY property
      See Also:
    • setRadiusX

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

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

      public final DoubleProperty radiusXProperty()
      Defines the width of the ellipse in pixels.
      Default value:
      0.0
      Returns:
      the radiusX property
      See Also:
    • setRadiusY

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

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

      public final DoubleProperty radiusYProperty()
      Defines the height of the ellipse in pixels.
      Default value:
      0.0
      Returns:
      the radiusY property
      See Also:
    • 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.