Class EllipseElement
- All Implemented Interfaces:
Serializable
<ellipse> element.
The <ellipse> element is a basic SVG shape that draws ellipses,
defined by a center point and two radii (horizontal and vertical).
Write-Only vs Read-Write Methods
This class provides two variants for each attribute setter:
- Default methods (e.g.,
cx(),cy()) - Use an optimized write-only approach. Attribute values are NOT stored on the server and cannot be retrieved viagetAttribute(). - RW methods (e.g.,
cxRW(),cyRW()) - Use traditionalsetAttribute()which stores values on the server for later retrieval.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class SvgGraphicsElement
SvgGraphicsElement.LineCap, SvgGraphicsElement.LineJoinNested classes/interfaces inherited from class SvgElement
SvgElement.PreserveAspectRatio -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncenter(double cx, double cy) Convenience method to set the center position (cx, cy) at once.Convenience method to set the center position with strings (supports units/percentages).centerRW(double cx, double cy) Convenience method to set the center position (cx, cy) at once (read-write).Convenience method to set the center position with strings (read-write).cx(double cx) Sets the x-axis coordinate of the center of the ellipse.Sets the x-axis coordinate of the center of the ellipse with a unit or percentage.cxRW(double cx) Sets the x-axis coordinate of the center of the ellipse (read-write).Sets the x-axis coordinate of the center of the ellipse with a unit or percentage (read-write).cy(double cy) Sets the y-axis coordinate of the center of the ellipse.Sets the y-axis coordinate of the center of the ellipse with a unit or percentage.cyRW(double cy) Sets the y-axis coordinate of the center of the ellipse (read-write).Sets the y-axis coordinate of the center of the ellipse with a unit or percentage (read-write).pathLength(double pathLength) Sets the total length for the ellipse's path in user units.pathLengthRW(double pathLength) Sets the total length for the ellipse's path in user units (read-write).radii(double rx, double ry) Convenience method to set both radii at once.Convenience method to set both radii with strings (supports units/percentages).radiiRW(double rx, double ry) Convenience method to set both radii at once (read-write).Convenience method to set both radii with strings (read-write).rx(double rx) Sets the radius of the ellipse on the x axis.Sets the radius of the ellipse on the x axis with a unit or percentage.rxRW(double rx) Sets the radius of the ellipse on the x axis (read-write).Sets the radius of the ellipse on the x axis with a unit or percentage (read-write).ry(double ry) Sets the radius of the ellipse on the y axis.Sets the radius of the ellipse on the y axis with a unit or percentage.ryRW(double ry) Sets the radius of the ellipse on the y axis (read-write).Sets the radius of the ellipse on the y axis with a unit or percentage (read-write).Methods inherited from class SvgGraphicsElement
clearTransform, clipPath, clipPathRW, fill, fill, fill, fill, fill, fillOpacity, fillOpacityRW, fillRW, fillRW, fillRW, fillRW, fillRW, mask, maskRW, matrix, matrixRW, noFill, noFillRW, noStroke, noStrokeRW, opacity, opacityRW, rotate, rotate, rotateRW, rotateRW, scale, scale, scaleRW, scaleRW, skewX, skewXRW, skewY, skewYRW, stroke, stroke, stroke, stroke, stroke, strokeDasharray, strokeDasharray, strokeDasharrayRW, strokeDasharrayRW, strokeDashoffset, strokeDashoffsetRW, strokeLinecap, strokeLinecapRW, strokeLinejoin, strokeLinejoinRW, strokeMiterlimit, strokeMiterlimitRW, strokeOpacity, strokeOpacityRW, strokeRW, strokeRW, strokeRW, strokeRW, strokeRW, strokeWidth, strokeWidth, strokeWidthRW, strokeWidthRW, transform, transformRW, translate, translateRW, translateX, translateXRW, translateY, translateYRWMethods inherited from class SvgElement
emptySvgRoot, flushPendingAttributes, getOuterHTML, getPendingOrAttribute, getStyle, height, height, id, preserveAspectRatio, preserveAspectRatio, scheduleBeforeClientResponse, setAttribute, setWriteOnlyAttribute, size, size, viewBox, width, widthMethods inherited from class com.vaadin.flow.dom.Element
addAttachListener, addDetachListener, addEventListener, addPropertyChangeListener, addPropertyChangeListener, as, attachShadow, bindAttribute, bindProperty, bindText, callJsFunction, callJsFunction, createText, executeJs, executeJs, get, get, getAttribute, getAttributeNames, getChild, getChildCount, getChildren, getClassList, getComponent, getParent, getProperty, getProperty, getProperty, getProperty, getProperty, getPropertyBean, getPropertyBean, getPropertyNames, getPropertyRaw, getSelf, getShadowRoot, getTag, getText, getTextRecursively, getThemeList, hasAttribute, hasProperty, isEnabled, isTextNode, isVisible, removeAttribute, removeFromParent, removeFromTree, removeFromTree, removeProperty, scrollIntoView, scrollIntoView, setAttribute, setAttribute, setAttribute, setEnabled, setProperty, setProperty, setProperty, setPropertyBean, setPropertyJson, setPropertyList, setPropertyMap, setText, setVisible, toStringMethods inherited from class com.vaadin.flow.dom.Node
accept, appendChild, appendChild, appendVirtualChild, appendVirtualChild, ensureChildHasParent, equals, getNode, getParentNode, getStateProvider, hashCode, indexOfChild, insertChild, insertChild, isVirtualChild, removeAllChildren, removeChild, removeChild, removeChild, removeVirtualChild, removeVirtualChild, setChild
-
Constructor Details
-
EllipseElement
public EllipseElement()
-
-
Method Details
-
cx
Sets the x-axis coordinate of the center of the ellipse.Uses write-only optimization. Use
cxRW(double)if you need to read the value back.- Parameters:
cx- the x coordinate of the center in user units- Returns:
- this element for method chaining
-
cx
Sets the x-axis coordinate of the center of the ellipse with a unit or percentage.Uses write-only optimization. Use
cxRW(String)if you need to read the value back.- Parameters:
cx- the x coordinate of the center (e.g., "50", "50%", "10px")- Returns:
- this element for method chaining
-
cxRW
Sets the x-axis coordinate of the center of the ellipse (read-write).- Parameters:
cx- the x coordinate of the center in user units- Returns:
- this element for method chaining
-
cxRW
Sets the x-axis coordinate of the center of the ellipse with a unit or percentage (read-write).- Parameters:
cx- the x coordinate of the center (e.g., "50", "50%", "10px")- Returns:
- this element for method chaining
-
cy
Sets the y-axis coordinate of the center of the ellipse.Uses write-only optimization. Use
cyRW(double)if you need to read the value back.- Parameters:
cy- the y coordinate of the center in user units- Returns:
- this element for method chaining
-
cy
Sets the y-axis coordinate of the center of the ellipse with a unit or percentage.Uses write-only optimization. Use
cyRW(String)if you need to read the value back.- Parameters:
cy- the y coordinate of the center (e.g., "50", "50%", "10px")- Returns:
- this element for method chaining
-
cyRW
Sets the y-axis coordinate of the center of the ellipse (read-write).- Parameters:
cy- the y coordinate of the center in user units- Returns:
- this element for method chaining
-
cyRW
Sets the y-axis coordinate of the center of the ellipse with a unit or percentage (read-write).- Parameters:
cy- the y coordinate of the center (e.g., "50", "50%", "10px")- Returns:
- this element for method chaining
-
rx
Sets the radius of the ellipse on the x axis.Uses write-only optimization. Use
rxRW(double)if you need to read the value back.- Parameters:
rx- the horizontal radius in user units- Returns:
- this element for method chaining
-
rx
Sets the radius of the ellipse on the x axis with a unit or percentage.Uses write-only optimization. Use
rxRW(String)if you need to read the value back.- Parameters:
rx- the horizontal radius (e.g., "50", "25%", "10px")- Returns:
- this element for method chaining
-
rxRW
Sets the radius of the ellipse on the x axis (read-write).- Parameters:
rx- the horizontal radius in user units- Returns:
- this element for method chaining
-
rxRW
Sets the radius of the ellipse on the x axis with a unit or percentage (read-write).- Parameters:
rx- the horizontal radius (e.g., "50", "25%", "10px")- Returns:
- this element for method chaining
-
ry
Sets the radius of the ellipse on the y axis.Uses write-only optimization. Use
ryRW(double)if you need to read the value back.- Parameters:
ry- the vertical radius in user units- Returns:
- this element for method chaining
-
ry
Sets the radius of the ellipse on the y axis with a unit or percentage.Uses write-only optimization. Use
ryRW(String)if you need to read the value back.- Parameters:
ry- the vertical radius (e.g., "50", "25%", "10px")- Returns:
- this element for method chaining
-
ryRW
Sets the radius of the ellipse on the y axis (read-write).- Parameters:
ry- the vertical radius in user units- Returns:
- this element for method chaining
-
ryRW
Sets the radius of the ellipse on the y axis with a unit or percentage (read-write).- Parameters:
ry- the vertical radius (e.g., "50", "25%", "10px")- Returns:
- this element for method chaining
-
pathLength
Sets the total length for the ellipse's path in user units.This value is used to calibrate the browser's distance calculations with those of the author, by scaling all distance computations using the ratio pathLength / (computed value of path length).
Uses write-only optimization. Use
pathLengthRW(double)if you need to read the value back.- Parameters:
pathLength- the total path length in user units- Returns:
- this element for method chaining
-
pathLengthRW
Sets the total length for the ellipse's path in user units (read-write).- Parameters:
pathLength- the total path length in user units- Returns:
- this element for method chaining
-
center
Convenience method to set the center position (cx, cy) at once.Uses write-only optimization. Use
centerRW(double, double)if you need to read the values back.- Parameters:
cx- the x coordinate of the center in user unitscy- the y coordinate of the center in user units- Returns:
- this element for method chaining
-
center
Convenience method to set the center position with strings (supports units/percentages).Uses write-only optimization. Use
centerRW(String, String)if you need to read the values back.- Parameters:
cx- the x coordinate of the center (e.g., "50%")cy- the y coordinate of the center (e.g., "50%")- Returns:
- this element for method chaining
-
centerRW
Convenience method to set the center position (cx, cy) at once (read-write).- Parameters:
cx- the x coordinate of the center in user unitscy- the y coordinate of the center in user units- Returns:
- this element for method chaining
-
centerRW
Convenience method to set the center position with strings (read-write).- Parameters:
cx- the x coordinate of the center (e.g., "50%")cy- the y coordinate of the center (e.g., "50%")- Returns:
- this element for method chaining
-
radii
Convenience method to set both radii at once.Uses write-only optimization. Use
radiiRW(double, double)if you need to read the values back.- Parameters:
rx- the horizontal radius in user unitsry- the vertical radius in user units- Returns:
- this element for method chaining
-
radii
Convenience method to set both radii with strings (supports units/percentages).Uses write-only optimization. Use
radiiRW(String, String)if you need to read the values back.- Parameters:
rx- the horizontal radius (e.g., "50%")ry- the vertical radius (e.g., "25%")- Returns:
- this element for method chaining
-
radiiRW
Convenience method to set both radii at once (read-write).- Parameters:
rx- the horizontal radius in user unitsry- the vertical radius in user units- Returns:
- this element for method chaining
-
radiiRW
Convenience method to set both radii with strings (read-write).- Parameters:
rx- the horizontal radius (e.g., "50%")ry- the vertical radius (e.g., "25%")- Returns:
- this element for method chaining
-