Oxygen XML Editor 14.2 Author API

ro.sync.ecss.extensions.commons.operations.text
Class CapitalizeSentencesOperation

java.lang.Object
  extended by ro.sync.ecss.extensions.commons.operations.text.FormSelectedTextOperation
      extended by 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
CapitalizeSentencesOperation()
           
 
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 ro.sync.ecss.extensions.commons.operations.text.FormSelectedTextOperation
doOperation, getArguments, isWordDelimiter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CapitalizeSentencesOperation

public CapitalizeSentencesOperation()
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 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()

Oxygen XML Editor 14.2 Author API

© Copyright SyncRO Soft SRL 2002 - 2013. All rights reserved.