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

public non-sealed Class Arc

extends Shape
Class Inheritance
Imports
com.sun.javafx.geom.Arc2D, com.sun.javafx.scene.DirtyBits, .NodeHelper, com.sun.javafx.scene.shape.ArcHelper, com.sun.javafx.sg.prism.NGArc, .NGNode, javafx.beans.property.DoubleProperty, .DoublePropertyBase, .ObjectProperty, .ObjectPropertyBase, javafx.scene.Node, javafx.scene.paint.Paint

The Arc class represents a 2D arc object, defined by a center point, start angle (in degrees), angular extent (length of the arc in degrees), and an arc type (ArcType#OPEN, ArcType#CHORD, or ArcType#ROUND).

Example usage: the following code creates an Arc which is centered around 50,50, has a radius of 25 and extends from the angle 45 to the angle 315 (270 degrees long), and is round.

import javafx.scene.shape.*;

Arc arc = new Arc();
arc.setCenterX(50.0f);
arc.setCenterY(50.0f);
arc.setRadiusX(25.0f);
arc.setRadiusY(25.0f);
arc.setStartAngle(45.0f);
arc.setLength(270.0f);
arc.setType(ArcType.ROUND);
Since
JavaFX 2.0

Field Summary

Modifier and TypeField and Description
private DoubleProperty
centerX

Defines the X coordinate of the center point of the arc.

private DoubleProperty
centerY

Defines the Y coordinate of the center point of the arc.

private final DoubleProperty
length

Defines the angular extent of the arc in degrees.

private final DoubleProperty
radiusX

Defines the overall width (horizontal radius) of the full ellipse of which this arc is a partial section.

private final DoubleProperty
radiusY

Defines the overall height (vertical radius) of the full ellipse of which this arc is a partial section.

private final Arc2D
private DoubleProperty
startAngle

Defines the starting angle of the arc in degrees.

private ObjectProperty<ArcType>
type

Defines the closure type for the arc: ArcType#OPEN, ArcType#CHORD,or ArcType#ROUND.

Inherited from javafx.scene.shape.Shape:
old_fillold_stroke

Constructor Summary

AccessConstructor and Description
public
Arc()

Creates an empty instance of Arc.

public
Arc(double
the X coordinate of the center point of the arc
centerX
,
double
the Y coordinate of the center point of the arc
centerY
,
double
the overall width (horizontal radius) of the full ellipse of which this arc is a partial section
radiusX
,
double
the overall height (vertical radius) of the full ellipse of which this arc is a partial section
radiusY
,
double
the starting angle of the arc in degrees
startAngle
,
double
the angular extent of the arc in degrees
length
)

Creates a new instance of Arc.

Method Summary

Modifier and TypeMethod and Description
public final DoubleProperty
public final DoubleProperty
private Arc2D
private NGNode
private void
public final double
public final double
public final double
public final double
public final double
public final double
public final ArcType
private final ArcType
public final DoubleProperty
public final DoubleProperty
public final DoubleProperty
public final void
setCenterX(double value)

public final void
setCenterY(double value)

public final void
setLength(double value)

public final void
setRadiusX(double value)

public final void
setRadiusY(double value)

public final void
setStartAngle(double value)

public final void
public final DoubleProperty
public String

Returns:

a string representation of this Arc object.
toString
()

Overrides javafx.scene.Node.toString.

Returns a string representation of this Arc object.

public final ObjectProperty<ArcType>
Inherited from javafx.scene.shape.Shape:
computeBoundscomputeShapeBoundscomputeShapeContainsconvertLineJoinfillPropertygetClassCssMetaDatagetCssMetaDatagetFillgetModegetStrokegetStrokeDashArraygetStrokeDashOffsetgetStrokeLineCapgetStrokeLineJoingetStrokeMiterLimitgetStrokeTypegetStrokeWidthintersectisSmoothsetFillsetShapeChangeListenersetSmoothsetStrokesetStrokeDashOffsetsetStrokeLineCapsetStrokeLineJoinsetStrokeMiterLimitsetStrokeTypesetStrokeWidthsmoothPropertystrokeDashOffsetPropertystrokeLineCapPropertystrokeLineJoinPropertystrokeMiterLimitPropertystrokePropertystrokeTypePropertystrokeWidthPropertysubtractunion

Field Detail

centerXback to summary
private DoubleProperty centerX

Defines the X coordinate of the center point of the arc.

Default Value
0.0
centerYback to summary
private DoubleProperty centerY

Defines the Y coordinate of the center point of the arc.

Default Value
0.0
lengthback to summary
private final DoubleProperty length

Defines the angular extent of the arc in degrees.

Default Value
0.0
radiusXback to summary
private final DoubleProperty radiusX

Defines the overall width (horizontal radius) of the full ellipse of which this arc is a partial section.

Default Value
0.0
radiusYback to summary
private final DoubleProperty radiusY

Defines the overall height (vertical radius) of the full ellipse of which this arc is a partial section.

Default Value
0.0
shapeback to summary
private final Arc2D shape
startAngleback to summary
private DoubleProperty startAngle

Defines the starting angle of the arc in degrees.

Default Value
0.0
typeback to summary
private ObjectProperty<ArcType> type

Defines the closure type for the arc: ArcType#OPEN, ArcType#CHORD,or ArcType#ROUND.

Default Value
OPEN

Constructor Detail

Arcback to summary
public Arc()

Creates an empty instance of Arc.

Arcback to summary
public Arc(double centerX, double centerY, double radiusX, double radiusY, double startAngle, double length)

Creates a new instance of Arc.

Parameters
centerX:double

the X coordinate of the center point of the arc

centerY:double

the Y coordinate of the center point of the arc

radiusX:double

the overall width (horizontal radius) of the full ellipse of which this arc is a partial section

radiusY:double

the overall height (vertical radius) of the full ellipse of which this arc is a partial section

startAngle:double

the starting angle of the arc in degrees

length:double

the angular extent of the arc in degrees

Method Detail

centerXPropertyback to summary
public final DoubleProperty centerXProperty()
centerYPropertyback to summary
public final DoubleProperty centerYProperty()
doConfigShapeback to summary
private Arc2D doConfigShape()
doCreatePeerback to summary
private NGNode doCreatePeer()
doUpdatePeerback to summary
private void doUpdatePeer()

Hides javafx.scene.shape.Shape.doUpdatePeer.

getCenterXback to summary
public final double getCenterX()
getCenterYback to summary
public final double getCenterY()
getLengthback to summary
public final double getLength()
getRadiusXback to summary
public final double getRadiusX()
getRadiusYback to summary
public final double getRadiusY()
getStartAngleback to summary
public final double getStartAngle()
getTypeback to summary
public final ArcType getType()
getTypeInternalback to summary
private final ArcType getTypeInternal()
lengthPropertyback to summary
public final DoubleProperty lengthProperty()
radiusXPropertyback to summary
public final DoubleProperty radiusXProperty()
radiusYPropertyback to summary
public final DoubleProperty radiusYProperty()
setCenterXback to summary
public final void setCenterX(double value)
setCenterYback to summary
public final void setCenterY(double value)
setLengthback to summary
public final void setLength(double value)
setRadiusXback to summary
public final void setRadiusX(double value)
setRadiusYback to summary
public final void setRadiusY(double value)
setStartAngleback to summary
public final void setStartAngle(double value)
setTypeback to summary
public final void setType(ArcType value)
startAnglePropertyback to summary
public final DoubleProperty startAngleProperty()
toStringback to summary
public String toString()

Overrides javafx.scene.Node.toString.

Returns a string representation of this Arc object.

Returns:String

a string representation of this Arc object.

Annotations
@Override
typePropertyback to summary
public final ObjectProperty<ArcType> typeProperty()