Package com.storedobject.svg
Class Element<E extends Element<E>>
java.lang.Object
com.storedobject.svg.Node<E>
com.storedobject.svg.Element<E>
- Type Parameters:
E- The type of the element itself, extending Element.
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
AbstractGroup,AbstractPolyline,AbstractRectangle,Circle,Ellipse,Line,Path,Text
Represents an SVG element. Unlike the
Node class, this class is more specific to individual SVG elements
and does not have the concept of combining tags. It is used to represent standalone SVG tags like
rect,circle, etc. However, each element can have its own styles.- Author:
- Syam
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class com.storedobject.svg.Node
attributes, compute, copy, createDocument, equals, escapeXml, extraContent, flipHorizontally, flipHorizontallyAroundOrigin, flipVertically, flipVerticallyAroundOrigin, getCoordinates, getId, getMargin, getSvg, hashCode, id, ID, IDValue, innerContent, moveTo, moveTo, rotate, rotateAround, rotateAround, rotateAroundCenter, scale, scale, scaleHeightTo, scaleTo, scaleWidthTo, toString, toString, transform, translate, translate
-
Field Details
-
tag
The SVG tag associated with this element. -
styles
Styles for this element.
-
-
Constructor Details
-
Element
Constructs a new instance of the Element class. This serves as the base constructor for all SVG elements, initializing the object without setting specific styles or properties.- Parameters:
tag- The SVG tag associated with this element.
-
-
Method Details
-
tag
Description copied from class:NodeRetrieves the tag associated with this node. This tag is typically used to denote the type or category of the node in contexts such as SVG generation or XML representation.Note: If null is returned, it indicates that the node does not have a specific tag and may be treated as a generic group. In such cases, only inner content and extra content are considered.
-
styles
Description copied from class:NodeRetrieves the styles associated with this node. This method is typically overridden by subclasses to provide specific styling information related to the node's state or properties. -
getStyles
Retrieves the styles associated with this SVG element.- Returns:
- An instance of
Stylescontaining the style properties for this element in the form of key-value pairs.
-