APIdia Launch Partner
Top Description Fields Constructors Methods
javafx.scene.shape

public non-sealed Class CubicCurve

extends Shape
Class Inheritance
Imports
com.sun.javafx.geom.CubicCurve2D, com.sun.javafx.scene.DirtyBits, .NodeHelper, com.sun.javafx.scene.shape.CubicCurveHelper, com.sun.javafx.sg.prism.NGCubicCurve, .NGNode, javafx.beans.property.DoubleProperty, .DoublePropertyBase, javafx.scene.Node, javafx.scene.paint.Paint

The CubiCurve class defines a cubic 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 points (controlX1, controlY1) and (controlX2, controlY2) as Bézier control points. Example:

import javafx.scene.shape.*;

CubicCurve cubic = new CubicCurve();
cubic.setStartX(0.0f);
cubic.setStartY(50.0f);
cubic.setControlX1(25.0f);
cubic.setControlY1(0.0f);
cubic.setControlX2(75.0f);
cubic.setControlY2(100.0f);
cubic.setEndX(100.0f);
cubic.setEndY(50.0f);
}
Since
JavaFX 2.0

Field Summary

Modifier and TypeField and Description
private DoubleProperty
controlX1

Defines the X coordinate of the first control point of the cubic curve segment.

private DoubleProperty
controlX2

Defines the X coordinate of the second control point of the cubic curve segment.

private DoubleProperty
controlY1

Defines the Y coordinate of the first control point of the cubic curve segment.

private DoubleProperty
controlY2

Defines the Y coordinate of the second control point of the cubic curve segment.

private DoubleProperty
endX

Defines the X coordinate of the end point of the cubic curve segment.

private DoubleProperty
endY

Defines the Y coordinate of the end point of the cubic curve segment.

private final CubicCurve2D
private DoubleProperty
startX

Defines the X coordinate of the start point of the cubic curve segment.

private DoubleProperty
startY

Defines the Y coordinate of the start point of the cubic curve segment.

Inherited from javafx.scene.shape.Shape:
old_fillold_stroke

Constructor Summary

AccessConstructor and Description
public
CubicCurve()

Creates an empty instance of CubicCurve.

public
CubicCurve(double
the X coordinate of the start point
startX
,
double
the Y coordinate of the start point
startY
,
double
the X coordinate of the first control point
controlX1
,
double
the Y coordinate of the first control point
controlY1
,
double
the X coordinate of the second control point
controlX2
,
double
the Y coordinate of the second control point
controlY2
,
double
the X coordinate of the end point
endX
,
double
the Y coordinate of the end point
endY
)

Creates a new instance of CubicCurve.

Method Summary

Modifier and TypeMethod and Description
public final DoubleProperty
public final DoubleProperty
public final DoubleProperty
public final DoubleProperty
private CubicCurve2D
private NGNode
private void
public final DoubleProperty
public final DoubleProperty
public final double
public final double
public final double
public final double
public final double
public final double
public final double
public final double
public final void
setControlX1(double value)

public final void
setControlX2(double value)

public final void
setControlY1(double value)

public final void
setControlY2(double value)

public final void
setEndX(double value)

public final void
setEndY(double value)

public final void
setStartX(double value)

public final void
setStartY(double value)

public final DoubleProperty
public final DoubleProperty
public String

Returns:

a string representation of this CubicCurve object.
toString
()

Overrides javafx.scene.Node.toString.

Returns a string representation of this CubicCurve object.

Inherited from javafx.scene.shape.Shape:
computeBoundscomputeShapeBoundscomputeShapeContainsconvertLineJoinfillPropertygetClassCssMetaDatagetCssMetaDatagetFillgetModegetStrokegetStrokeDashArraygetStrokeDashOffsetgetStrokeLineCapgetStrokeLineJoingetStrokeMiterLimitgetStrokeTypegetStrokeWidthintersectisSmoothsetFillsetShapeChangeListenersetSmoothsetStrokesetStrokeDashOffsetsetStrokeLineCapsetStrokeLineJoinsetStrokeMiterLimitsetStrokeTypesetStrokeWidthsmoothPropertystrokeDashOffsetPropertystrokeLineCapPropertystrokeLineJoinPropertystrokeMiterLimitPropertystrokePropertystrokeTypePropertystrokeWidthPropertysubtractunion

Field Detail

controlX1back to summary
private DoubleProperty controlX1

Defines the X coordinate of the first control point of the cubic curve segment.

Default Value
0.0
controlX2back to summary
private DoubleProperty controlX2

Defines the X coordinate of the second control point of the cubic curve segment.

Default Value
0.0
controlY1back to summary
private DoubleProperty controlY1

Defines the Y coordinate of the first control point of the cubic curve segment.

Default Value
0.0
controlY2back to summary
private DoubleProperty controlY2

Defines the Y coordinate of the second control point of the cubic curve segment.

Default Value
0.0
endXback to summary
private DoubleProperty endX

Defines the X coordinate of the end point of the cubic curve segment.

Default Value
0.0
endYback to summary
private DoubleProperty endY

Defines the Y coordinate of the end point of the cubic curve segment.

Default Value
0.0
shapeback to summary
private final CubicCurve2D shape
startXback to summary
private DoubleProperty startX

Defines the X coordinate of the start point of the cubic curve segment.

Default Value
0.0
startYback to summary
private DoubleProperty startY

Defines the Y coordinate of the start point of the cubic curve segment.

Default Value
0.0

Constructor Detail

CubicCurveback to summary
public CubicCurve()

Creates an empty instance of CubicCurve.

CubicCurveback to summary
public CubicCurve(double startX, double startY, double controlX1, double controlY1, double controlX2, double controlY2, double endX, double endY)

Creates a new instance of CubicCurve.

Parameters
startX:double

the X coordinate of the start point

startY:double

the Y coordinate of the start point

controlX1:double

the X coordinate of the first control point

controlY1:double

the Y coordinate of the first control point

controlX2:double

the X coordinate of the second control point

controlY2:double

the Y coordinate of the second control point

endX:double

the X coordinate of the end point

endY:double

the Y coordinate of the end point

Since
JavaFX 2.1

Method Detail

controlX1Propertyback to summary
public final DoubleProperty controlX1Property()
controlX2Propertyback to summary
public final DoubleProperty controlX2Property()
controlY1Propertyback to summary
public final DoubleProperty controlY1Property()
controlY2Propertyback to summary
public final DoubleProperty controlY2Property()
doConfigShapeback to summary
private CubicCurve2D doConfigShape()
doCreatePeerback to summary
private NGNode doCreatePeer()
doUpdatePeerback to summary
private void doUpdatePeer()

Hides javafx.scene.shape.Shape.doUpdatePeer.

endXPropertyback to summary
public final DoubleProperty endXProperty()
endYPropertyback to summary
public final DoubleProperty endYProperty()
getControlX1back to summary
public final double getControlX1()
getControlX2back to summary
public final double getControlX2()
getControlY1back to summary
public final double getControlY1()
getControlY2back to summary
public final double getControlY2()
getEndXback to summary
public final double getEndX()
getEndYback to summary
public final double getEndY()
getStartXback to summary
public final double getStartX()
getStartYback to summary
public final double getStartY()
setControlX1back to summary
public final void setControlX1(double value)
setControlX2back to summary
public final void setControlX2(double value)
setControlY1back to summary
public final void setControlY1(double value)
setControlY2back to summary
public final void setControlY2(double value)
setEndXback to summary
public final void setEndX(double value)
setEndYback to summary
public final void setEndY(double value)
setStartXback to summary
public final void setStartX(double value)
setStartYback to summary
public final void setStartY(double value)
startXPropertyback to summary
public final DoubleProperty startXProperty()
startYPropertyback to summary
public final DoubleProperty startYProperty()
toStringback to summary
public String toString()

Overrides javafx.scene.Node.toString.

Returns a string representation of this CubicCurve object.

Returns:String

a string representation of this CubicCurve object.

Annotations
@Override