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 Object
Core methods to be used from the operations and from the image map decorators.
  • 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 - true if 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. If null it will be determined from the AuthorAccess, from the caret position.
      properties2Check - The properties to check.
      Returns:
      The identified node if any.
      Throws:
      BadLocationException
    • isNodeOfInterest

      protected boolean isNodeOfInterest(AuthorNode nodeToEdit, 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 BadLocationException, AuthorOperationException
      Gets the nodes to edit.
      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
    • getSupportedFramework

      public abstract SupportedFrameworks getSupportedFramework(String namespaceURI)
      Detect the supported framework.
      Parameters:
      namespaceURI - The namespace uri of the element.
      Returns:
      The supported framework.