ro.sync.ecss.extensions.commons.operations.text
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.
Method Summary |
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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CapitalizeSentencesOperation
public CapitalizeSentencesOperation()
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 class FormSelectedTextOperation
contentOffset
- The offset where search is started.
- Returns:
true
if the there is a sentence delimiter before the text node or
false
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 class FormSelectedTextOperation
- 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()
© Copyright SyncRO Soft SRL 2002 - 2012.