Class QuadCurve

  • All Implemented Interfaces:
    Styleable, EventTarget

    public class QuadCurve
    extends Shape
    The Quadcurve class defines a quadratic Bézier parametric curve segment in (x,y) coordinate space. Drawing a curve that intersects both the specified coordinates (startX, startY) and (endX, enfY), using the specified point (controlX, controlY) as Bézier control point.
    import javafx.scene.shape.*;
    
    QuadCurve quad = new QuadCurve();
    quad.setStartX(0.0f);
    quad.setStartY(50.0f);
    quad.setEndX(50.0f);
    quad.setEndY(50.0f);
    quad.setControlX(25.0f);
    quad.setControlY(0.0f);
    
    Since:
    JavaFX 2.0
    • Constructor Detail

      • QuadCurve

        public QuadCurve()
        Creates an empty instance of QuadCurve.
      • QuadCurve

        public QuadCurve​(double startX,
                         double startY,
                         double controlX,
                         double controlY,
                         double endX,
                         double endY)
        Creates a new instance of QuadCurve.
        Parameters:
        startX - the X coordinate of the start point
        startY - the Y coordinate of the start point
        controlX - the X coordinate of the control point
        controlY - the Y coordinate of the control point
        endX - the X coordinate of the end point
        endY - the Y coordinate of the end point
    • Method Detail

      • setStartX

        public final void setStartX​(double value)
        Sets the value of the property startX.
        Property description:
        Defines the X coordinate of the start point of the quadratic curve segment.
        Default value:
        0.0
      • getStartX

        public final double getStartX()
        Gets the value of the property startX.
        Property description:
        Defines the X coordinate of the start point of the quadratic curve segment.
        Default value:
        0.0
      • setStartY

        public final void setStartY​(double value)
        Sets the value of the property startY.
        Property description:
        Defines the Y coordinate of the start point of the quadratic curve segment.
        Default value:
        0.0
      • getStartY

        public final double getStartY()
        Gets the value of the property startY.
        Property description:
        Defines the Y coordinate of the start point of the quadratic curve segment.
        Default value:
        0.0
      • setControlX

        public final void setControlX​(double value)
        Sets the value of the property controlX.
        Property description:
        Defines the X coordinate of the control point of the quadratic curve segment.
        Default value:
        0.0
      • getControlX

        public final double getControlX()
        Gets the value of the property controlX.
        Property description:
        Defines the X coordinate of the control point of the quadratic curve segment.
        Default value:
        0.0
      • setControlY

        public final void setControlY​(double value)
        Sets the value of the property controlY.
        Property description:
        Defines the Y coordinate of the control point of the quadratic curve segment.
        Default value:
        0.0
      • getControlY

        public final double getControlY()
        Gets the value of the property controlY.
        Property description:
        Defines the Y coordinate of the control point of the quadratic curve segment.
        Default value:
        0.0
      • setEndX

        public final void setEndX​(double value)
        Sets the value of the property endX.
        Property description:
        Defines the X coordinate of the end point of the quadratic curve segment.
        Default value:
        0.0
      • getEndX

        public final double getEndX()
        Gets the value of the property endX.
        Property description:
        Defines the X coordinate of the end point of the quadratic curve segment.
        Default value:
        0.0
      • setEndY

        public final void setEndY​(double value)
        Sets the value of the property endY.
        Property description:
        Defines the Y coordinate of the end point of the quadratic curve segment.
        Default value:
        0.0
      • getEndY

        public final double getEndY()
        Gets the value of the property endY.
        Property description:
        Defines the Y coordinate of the end point of the quadratic curve segment.
        Default value:
        0.0
      • toString

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