Top Description Fields Constructors Methods
javafx.scene.shape

public Class QuadCurveTo

extends PathElement
Class Inheritance
Imports
com.sun.javafx.geom.Path2D, com.sun.javafx.scene.shape.QuadCurveToHelper, com.sun.javafx.sg.prism.NGPath, javafx.beans.property.DoubleProperty, .DoublePropertyBase

Creates a curved path element, defined by two new points, by drawing a Quadratic Bézier curve that intersects both the current coordinates and the specified coordinates (x, y), using the specified point (controlX, controlY) as a Bézier control point. 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(50.0f);

QuadCurveTo quadTo = new QuadCurveTo();
quadTo.setControlX(25.0f);
quadTo.setControlY(0.0f);
quadTo.setX(50.0f);
quadTo.setY(50.0f);

path.getElements().add(moveTo);
path.getElements().add(cubicTo);
Since
JavaFX 2.0

Field Summary

Modifier and TypeField and Description
private DoubleProperty
controlX

Defines the X coordinate of the quadratic control point.

private DoubleProperty
controlY

Defines the Y coordinate of the quadratic control point.

private DoubleProperty
x

Defines the X coordinate of the final end point.

private DoubleProperty
y

Defines the Y coordinate of the final end point.

Inherited from javafx.scene.shape.PathElement:
nodes

Constructor Summary

AccessConstructor and Description
public
QuadCurveTo()

Creates an empty instance of QuadCurveTo.

public
QuadCurveTo(double
the X coordinate of the quadratic control point
controlX
,
double
the Y coordinate of the quadratic control point
controlY
,
double
the X coordinate of the final end point
x
,
double
the Y coordinate of the final end point
y
)

Creates a new instance of QuadCurveTo.

Method Summary

Modifier and TypeMethod and Description
pack-priv void
public final DoubleProperty
public final DoubleProperty
private void
public final double
public final double
public final double
getX()

public final double
getY()

public final void
setControlX(double value)

public final void
setControlY(double value)

public final void
setX(double value)

public final void
setY(double value)

public String

Returns:

a string representation of this CubicCurveTo object.
toString
()

Overrides java.lang.Object.toString.

Returns a string representation of this CubicCurveTo object.

public final DoubleProperty
public final DoubleProperty
Inherited from javafx.scene.shape.PathElement:
absolutePropertyaddNodeisAbsoluteremoveNodesetAbsoluteu

Field Detail

controlXback to summary
private DoubleProperty controlX

Defines the X coordinate of the quadratic control point.

Default Value
0.0
controlYback to summary
private DoubleProperty controlY

Defines the Y coordinate of the quadratic control point.

Default Value
0.0
xback to summary
private DoubleProperty x

Defines the X coordinate of the final end point.

Default Value
0.0
yback to summary
private DoubleProperty y

Defines the Y coordinate of the final end point.

Default Value
0.0

Constructor Detail

QuadCurveToback to summary
public QuadCurveTo()

Creates an empty instance of QuadCurveTo.

QuadCurveToback to summary
public QuadCurveTo(double controlX, double controlY, double x, double y)

Creates a new instance of QuadCurveTo.

Parameters
controlX:double

the X coordinate of the quadratic control point

controlY:double

the Y coordinate of the quadratic control point

x:double

the X coordinate of the final end point

y:double

the Y coordinate of the final end point

Method Detail

addToback to summary
pack-priv void addTo(NGPath pgPath)

Implements abstract javafx.scene.shape.PathElement.addTo.

Annotations
@Override
controlXPropertyback to summary
public final DoubleProperty controlXProperty()
controlYPropertyback to summary
public final DoubleProperty controlYProperty()
doAddToback to summary
private void doAddTo(Path2D path)
getControlXback to summary
public final double getControlX()
getControlYback to summary
public final double getControlY()
getXback to summary
public final double getX()
getYback to summary
public final double getY()
setControlXback to summary
public final void setControlX(double value)
setControlYback to summary
public final void setControlY(double value)
setXback to summary
public final void setX(double value)
setYback to summary
public final void setY(double value)
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Returns a string representation of this CubicCurveTo object.

Returns:String

a string representation of this CubicCurveTo object.

Annotations
@Override
xPropertyback to summary
public final DoubleProperty xProperty()
yPropertyback to summary
public final DoubleProperty yProperty()