Class XMLImageHandler


  • @API(type=EXTENDABLE,
         src=PUBLIC)
    public abstract class XMLImageHandler
    extends EditImageHandler
    Special handler for editing images defined as XML (SVG, MathML, etc). The image is either embedded in the XML content or referenced from it...
    Since:
    18
    • Constructor Detail

      • XMLImageHandler

        public XMLImageHandler()
    • Method Detail

      • canHandleNamespace

        public abstract boolean canHandleNamespace​(java.lang.String namespace)
        Checks if the element is recognized as an embedded image. For instance if the element is from the MathML namespace, then a MathML handler would return true, and it can be used to generate an image from it.
        Parameters:
        namespace - The namespace of the element from the document.
        Returns:
        True if the element was recognized by the handler - an image can be generated for it.
      • canHandleNodeContext

        public boolean canHandleNodeContext​(NodeContext nodeContext)
        Checks if the element is recognized as an embedded image. For instance if the element is from the MathML namespace, then a MathML handler would return true, and it can be used to generate an image from it.
        Parameters:
        nodeContext - The context for an element.
        Returns:
        True if the element was recognized by the handler - an image can be generated for it.
      • canHandle

        public abstract boolean canHandle​(java.lang.String rootNamespace,
                                          java.lang.String rootLocalName,
                                          org.xml.sax.Attributes rootAttributes)
        Check if can handle this XML fragment having a certain root name, namespace and attributes.
        Parameters:
        rootNamespace - The root namespace.
        rootLocalName - The root local name.
        rootAttributes - The root attributes.
        Returns:
        true if can handle this document.
      • canHandleVectorialImages

        public boolean canHandleVectorialImages()
        Checks if current handler handles vectorial images (like SVG).
        Returns:
        true if current handler is for vectorial images.
        Since:
        24.0