Class EditImageMapWithSurroundCore
- java.lang.Object
-
- ro.sync.ecss.extensions.commons.imagemap.EditImageMapCore
-
- ro.sync.ecss.extensions.commons.imagemap.EditImageMapWithSurroundCore
-
- Direct Known Subclasses:
DITAEditImageMapCore
,DocbookEditImageMapCore
,TEIEditImageMapCore
@API(type=INTERNAL, src=PUBLIC) public abstract class EditImageMapWithSurroundCore extends EditImageMapCore
Core for the frameworks that need to surround the "image" in an "image map".
-
-
Constructor Summary
Constructors Constructor Description EditImageMapWithSurroundCore()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description AuthorNode[]
getNodesOfInterest(AuthorAccess authorAccess, AuthorNode interestNode, boolean doSurroundIfMissing)
Gets the nodes to edit.protected abstract java.lang.String[]
getNodesOfInterestCriteria(java.lang.String namespace)
Get the criteria for nodes of interest, and the start and end of the fragment to surround with.protected boolean
needComplexSurround(AuthorNode nodeToEdit)
Check if the edited node need more complex surrounding.-
Methods inherited from class ro.sync.ecss.extensions.commons.imagemap.EditImageMapCore
findNodeOfInterest, getFullySelectedNode, getSupportedFramework, isNodeOfInterest
-
-
-
-
Method Detail
-
getNodesOfInterest
public final AuthorNode[] getNodesOfInterest(AuthorAccess authorAccess, AuthorNode interestNode, boolean doSurroundIfMissing) throws javax.swing.text.BadLocationException, AuthorOperationException
Gets the nodes to edit.- Specified by:
getNodesOfInterest
in classEditImageMapCore
- 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
-
needComplexSurround
protected boolean needComplexSurround(AuthorNode nodeToEdit)
Check if the edited node need more complex surrounding.- Parameters:
nodeToEdit
- The node to edit.- Returns:
true
if complex surrounding need to be performed.
-
getNodesOfInterestCriteria
protected abstract java.lang.String[] getNodesOfInterestCriteria(java.lang.String namespace)
Get the criteria for nodes of interest, and the start and end of the fragment to surround with.- Parameters:
namespace
- The namespace of the document.- Returns:
- A 4 items array with the main property, the secondary property, and the start + end of the fragment to surround with.
-
-