Class CommonsOperationsUtil.ConversionElementHelper

  • Enclosing class:
    CommonsOperationsUtil

    public abstract static class CommonsOperationsUtil.ConversionElementHelper
    extends java.lang.Object
    Interface used to check the elements that will be converted in other elements (table cells or list entries)
    • Constructor Detail

      • ConversionElementHelper

        public ConversionElementHelper()
    • Method Detail

      • blockContentMustBeConverted

        public abstract boolean blockContentMustBeConverted​(AuthorNode node,
                                                            AuthorAccess authorAccess)
                                                     throws AuthorOperationException
        Check if a block node can be converted in other node (cell or list entry). If this method returns false, the block node is treated like an inline node.
        Parameters:
        node - The node to check
        authorAccess - The author access
        Returns:
        true if the conversion can not be completed for this node
        Throws:
        AuthorOperationException
      • createAuthorDocumentFragment

        public AuthorDocumentFragment createAuthorDocumentFragment​(AuthorDocumentController controller,
                                                                   int start,
                                                                   int end)
                                                            throws AuthorOperationException,
                                                                   javax.swing.text.BadLocationException
        Create the author document fragment to be inserted in a table cell/list item
        Parameters:
        controller - The document controller.
        start - The start offset.
        end - The end offset.
        Returns:
        The fragment. If null, a document fragment from the provided offsets will be created.
        Throws:
        javax.swing.text.BadLocationException - When the given offset is not in content.
        AuthorOperationException - When the operation could not be completed.