Class CapitalizeWordsOperation
- java.lang.Object
-
- ro.sync.ecss.extensions.commons.operations.text.FormSelectedTextOperation
-
- ro.sync.ecss.extensions.commons.operations.text.CapitalizeWordsOperation
-
- All Implemented Interfaces:
AuthorOperation
,Extension
@API(type=INTERNAL, src=PUBLIC) public class CapitalizeWordsOperation extends FormSelectedTextOperation
The class provides an operation for forming words over a selection. If the start character of a word 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 CapitalizeWordsOperation()
-
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 words.-
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 words.- 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()
-
-