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 Details

    • EditImageMapWithSurroundCore

      public EditImageMapWithSurroundCore()
  • Method Details

    • getNodesOfInterest

      public final AuthorNode[] getNodesOfInterest(AuthorAccess authorAccess, AuthorNode interestNode, boolean doSurroundIfMissing) throws BadLocationException, AuthorOperationException
      Gets the nodes to edit.
      Specified by:
      getNodesOfInterest in class EditImageMapCore
      Parameters:
      authorAccess - The Author access.
      interestNode - The node of interest if available when calling the method. If null it will be determined from the AuthorAccess, from the caret position.
      doSurroundIfMissing - If true the missing part of the image map will be added.
      Returns:
      The nodes to edit.
      Throws:
      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 String[] getNodesOfInterestCriteria(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.