public class Ellipse extends Shape
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);
Type | Property and Description |
---|---|
DoubleProperty |
centerX
Defines the horizontal position of the center of the ellipse in pixels.
|
DoubleProperty |
centerY
Defines the vertical position of the center of the ellipse in pixels.
|
DoubleProperty |
radiusX
Defines the width of the ellipse in pixels.
|
DoubleProperty |
radiusY
Defines the height of the ellipse in pixels.
|
fillProperty, smoothProperty, strokeDashOffsetProperty, strokeLineCapProperty, strokeLineJoinProperty, strokeMiterLimitProperty, strokeProperty, strokeTypeProperty, strokeWidthProperty
Modifier and Type | Field 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 int |
NON_RECTILINEAR_TYPE_MASK |
private DoubleProperty |
radiusX
Defines the width of the ellipse in pixels.
|
private DoubleProperty |
radiusY
Defines the height of the ellipse in pixels.
|
private Ellipse2D |
shape |
old_fill, old_stroke
Constructor and Description |
---|
Ellipse()
Creates an empty instance of Ellipse.
|
Ellipse(double radiusX,
double radiusY)
Creates an instance of Ellipse of the given size.
|
Ellipse(double centerX,
double centerY,
double radiusX,
double radiusY)
Creates an instance of Ellipse of the given position and size.
|
Modifier and Type | Method and Description |
---|---|
DoubleProperty |
centerXProperty()
Defines the horizontal position of the center of the ellipse in pixels.
|
DoubleProperty |
centerYProperty()
Defines the vertical position of the center of the ellipse in pixels.
|
(package private) StrokeLineJoin |
convertLineJoin(StrokeLineJoin t) |
private BaseBounds |
doComputeGeomBounds(BaseBounds bounds,
BaseTransform tx) |
private Ellipse2D |
doConfigShape() |
private NGNode |
doCreatePeer() |
private void |
doUpdatePeer() |
double |
getCenterX()
Gets the value of the property centerX.
|
double |
getCenterY()
Gets the value of the property centerY.
|
double |
getRadiusX()
Gets the value of the property radiusX.
|
double |
getRadiusY()
Gets the value of the property radiusY.
|
DoubleProperty |
radiusXProperty()
Defines the width of the ellipse in pixels.
|
DoubleProperty |
radiusYProperty()
Defines the height of the ellipse in pixels.
|
void |
setCenterX(double value)
Sets the value of the property centerX.
|
void |
setCenterY(double value)
Sets the value of the property centerY.
|
void |
setRadiusX(double value)
Sets the value of the property radiusX.
|
void |
setRadiusY(double value)
Sets the value of the property radiusY.
|
java.lang.String |
toString()
Returns a string representation of this
Ellipse object. |
computeBounds, computeShapeBounds, computeShapeContains, fillProperty, getClassCssMetaData, getCssMetaData, getFill, getMode, getStroke, getStrokeDashArray, getStrokeDashOffset, getStrokeLineCap, getStrokeLineJoin, getStrokeMiterLimit, getStrokeType, getStrokeWidth, intersect, isSmooth, setFill, setMode, setShapeChangeListener, setSmooth, setStroke, setStrokeDashOffset, setStrokeLineCap, setStrokeLineJoin, setStrokeMiterLimit, setStrokeType, setStrokeWidth, smoothProperty, strokeDashOffsetProperty, strokeLineCapProperty, strokeLineJoinProperty, strokeMiterLimitProperty, strokeProperty, strokeTypeProperty, strokeWidthProperty, subtract, union
public final DoubleProperty centerXProperty
getCenterX()
,
setCenterX(double)
public final DoubleProperty centerYProperty
getCenterY()
,
setCenterY(double)
public final DoubleProperty radiusXProperty
getRadiusX()
,
setRadiusX(double)
public final DoubleProperty radiusYProperty
getRadiusY()
,
setRadiusY(double)
private final Ellipse2D shape
private static final int NON_RECTILINEAR_TYPE_MASK
private DoubleProperty centerX
private DoubleProperty centerY
private final DoubleProperty radiusX
private final DoubleProperty radiusY
public Ellipse()
public Ellipse(double radiusX, double radiusY)
radiusX
- the horizontal radius of the ellipse in pixelsradiusY
- the vertical radius of the ellipse in pixelspublic Ellipse(double centerX, double centerY, double radiusX, double radiusY)
centerX
- the horizontal position of the center of the ellipse in pixelscenterY
- the vertical position of the center of the ellipse in pixelsradiusX
- the horizontal radius of the ellipse in pixelsradiusY
- the vertical radius of the ellipse in pixelspublic final void setCenterX(double value)
public final double getCenterX()
public final DoubleProperty centerXProperty()
getCenterX()
,
setCenterX(double)
public final void setCenterY(double value)
public final double getCenterY()
public final DoubleProperty centerYProperty()
getCenterY()
,
setCenterY(double)
public final void setRadiusX(double value)
public final double getRadiusX()
public final DoubleProperty radiusXProperty()
getRadiusX()
,
setRadiusX(double)
public final void setRadiusY(double value)
public final double getRadiusY()
public final DoubleProperty radiusYProperty()
getRadiusY()
,
setRadiusY(double)
private NGNode doCreatePeer()
StrokeLineJoin convertLineJoin(StrokeLineJoin t)
convertLineJoin
in class Shape
private BaseBounds doComputeGeomBounds(BaseBounds bounds, BaseTransform tx)
private Ellipse2D doConfigShape()
private void doUpdatePeer()
public java.lang.String toString()
Ellipse
object.Ellipse
object.