Module org.tquadrat.foundation.svg
Package org.tquadrat.foundation.svg
Interface SVGElementWithChildren
- All Superinterfaces:
Element,SVGElement
- All Known Subinterfaces:
SVG,SVGClipPath,SVGGroup,SVGLine,SVGMarker,SVGPath,SVGPositionedMarker,SVGRectangle,SVGSymbol,SVGText,SVGTSpan
- All Known Implementing Classes:
SVGClipPathImpl,SVGElementAdapter,SVGGenericElement,SVGGroupImpl,SVGImpl,SVGLineImpl,SVGMarkerImpl,SVGPathImpl,SVGPositionedMarkerImpl,SVGRectangleImpl,SVGSymbolImpl,SVGTextImpl,SVGTSpanImpl
@ClassVersion(sourceVersion="$Id: SVGElementWithChildren.java 820 2020-12-29 20:34:22Z tquadrat $")
@API(status=STABLE,
since="0.0.5")
public sealed interface SVGElementWithChildren
extends SVGElement
permits SVG, SVGClipPath, SVGGroup, SVGLine, SVGMarker, SVGPath, SVGRectangle, SVGSymbol, SVGTSpan, SVGText
The definition of an SVG element that allows child elements.
- Author:
- Thomas Thrien (thomas.thrien@tquadrat.org)
- Version:
- $Id: SVGElementWithChildren.java 820 2020-12-29 20:34:22Z tquadrat $
- Since:
- 0.0.5
- UML Diagram
-
UML Diagram for "org.tquadrat.foundation.svg.SVGElementWithChildren"
-
Field Summary
Fields inherited from interface org.tquadrat.foundation.svg.SVGElement
CORE_ATTRIBUTES -
Method Summary
Modifier and TypeMethodDescription<E extends SVGElement>
voidaddChild(E child) Adds a child to this element.voidsetDescription(CharSequence description) Sets the description for the SVG element.
This is not an attribute, instead a<"desc">element will be added as a child.Methods inherited from interface org.tquadrat.foundation.xml.builder.spi.Element
getAttribute, getAttributes, getChildren, getElementName, getNamespaces, getParent, hasChildren, isBlock, setParent, toStringMethods inherited from interface org.tquadrat.foundation.svg.SVGElement
addComment, getSVGElementCategory, setId, setLang, setPreserveSpace, setTabIndex, setTitle, setXMLBase, setXMLId, setXMLLang
-
Method Details
-
addChild
<E extends SVGElement> void addChild(E child) throws IllegalArgumentException, IllegalStateException Adds a child to this element.- Type Parameters:
E- The implementation type for thechildren.- Parameters:
child- The child to add.- Throws:
IllegalArgumentException- The given child is not valid for this element or no children are allowed at all.IllegalStateException- The child has already a parent that is not this element.
-
setDescription
Sets the description for the SVG element.
This is not an attribute, instead a<"desc">element will be added as a child.- Parameters:
description- The description.
-
