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
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 -
Method Summary
Modifier and TypeMethodDescriptionabstract boolean
canHandle
(String rootNamespace, String rootLocalName, Attributes rootAttributes) Check if can handle this XML fragment having a certain root name, namespace and attributes.abstract boolean
canHandleNamespace
(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
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
-
Constructor Details
-
XMLImageHandler
public XMLImageHandler()
-
-
Method Details
-
canHandleNamespace
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
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(String rootNamespace, String rootLocalName, 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
-