Class CircleElement
- All Implemented Interfaces:
Serializable
<circle> element.
The <circle> element is a basic SVG shape that draws circles,
defined by a center point and a radius.
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 circle.Sets the x-axis coordinate of the center of the circle with a unit or percentage.cxRW(double cx) Sets the x-axis coordinate of the center of the circle (read-write).Sets the x-axis coordinate of the center of the circle with a unit or percentage (read-write).cy(double cy) Sets the y-axis coordinate of the center of the circle.Sets the y-axis coordinate of the center of the circle with a unit or percentage.cyRW(double cy) Sets the y-axis coordinate of the center of the circle (read-write).Sets the y-axis coordinate of the center of the circle with a unit or percentage (read-write).pathLength(double pathLength) Sets the total length for the circle's circumference in user units.pathLengthRW(double pathLength) Sets the total length for the circle's circumference in user units (read-write).r(double r) Sets the radius of the circle.Sets the radius of the circle with a unit or percentage.rRW(double r) Sets the radius of the circle (read-write).Sets the radius of the circle 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
-
CircleElement
public CircleElement()
-
-
Method Details
-
cx
Sets the x-axis coordinate of the center of the circle.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 circle 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 circle (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 circle 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 circle.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 circle 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 circle (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 circle 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
-
r
Sets the radius of the circle.A value less than or equal to zero disables rendering of the circle.
Uses write-only optimization. Use
rRW(double)if you need to read the value back.- Parameters:
r- the radius in user units- Returns:
- this element for method chaining
-
r
Sets the radius of the circle with a unit or percentage.A value less than or equal to zero disables rendering of the circle.
Uses write-only optimization. Use
rRW(String)if you need to read the value back.- Parameters:
r- the radius (e.g., "25", "50%", "10px")- Returns:
- this element for method chaining
-
rRW
Sets the radius of the circle (read-write).- Parameters:
r- the radius in user units- Returns:
- this element for method chaining
-
rRW
Sets the radius of the circle with a unit or percentage (read-write).- Parameters:
r- the radius (e.g., "25", "50%", "10px")- Returns:
- this element for method chaining
-
pathLength
Sets the total length for the circle's circumference 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 circumference).
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 circle's circumference 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
-