ro.sync.ecss.extensions.commons.operations.text
Class FormSelectedTextOperation
java.lang.Object
ro.sync.ecss.extensions.commons.operations.text.FormSelectedTextOperation
- All Implemented Interfaces:
- AuthorOperation, Extension
- Direct Known Subclasses:
- CapitalizeSentencesOperation, CapitalizeWordsOperation
@API(type=INTERNAL,
src=PUBLIC)
public abstract class FormSelectedTextOperation
- extends java.lang.Object
- implements AuthorOperation
The class provides form word and form sentence operations over a selected text.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FormSelectedTextOperation
public FormSelectedTextOperation()
getArguments
public ArgumentDescriptor[] getArguments()
- Specified by:
getArguments
in interface AuthorOperation
- Returns:
- An array of
ArgumentDescriptor
representing
the arguments this operation uses. - See Also:
AuthorOperation.getArguments()
isDelimiterBeforeTextNode
protected abstract boolean isDelimiterBeforeTextNode(AuthorAccess authorAccess,
int contentOffset)
throws javax.swing.text.BadLocationException,
AuthorOperationException
- Decides if there is a sentence delimiter before the text node.
- Parameters:
contentOffset
- The offset where search is started.authorAccess
-
- 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
isWordDelimiter
protected boolean isWordDelimiter(char ch)
- Decides if the character is a sentence delimiter or not.
- Parameters:
ch
- The character that must be evaluated.
- Returns:
true
if the character is a sentence delimiter or false
otherwise.
doOperation
public void doOperation(AuthorAccess authorAccess,
ArgumentsMap arguments)
throws AuthorOperationException
- Form sentences.
- Specified by:
doOperation
in interface AuthorOperation
- Parameters:
authorAccess
- The author access.
Provides access to specific informations and actions for
editor, document, workspace, tables, change tracking, utility a.s.o.arguments
- The map of arguments. All the arguments defined by method
AuthorOperation.getArguments()
must be present in the map of arguments.
- Throws:
AuthorOperationException
- Thrown when the operation fails.- See Also:
AuthorOperation.doOperation(ro.sync.ecss.extensions.api.AuthorAccess, ro.sync.ecss.extensions.api.ArgumentsMap)
processTextContent
protected abstract char[] processTextContent(char[] charArray,
boolean isDelimiterBefore)
- Process char array.
- Parameters:
charArray
- The character array that must be processed.isDelimiterBefore
- true
if we have a delimiter before the given char array,
false
otherwise.
© Copyright SyncRO Soft SRL 2002 - 2013. All rights reserved.