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

public non-sealed Class Ellipse

extends Shape
Class Inheritance
Imports
com.sun.javafx.geom.BaseBounds, .Ellipse2D, com.sun.javafx.geom.transform.BaseTransform, com.sun.javafx.scene.DirtyBits, .NodeHelper, com.sun.javafx.scene.shape.EllipseHelper, .ShapeHelper, com.sun.javafx.sg.prism.NGEllipse, .NGNode, .NGShape, javafx.beans.property.DoubleProperty, .DoublePropertyBase, javafx.scene.Node, javafx.scene.paint.Paint

The Ellipse class creates a new ellipse with the specified size and location in pixels
import javafx.scene.shape.*;

Ellipse ellipse = new Ellipse(); {
ellipse.setCenterX(50.0f);
ellipse.setCenterY(50.0f);
ellipse.setRadiusX(50.0f);
ellipse.setRadiusY(25.0f);
Since
JavaFX 2.0

Field Summary

Modifier and TypeField and Description
private DoubleProperty
centerX

Defines the horizontal position of the center of the ellipse in pixels.

private DoubleProperty
centerY

Defines the vertical position of the center of the ellipse in pixels.

private static final int
private final DoubleProperty
radiusX

Defines the width of the ellipse in pixels.

private final DoubleProperty
radiusY

Defines the height of the ellipse in pixels.

private final Ellipse2D
Inherited from javafx.scene.shape.Shape:
old_fillold_stroke

Constructor Summary

AccessConstructor and Description
public
Ellipse()

Creates an empty instance of Ellipse.

public
Ellipse(double
the horizontal radius of the ellipse in pixels
radiusX
,
double
the vertical radius of the ellipse in pixels
radiusY
)

Creates an instance of Ellipse of the given size.

public
Ellipse(double
the horizontal position of the center of the ellipse in pixels
centerX
,
double
the vertical position of the center of the ellipse in pixels
centerY
,
double
the horizontal radius of the ellipse in pixels
radiusX
,
double
the vertical radius of the ellipse in pixels
radiusY
)

Creates an instance of Ellipse of the given position and size.

Method Summary

Modifier and TypeMethod and Description
public final DoubleProperty
public final DoubleProperty
pack-priv StrokeLineJoin
private BaseBounds
private Ellipse2D
private NGNode
private void
public final double
public final double
public final double
public final double
public final DoubleProperty
public final DoubleProperty
public final void
setCenterX(double value)

public final void
setCenterY(double value)

public final void
setRadiusX(double value)

public final void
setRadiusY(double value)

public String

Returns:

a string representation of this Ellipse object.
toString
()

Overrides javafx.scene.Node.toString.

Returns a string representation of this Ellipse object.

Inherited from javafx.scene.shape.Shape:
computeBoundscomputeShapeBoundscomputeShapeContainsfillPropertygetClassCssMetaDatagetCssMetaDatagetFillgetModegetStrokegetStrokeDashArraygetStrokeDashOffsetgetStrokeLineCapgetStrokeLineJoingetStrokeMiterLimitgetStrokeTypegetStrokeWidthintersectisSmoothsetFillsetShapeChangeListenersetSmoothsetStrokesetStrokeDashOffsetsetStrokeLineCapsetStrokeLineJoinsetStrokeMiterLimitsetStrokeTypesetStrokeWidthsmoothPropertystrokeDashOffsetPropertystrokeLineCapPropertystrokeLineJoinPropertystrokeMiterLimitPropertystrokePropertystrokeTypePropertystrokeWidthPropertysubtractunion

Field Detail

centerXback to summary
private DoubleProperty centerX

Defines the horizontal position of the center of the ellipse in pixels.

Default Value
0.0
centerYback to summary
private DoubleProperty centerY

Defines the vertical position of the center of the ellipse in pixels.

Default Value
0.0
NON_RECTILINEAR_TYPE_MASKback to summary
private static final int NON_RECTILINEAR_TYPE_MASK
radiusXback to summary
private final DoubleProperty radiusX

Defines the width of the ellipse in pixels.

Default Value
0.0
radiusYback to summary
private final DoubleProperty radiusY

Defines the height of the ellipse in pixels.

Default Value
0.0
shapeback to summary
private final Ellipse2D shape

Constructor Detail

Ellipseback to summary
public Ellipse()

Creates an empty instance of Ellipse.

Ellipseback to summary
public Ellipse(double radiusX, double radiusY)

Creates an instance of Ellipse of the given size.

Parameters
radiusX:double

the horizontal radius of the ellipse in pixels

radiusY:double

the vertical radius of the ellipse in pixels

Ellipseback to summary
public Ellipse(double centerX, double centerY, double radiusX, double radiusY)

Creates an instance of Ellipse of the given position and size.

Parameters
centerX:double

the horizontal position of the center of the ellipse in pixels

centerY:double

the vertical position of the center of the ellipse in pixels

radiusX:double

the horizontal radius of the ellipse in pixels

radiusY:double

the vertical radius of the ellipse in pixels

Method Detail

centerXPropertyback to summary
public final DoubleProperty centerXProperty()
centerYPropertyback to summary
public final DoubleProperty centerYProperty()
convertLineJoinback to summary
pack-priv StrokeLineJoin convertLineJoin(StrokeLineJoin t)

Overrides javafx.scene.shape.Shape.convertLineJoin.

Annotations
@Override
doComputeGeomBoundsback to summary
private BaseBounds doComputeGeomBounds(BaseBounds bounds, BaseTransform tx)

Hides javafx.scene.shape.Shape.doComputeGeomBounds.

doConfigShapeback to summary
private Ellipse2D 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()
getRadiusXback to summary
public final double getRadiusX()
getRadiusYback to summary
public final double getRadiusY()
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)
setRadiusXback to summary
public final void setRadiusX(double value)
setRadiusYback to summary
public final void setRadiusY(double value)
toStringback to summary
public String toString()

Overrides javafx.scene.Node.toString.

Returns a string representation of this Ellipse object.

Returns:String

a string representation of this Ellipse object.

Annotations
@Override