Class BaseContainerNode<E>
- java.lang.Object
-
- com.github.weisj.jsvg.nodes.AbstractSVGNode
-
- com.github.weisj.jsvg.nodes.container.BaseContainerNode<E>
-
- Direct Known Subclasses:
CommonRenderableContainerNode
,ContainerNode
,TextContainer
public abstract class BaseContainerNode<E> extends AbstractSVGNode implements Container<E>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
BaseContainerNode.CategoryCheckResult
-
Field Summary
Fields Modifier and Type Field Description private static boolean
EXHAUSTIVE_CHECK
private static java.util.logging.Logger
LOGGER
-
Constructor Summary
Constructors Constructor Description BaseContainerNode()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected boolean
acceptChild(@Nullable java.lang.String id, @NotNull SVGNode node)
Determine whether the container accepts thisSVGNode
as a child.void
addChild(@Nullable java.lang.String id, @NotNull SVGNode node)
protected abstract void
doAdd(@NotNull SVGNode node)
private BaseContainerNode.CategoryCheckResult
doIntersect(Category[] requested, Category[] provided)
protected boolean
isAcceptableType(@NotNull SVGNode node)
-
Methods inherited from class com.github.weisj.jsvg.nodes.AbstractSVGNode
addContent, build, id, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.github.weisj.jsvg.nodes.prototype.Container
children, childrenOfType
-
-
-
-
Field Detail
-
EXHAUSTIVE_CHECK
private static final boolean EXHAUSTIVE_CHECK
- See Also:
- Constant Field Values
-
LOGGER
private static final java.util.logging.Logger LOGGER
-
-
Method Detail
-
addChild
public final void addChild(@Nullable @Nullable java.lang.String id, @NotNull @NotNull SVGNode node)
-
doAdd
protected abstract void doAdd(@NotNull @NotNull SVGNode node)
-
acceptChild
protected boolean acceptChild(@Nullable @Nullable java.lang.String id, @NotNull @NotNull SVGNode node)
Determine whether the container accepts thisSVGNode
as a child. By default, this will always report true but subclasses may choose to reject certain types of nodes.- Parameters:
id
- the id of the nodenode
- the node itself- Returns:
- whether the node can be inserted as a child.
-
isAcceptableType
protected boolean isAcceptableType(@NotNull @NotNull SVGNode node)
-
doIntersect
private BaseContainerNode.CategoryCheckResult doIntersect(Category[] requested, Category[] provided)
-
-