Class CapitalizeSentencesOperation
- java.lang.Object
-
- ro.sync.ecss.extensions.commons.operations.text.FormSelectedTextOperation
-
- ro.sync.ecss.extensions.commons.operations.text.CapitalizeSentencesOperation
-
- All Implemented Interfaces:
AuthorOperation
,Extension
@API(type=INTERNAL, src=PUBLIC) public class CapitalizeSentencesOperation extends FormSelectedTextOperation
The class provides an operation for forming sentences over a selection. If the start character of a sentence is lower case, it will be changed to upper case.
-
-
Field Summary
-
Fields inherited from interface ro.sync.ecss.extensions.api.AuthorOperation
NAMESPACE_ARGUMENT, NAMESPACE_ARGUMENT_DESCRIPTOR, SCHEMA_AWARE_ARGUMENT, SCHEMA_AWARE_ARGUMENT_DESCRIPTOR
-
-
Constructor Summary
Constructors Constructor Description CapitalizeSentencesOperation()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getDescription()
protected boolean
isDelimiterBeforeTextNode(AuthorAccess authorAccess, int contentOffset)
Decides if there is a sentence delimiter before the text node.protected char[]
processTextContent(char[] charArray, boolean isDelimiterBefore)
Process char array and upper case first letter of containing sentences.-
Methods inherited from class ro.sync.ecss.extensions.commons.operations.text.FormSelectedTextOperation
doOperation, getArguments, isWordDelimiter
-
-
-
-
Method Detail
-
isDelimiterBeforeTextNode
protected boolean isDelimiterBeforeTextNode(AuthorAccess authorAccess, int contentOffset) throws javax.swing.text.BadLocationException, AuthorOperationException
Description copied from class:FormSelectedTextOperation
Decides if there is a sentence delimiter before the text node.- Specified by:
isDelimiterBeforeTextNode
in classFormSelectedTextOperation
contentOffset
- The offset where search is started.- Returns:
true
if the there is a sentence delimiter before the text node orfalse
if a non-delimiter character was found.- Throws:
javax.swing.text.BadLocationException
AuthorOperationException
- See Also:
FormSelectedTextOperation.isDelimiterBeforeTextNode(ro.sync.ecss.extensions.api.AuthorAccess, int)
-
processTextContent
protected char[] processTextContent(char[] charArray, boolean isDelimiterBefore)
Process char array and upper case first letter of containing sentences.- Specified by:
processTextContent
in classFormSelectedTextOperation
- Parameters:
charArray
- The character array that must be processed.isDelimiterBefore
-true
if we have a delimiter before the given char array,false
otherwise.
-
getDescription
public java.lang.String getDescription()
- Returns:
- The description of the extension.
- See Also:
Extension.getDescription()
-
-