Class EditImageMapCore
- java.lang.Object
-
- ro.sync.ecss.extensions.commons.imagemap.EditImageMapCore
-
- Direct Known Subclasses:
EditImageMapWithSurroundCore
,XHTMLEditImageMapCore
@API(type=INTERNAL, src=PUBLIC) public abstract class EditImageMapCore extends java.lang.Object
Core methods to be used from the operations and from the image map decorators.
-
-
Constructor Summary
Constructors Constructor Description EditImageMapCore()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected AuthorNode
findNodeOfInterest(AuthorAccess authorAccess, AuthorNode interestNode, java.lang.String[] properties2Check)
Check the current node and its parents for a specified property value.protected AuthorNode
getFullySelectedNode(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 SupportedFrameworks
getSupportedFramework(java.lang.String namespaceURI)
Detect the supported framework.protected boolean
isNodeOfInterest(AuthorNode nodeToEdit, java.lang.String property2Check)
Check if the node is of interest.
-
-
-
Method Detail
-
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
-true
if has selection.- Returns:
- The fully selected node, if any.
-
findNodeOfInterest
protected final AuthorNode findNodeOfInterest(AuthorAccess authorAccess, AuthorNode interestNode, java.lang.String[] properties2Check) throws javax.swing.text.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. Ifnull
it will be determined from the AuthorAccess, from the caret position.properties2Check
- The properties to check.- Returns:
- The identified node if any.
- Throws:
javax.swing.text.BadLocationException
-
isNodeOfInterest
protected boolean isNodeOfInterest(AuthorNode nodeToEdit, java.lang.String property2Check)
Check if the node is of interest.- Parameters:
nodeToEdit
- The node to edit candidate.property2Check
- The property value to check.- Returns:
true
if the node is eligible,false
otherwise.
-
getNodesOfInterest
public abstract AuthorNode[] getNodesOfInterest(AuthorAccess authorAccess, AuthorNode interestNode, boolean doSurroundIfMissing) throws javax.swing.text.BadLocationException, AuthorOperationException
Gets the nodes to edit.- Parameters:
authorAccess
- The Author access.interestNode
- The node of interest if available when calling the method. Ifnull
it will be determined from the AuthorAccess, from the caret position.doSurroundIfMissing
- Iftrue
the missing part of the image map will be added.- Returns:
- The nodes to edit.
- Throws:
javax.swing.text.BadLocationException
AuthorOperationException
-
getSupportedFramework
public abstract SupportedFrameworks getSupportedFramework(java.lang.String namespaceURI)
Detect the supported framework.- Parameters:
namespaceURI
- The namespace uri of the element.- Returns:
- The supported framework.
-
-