public abstract class EditorCopyPasteHelper
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
EditorCopyPasteHelper.TooLargeContentException |
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
TRIM_TEXT_ON_PASTE_KEY
Setup JTextComponent.getDocument().putProperty(TRIM_TEXT_ON_PASTE_KEY, Boolean.TRUE) to trim text that is being pasted
|
Constructor and Description |
---|
EditorCopyPasteHelper() |
Modifier and Type | Method and Description |
---|---|
abstract void |
copySelectionToClipboard(Editor editor)
Copies text selected in editor to clipboard.
|
static EditorCopyPasteHelper |
getInstance() |
abstract TextRange [] |
pasteFromClipboard(Editor editor)
Pastes from clipboard into editor at caret(s) position.
|
abstract TextRange [] |
pasteTransferable(Editor editor,
java.awt.datatransfer.Transferable content)
Pastes given Transferable instance into editor at caret(s) position.
|
public static final java.lang.String TRIM_TEXT_ON_PASTE_KEY
public static EditorCopyPasteHelper getInstance()
public abstract void copySelectionToClipboard(Editor editor)
public abstract TextRange [] pasteFromClipboard(Editor editor) throws EditorCopyPasteHelper.TooLargeContentException
null
otherwiseEditorCopyPasteHelper.TooLargeContentException
- if content is too large to be pasted in editorpublic abstract TextRange [] pasteTransferable(Editor editor, java.awt.datatransfer.Transferable content) throws EditorCopyPasteHelper.TooLargeContentException
null
otherwiseEditorCopyPasteHelper.TooLargeContentException
- if content is too large to be pasted in editor