Class EditImageMapCore
java.lang.Object
ro.sync.ecss.extensions.commons.imagemap.EditImageMapCore
- Direct Known Subclasses:
EditImageMapWithSurroundCore,XHTMLEditImageMapCore
Core methods to be used from the operations and from the image map decorators.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected final AuthorNodefindNodeOfInterest(AuthorAccess authorAccess, AuthorNode interestNode, String[] properties2Check) Check the current node and its parents for a specified property value.protected AuthorNodegetFullySelectedNode(AuthorDocumentController ctrl, int selStart, int selEnd, boolean hasSelection) Get the fully selected node if any.abstract AuthorNode[]getNodesOfInterest(AuthorAccess authorAccess, AuthorNode interestNode, boolean doSurroundIfMissing) Gets the nodes to edit.abstract SupportedFrameworksgetSupportedFramework(String namespaceURI) Detect the supported framework.protected booleanisNodeOfInterest(AuthorNode nodeToEdit, String property2Check) Check if the node is of interest.
-
Constructor Details
-
EditImageMapCore
public EditImageMapCore()
-
-
Method Details
-
getFullySelectedNode
protected AuthorNode getFullySelectedNode(AuthorDocumentController ctrl, int selStart, int selEnd, boolean hasSelection) Get the fully selected node if any.- Parameters:
ctrl- Author document controller.selStart- Selection start (inclusive).selEnd- Selection end (exclusive).hasSelection-trueif has selection.- Returns:
- The fully selected node, if any.
-
findNodeOfInterest
protected final AuthorNode findNodeOfInterest(AuthorAccess authorAccess, AuthorNode interestNode, String[] properties2Check) throws BadLocationException Check the current node and its parents for a specified property value. It might be the node name, an attribute value, etc.- Parameters:
authorAccess- The author access.interestNode- The node of interest if available when calling the method. Ifnullit will be determined from the AuthorAccess, from the caret position.properties2Check- The properties to check.- Returns:
- The identified node if any.
- Throws:
BadLocationException
-
isNodeOfInterest
Check if the node is of interest.- Parameters:
nodeToEdit- The node to edit candidate.property2Check- The property value to check.- Returns:
trueif the node is eligible,falseotherwise.
-
getNodesOfInterest
public abstract AuthorNode[] getNodesOfInterest(AuthorAccess authorAccess, AuthorNode interestNode, boolean doSurroundIfMissing) throws BadLocationException, AuthorOperationException Gets the nodes to edit.- Parameters:
authorAccess- The Author access.interestNode- The node of interest if available when calling the method. Ifnullit will be determined from the AuthorAccess, from the caret position.doSurroundIfMissing- Iftruethe missing part of the image map will be added.- Returns:
- The nodes to edit.
- Throws:
BadLocationExceptionAuthorOperationException
-
getSupportedFramework
Detect the supported framework.- Parameters:
namespaceURI- The namespace uri of the element.- Returns:
- The supported framework.
-