# Class CubicCurveTo

java.lang.Object
javafx.scene.shape.PathElement
javafx.scene.shape.CubicCurveTo

public class CubicCurveTo extends PathElement
Creates a curved path element, defined by three new points, by drawing a Cubic Bézier curve that intersects both the current coordinates and the specified coordinates `(x,y)`, using the specified points `(controlX1,controlY1)` and `(controlX2,controlY2)` as Bézier control points. All coordinates are specified in double precision.

For more information on path elements see the `Path` and `PathElement` classes.

Example:

    import javafx.scene.shape.*;

    Path path = new Path();

    MoveTo moveTo = new MoveTo();
    moveTo.setX(0.0f);
    moveTo.setY(0.0f);

    CubicCurveTo cubicTo = new CubicCurveTo();
    cubicTo.setControlX1(0.0f);
    cubicTo.setControlY1(0.0f);
    cubicTo.setControlX2(100.0f);
    cubicTo.setControlY2(100.0f);
    cubicTo.setX(100.0f);
    cubicTo.setY(50.0f);

    path.getElements().add(moveTo);
    path.getElements().add(cubicTo);

Since:
  JavaFX 2.0

- ## Property Summary

  Properties
  Type
  Property
  Description
  `final DoubleProperty`
  `controlX1`
  Defines the X coordinate of the first Bézier control point.
  `final DoubleProperty`
  `controlX2`
  Defines the X coordinate of the second Bézier control point.
  `final DoubleProperty`
  `controlY1`
  Defines the Y coordinate of the first Bézier control point.
  `final DoubleProperty`
  `controlY2`
  Defines the Y coordinate of the second Bézier control point.
  `final DoubleProperty`
  `x`
  Defines the X coordinate of the final end point.
  `final DoubleProperty`
  `y`
  Defines the Y coordinate of the final end point.

  ### Properties declared in class javafx.scene.shape.PathElement

  `absolute`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `CubicCurveTo()`
  Creates an empty instance of CubicCurveTo.
  `CubicCurveTo(double controlX1, double controlY1, double controlX2, double controlY2, double x, double y)`
  Creates a new instance of CubicCurveTo.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `final DoubleProperty`
  `controlX1Property()`
  Defines the X coordinate of the first Bézier control point.
  `final DoubleProperty`
  `controlX2Property()`
  Defines the X coordinate of the second Bézier control point.
  `final DoubleProperty`
  `controlY1Property()`
  Defines the Y coordinate of the first Bézier control point.
  `final DoubleProperty`
  `controlY2Property()`
  Defines the Y coordinate of the second Bézier control point.
  `final double`
  `getControlX1()`
  Gets the value of the `controlX1` property.
  `final double`
  `getControlX2()`
  Gets the value of the `controlX2` property.
  `final double`
  `getControlY1()`
  Gets the value of the `controlY1` property.
  `final double`
  `getControlY2()`
  Gets the value of the `controlY2` property.
  `final double`
  `getX()`
  Gets the value of the `x` property.
  `final double`
  `getY()`
  Gets the value of the `y` property.
  `final void`
  `setControlX1(double value)`
  Sets the value of the `controlX1` property.
  `final void`
  `setControlX2(double value)`
  Sets the value of the `controlX2` property.
  `final void`
  `setControlY1(double value)`
  Sets the value of the `controlY1` property.
  `final void`
  `setControlY2(double value)`
  Sets the value of the `controlY2` property.
  `final void`
  `setX(double value)`
  Sets the value of the `x` property.
  `final void`
  `setY(double value)`
  Sets the value of the `y` property.
  `String`
  `toString()`
  Returns a string representation of this `CubicCurveTo` object.
  `final DoubleProperty`
  `xProperty()`
  Defines the X coordinate of the final end point.
  `final DoubleProperty`
  `yProperty()`
  Defines the Y coordinate of the final end point.

  ### Methods declared in class javafx.scene.shape.PathElement

  `absoluteProperty, isAbsolute, setAbsolute`

  ### Methods declared in class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Property Details

  - ### controlX1

    public final DoubleProperty controlX1Property
    Defines the X coordinate of the first Bézier control point.
    Default value:
      0.0
    See Also:
      - `getControlX1()`
      - `setControlX1(double)`
      - `controlX1Property()`

  - ### controlY1

    public final DoubleProperty controlY1Property
    Defines the Y coordinate of the first Bézier control point.
    Default value:
      0.0
    See Also:
      - `getControlY1()`
      - `setControlY1(double)`
      - `controlY1Property()`

  - ### controlX2

    public final DoubleProperty controlX2Property
    Defines the X coordinate of the second Bézier control point.
    Default value:
      0.0
    See Also:
      - `getControlX2()`
      - `setControlX2(double)`
      - `controlX2Property()`

  - ### controlY2

    public final DoubleProperty controlY2Property
    Defines the Y coordinate of the second Bézier control point.
    Default value:
      0.0
    See Also:
      - `getControlY2()`
      - `setControlY2(double)`
      - `controlY2Property()`

  - ### x

    public final DoubleProperty xProperty
    Defines the X coordinate of the final end point.
    Default value:
      0.0
    See Also:
      - `getX()`
      - `setX(double)`
      - `xProperty()`

  - ### y

    public final DoubleProperty yProperty
    Defines the Y coordinate of the final end point.
    Default value:
      0.0
    See Also:
      - `getY()`
      - `setY(double)`
      - `yProperty()`

- ## Constructor Details

  - ### CubicCurveTo

    public CubicCurveTo()
    Creates an empty instance of CubicCurveTo.

  - ### CubicCurveTo

    public CubicCurveTo(double controlX1, double controlY1, double controlX2, double controlY2, double x, double y)
    Creates a new instance of CubicCurveTo.
    Parameters:
      `controlX1` - the X coordinate of the first Bézier control point
      `controlY1` - the Y coordinate of the first Bézier control point
      `controlX2` - the X coordinate of the second Bézier control point
      `controlY2` - the Y coordinate of the second Bézier control point
      `x` - the X coordinate of the final end point
      `y` - the Y coordinate of the final end point

- ## Method Details

  - ### setControlX1

    public final void setControlX1(double value)
    Sets the value of the `controlX1` property.
    Property description:
      Defines the X coordinate of the first Bézier control point.
    Default value:
      0.0
    Parameters:
      `value` - the value for the `controlX1` property
    See Also:
      - `getControlX1()`
      - `controlX1Property()`

  - ### getControlX1

    public final double getControlX1()
    Gets the value of the `controlX1` property.
    Property description:
      Defines the X coordinate of the first Bézier control point.
    Default value:
      0.0
    Returns:
      the value of the `controlX1` property
    See Also:
      - `setControlX1(double)`
      - `controlX1Property()`

  - ### controlX1Property

    public final DoubleProperty controlX1Property()
    Defines the X coordinate of the first Bézier control point.
    Default value:
      0.0
    Returns:
      the `controlX1` property
    See Also:
      - `getControlX1()`
      - `setControlX1(double)`

  - ### setControlY1

    public final void setControlY1(double value)
    Sets the value of the `controlY1` property.
    Property description:
      Defines the Y coordinate of the first Bézier control point.
    Default value:
      0.0
    Parameters:
      `value` - the value for the `controlY1` property
    See Also:
      - `getControlY1()`
      - `controlY1Property()`

  - ### getControlY1

    public final double getControlY1()
    Gets the value of the `controlY1` property.
    Property description:
      Defines the Y coordinate of the first Bézier control point.
    Default value:
      0.0
    Returns:
      the value of the `controlY1` property
    See Also:
      - `setControlY1(double)`
      - `controlY1Property()`

  - ### controlY1Property

    public final DoubleProperty controlY1Property()
    Defines the Y coordinate of the first Bézier control point.
    Default value:
      0.0
    Returns:
      the `controlY1` property
    See Also:
      - `getControlY1()`
      - `setControlY1(double)`

  - ### setControlX2

    public final void setControlX2(double value)
    Sets the value of the `controlX2` property.
    Property description:
      Defines the X coordinate of the second Bézier control point.
    Default value:
      0.0
    Parameters:
      `value` - the value for the `controlX2` property
    See Also:
      - `getControlX2()`
      - `controlX2Property()`

  - ### getControlX2

    public final double getControlX2()
    Gets the value of the `controlX2` property.
    Property description:
      Defines the X coordinate of the second Bézier control point.
    Default value:
      0.0
    Returns:
      the value of the `controlX2` property
    See Also:
      - `setControlX2(double)`
      - `controlX2Property()`

  - ### controlX2Property

    public final DoubleProperty controlX2Property()
    Defines the X coordinate of the second Bézier control point.
    Default value:
      0.0
    Returns:
      the `controlX2` property
    See Also:
      - `getControlX2()`
      - `setControlX2(double)`

  - ### setControlY2

    public final void setControlY2(double value)
    Sets the value of the `controlY2` property.
    Property description:
      Defines the Y coordinate of the second Bézier control point.
    Default value:
      0.0
    Parameters:
      `value` - the value for the `controlY2` property
    See Also:
      - `getControlY2()`
      - `controlY2Property()`

  - ### getControlY2

    public final double getControlY2()
    Gets the value of the `controlY2` property.
    Property description:
      Defines the Y coordinate of the second Bézier control point.
    Default value:
      0.0
    Returns:
      the value of the `controlY2` property
    See Also:
      - `setControlY2(double)`
      - `controlY2Property()`

  - ### controlY2Property

    public final DoubleProperty controlY2Property()
    Defines the Y coordinate of the second Bézier control point.
    Default value:
      0.0
    Returns:
      the `controlY2` property
    See Also:
      - `getControlY2()`
      - `setControlY2(double)`

  - ### setX

    public final void setX(double value)
    Sets the value of the `x` property.
    Property description:
      Defines the X coordinate of the final end point.
    Default value:
      0.0
    Parameters:
      `value` - the value for the `x` property
    See Also:
      - `getX()`
      - `xProperty()`

  - ### getX

    public final double getX()
    Gets the value of the `x` property.
    Property description:
      Defines the X coordinate of the final end point.
    Default value:
      0.0
    Returns:
      the value of the `x` property
    See Also:
      - `setX(double)`
      - `xProperty()`

  - ### xProperty

    public final DoubleProperty xProperty()
    Defines the X coordinate of the final end point.
    Default value:
      0.0
    Returns:
      the `x` property
    See Also:
      - `getX()`
      - `setX(double)`

  - ### setY

    public final void setY(double value)
    Sets the value of the `y` property.
    Property description:
      Defines the Y coordinate of the final end point.
    Default value:
      0.0
    Parameters:
      `value` - the value for the `y` property
    See Also:
      - `getY()`
      - `yProperty()`

  - ### getY

    public final double getY()
    Gets the value of the `y` property.
    Property description:
      Defines the Y coordinate of the final end point.
    Default value:
      0.0
    Returns:
      the value of the `y` property
    See Also:
      - `setY(double)`
      - `yProperty()`

  - ### yProperty

    public final DoubleProperty yProperty()
    Defines the Y coordinate of the final end point.
    Default value:
      0.0
    Returns:
      the `y` property
    See Also:
      - `getY()`
      - `setY(double)`

  - ### toString

    public String toString()
    Returns a string representation of this `CubicCurveTo` object.
    Overrides:
      `toString` in class `Object`
    Returns:
      a string representation of this `CubicCurveTo` object.