Interface Engine
- All Superinterfaces:
Originator
- All Known Implementing Classes:
EngineImpl
Main API for the text editing engine
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Copies the text within the interval specified by the selection control object into the clipboard.void
Removes the text within the interval specified by the selection control object, from the buffer.void
delete()
Removes the contents of the selection in the bufferProvides the whole contents of the buffer, as a stringProvides the clipboard contentsProvides access to the selection control objectvoid
Inserts a string in the buffer, which replaces the contents of the selectionvoid
Replaces the text within the interval specified by the selection object with the contents of the clipboard.Methods inherited from interface fr.istic.aco.editor.core.Originator
getMemento, setMemento
-
Method Details
-
getSelection
Selection getSelection()Provides access to the selection control object- Returns:
- the selection object
-
getBufferContents
String getBufferContents()Provides the whole contents of the buffer, as a string- Returns:
- a copy of the buffer's contents
-
getClipboardContents
String getClipboardContents()Provides the clipboard contents- Returns:
- a copy of the clipboard's contents
-
cutSelectedText
void cutSelectedText()Removes the text within the interval specified by the selection control object, from the buffer. -
copySelectedText
void copySelectedText()Copies the text within the interval specified by the selection control object into the clipboard. -
pasteClipboard
void pasteClipboard()Replaces the text within the interval specified by the selection object with the contents of the clipboard. -
insert
Inserts a string in the buffer, which replaces the contents of the selection- Parameters:
s
- the text to insert
-
delete
void delete()Removes the contents of the selection in the buffer
-