Package com.storedobject.svg
Class AbstractGroup<G extends AbstractGroup<G>>
java.lang.Object
com.storedobject.svg.Node<G>
com.storedobject.svg.Element<G>
com.storedobject.svg.AbstractGroup<G>
- All Implemented Interfaces:
Serializable
Abstract base class representing an SVG group element. This class is used to manage
and organize a collection of
Node elements within an SVG structure. It provides
functionality for handling child nodes, computing their bounding coordinates, and generating
the inner SVG content for the group.
Subclasses of AbstractGroup can extend and define additional behavior or functionality
specific to their use case while leveraging group-based organization in an SVG document.
- Author:
- Syam
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionA list that stores the childNodeelements contained within this group. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionchildren()Retrieves a stream of childNodeelements that are part of this group.protected voidcompute()This method is invoked to perform any necessary computations just before the SVG content is generated.protected StringRetrieves the inner content of the node.Methods inherited from class com.storedobject.svg.Node
attributes, copy, createDocument, equals, escapeXml, extraContent, flipHorizontally, flipHorizontallyAroundOrigin, flipVertically, flipVerticallyAroundOrigin, getCoordinates, getId, getMargin, getSvg, hashCode, id, ID, IDValue, moveTo, moveTo, rotate, rotateAround, rotateAround, rotateAroundCenter, scale, scale, scaleHeightTo, scaleTo, scaleWidthTo, toString, toString, transform, translate, translate
-
Field Details
-
children
A list that stores the childNodeelements contained within this group. It is used to manage and organize the hierarchical structure of the SVG group element. Thechildrenlist can contain zero or moreNodeobjects, representing the child elements nested under this group.This field is immutable, meaning the reference to the list itself cannot be changed. However, the contents of the list (i.e., the child
Nodeelements) can be modified by adding or removing items to the list. The order of elements in the list defines their rendering order in the SVG output.
-
-
Constructor Details
-
AbstractGroup
public AbstractGroup()
-
-
Method Details
-
children
-
compute
-
innerContent
Description copied from class:NodeRetrieves the inner content of the node. This method is typically implemented or overridden by subclasses to provide specific content representing the inner state or structure of the node.- Overrides:
innerContentin classNode<G extends AbstractGroup<G>>- Returns:
- A string containing the inner content of the node, or null if no content is defined.
-