Class EditImageMapWithSurroundCore

    • Constructor Detail

      • EditImageMapWithSurroundCore

        public EditImageMapWithSurroundCore()
    • 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 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:
        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.