Class BaseContainerNode<E>

java.lang.Object
com.github.weisj.jsvg.nodes.AbstractSVGNode
com.github.weisj.jsvg.nodes.container.BaseContainerNode<E>
All Implemented Interfaces:
Container<E>, SVGNode
Direct Known Subclasses:
CommonRenderableContainerNode, ContainerNode, Text, TextPath, TextSpan

public abstract class BaseContainerNode<E> extends AbstractSVGNode implements Container<E>
  • Constructor Details

    • BaseContainerNode

      public BaseContainerNode()
  • Method Details

    • addChild

      public final void addChild(@Nullable @Nullable String id, @NotNull @NotNull SVGNode node)
      Specified by:
      addChild in interface Container<E>
    • doAdd

      protected abstract void doAdd(@NotNull @NotNull SVGNode node)
    • acceptChild

      protected boolean acceptChild(@Nullable @Nullable String id, @NotNull @NotNull SVGNode node)
      Determine whether the container accepts this SVGNode 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 node
      node - the node itself
      Returns:
      whether the node can be inserted as a child.
    • isAcceptableType

      protected boolean isAcceptableType(@NotNull @NotNull SVGNode node)