public class EditorCopyPasteHelperImpl extends EditorCopyPasteHelper
EditorCopyPasteHelper.TooLargeContentException
TRIM_TEXT_ON_PASTE_KEY
Constructor and Description |
---|
EditorCopyPasteHelperImpl() |
Modifier and Type | Method and Description |
---|---|
void |
copySelectionToClipboard(Editor editor)
Copies text selected in editor to clipboard.
|
static java.lang.String |
getSelectedTextForClipboard(Editor editor,
java.util.Collection<? super TextBlockTransferableData> extraDataCollector) |
TextRange [] |
pasteFromClipboard(Editor editor)
Pastes from clipboard into editor at caret(s) position.
|
TextRange [] |
pasteTransferable(Editor editor,
java.awt.datatransfer.Transferable content)
Pastes given Transferable instance into editor at caret(s) position.
|
getInstance
public void copySelectionToClipboard(Editor editor)
EditorCopyPasteHelper
copySelectionToClipboard
in class EditorCopyPasteHelper
public static java.lang.String getSelectedTextForClipboard(Editor editor, java.util.Collection<? super TextBlockTransferableData> extraDataCollector)
public TextRange [] pasteFromClipboard(Editor editor) throws EditorCopyPasteHelper.TooLargeContentException
EditorCopyPasteHelper
pasteFromClipboard
in class EditorCopyPasteHelper
null
otherwiseEditorCopyPasteHelper.TooLargeContentException
- if content is too large to be pasted in editorpublic TextRange [] pasteTransferable(Editor editor, java.awt.datatransfer.Transferable content) throws EditorCopyPasteHelper.TooLargeContentException
EditorCopyPasteHelper
pasteTransferable
in class EditorCopyPasteHelper
null
otherwiseEditorCopyPasteHelper.TooLargeContentException
- if content is too large to be pasted in editor