Class XMLImageHandler
- java.lang.Object
-
- ro.sync.exml.workspace.api.images.handlers.ImageHandler
-
- ro.sync.exml.workspace.api.images.handlers.EditImageHandler
-
- ro.sync.exml.workspace.api.images.handlers.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 Summary
Constructors Constructor Description XMLImageHandler()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description 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.abstract boolean
canHandleNamespace(java.lang.String namespace)
Checks if the element is recognized as an embedded image.boolean
canHandleNodeContext(NodeContext nodeContext)
Checks if the element is recognized as an embedded image.boolean
canHandleVectorialImages()
Checks if current handler handles vectorial images (like SVG).-
Methods inherited from class ro.sync.exml.workspace.api.images.handlers.EditImageHandler
editImage, editImage
-
Methods inherited from class ro.sync.exml.workspace.api.images.handlers.ImageHandler
canHandleFileType, clearCache, getImage, getImageLayoutInformation
-
-
-
-
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
-
-