Class CommonsOperationsUtil.ConversionElementHelper
java.lang.Object
ro.sync.ecss.extensions.commons.operations.CommonsOperationsUtil.ConversionElementHelper
- Enclosing class:
- CommonsOperationsUtil
Interface used to check the elements that will be converted in other elements
(table cells or list entries)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract boolean
blockContentMustBeConverted
(AuthorNode node, AuthorAccess authorAccess) Check if a block node can be converted in other node (cell or list entry).createAuthorDocumentFragment
(AuthorDocumentController controller, int start, int end) Create the author document fragment to be inserted in a table cell/list item
-
Constructor Details
-
ConversionElementHelper
public ConversionElementHelper()
-
-
Method Details
-
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 checkauthorAccess
- 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, 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:
BadLocationException
- When the given offset is not in content.AuthorOperationException
- When the operation could not be completed.
-