Package com.storedobject.svg
Class Group
java.lang.Object
com.storedobject.svg.Node
com.storedobject.svg.Element
com.storedobject.svg.Group
Represents a group element in the SVG structure. The
Group class is used to manage and
organize a collection of child Node elements, allowing for their collective manipulation
and rendering in an SVG format. It provides functionality to add, remove, and iterate through child
elements, as well as to build the group into its final SVG representation.- Author:
- Syam
-
Nested Class Summary
Nested classes/interfaces inherited from class com.storedobject.svg.Node
Node.Anchor, Node.Margin, Node.Mover, Node.Scale, Node.ScaleTo -
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidInserts a childNodeat the specified position within the group's list of children.voidAdds a childNodeto the group.voidbuild()Build the content.children()Retrieves a stream of childNodeelements that are part of this group.voidRemoves a childNodefrom the group.Methods inherited from class com.storedobject.svg.Element
getStyles, getTag, isBuilt, styleEnd, styleStartMethods inherited from class com.storedobject.svg.Node
add, add, add, createDocument, duplicate, equals, escapeXml, flipHorizontally, flipVertically, getCoordinates, getHeight, getId, getSvg, getWidth, getX1, getX2, getY1, getY2, hashCode, ID, IDValue, margin, margin, margin, moveTo, moveTo, scale, scale, scaleTo, scaleToHeight, scaleToWidth, toString, toString
-
Constructor Details
-
Group
public Group()Default constructor for theGroupclass. Initializes a new instance of theGroupelement with the SVG tag "g". This constructor sets up the base structure required for managing and organizing a collection of childNodeelements in the SVG structure.
-
-
Method Details
-
add
-
add
Inserts a childNodeat the specified position within the group's list of children. If the providedchildnode is non-null, it will be added at the specified index.- Parameters:
index- the position at which thechildshould be inserted; must be a valid index.child- theNodeto be inserted; must not be null.
-
remove
-
children
-
build
-