public class CopyPasteManagerEx extends CopyPasteManager implements java.awt.datatransfer.ClipboardOwner
Transferable
instances passed to
setContents(Transferable)
should implement Sizeable
interface. See getSize(Transferable)
method for details on
estimating the size of Transferable
and deleteAfterAllowedMaximum()
method for history trimming logic.CopyPasteManager.ContentChangedListener
CUT_COLOR
Constructor and Description |
---|
CopyPasteManagerEx() |
Modifier and Type | Method and Description |
---|---|
void |
addContentChangedListener(CopyPasteManager.ContentChangedListener listener) |
void |
addContentChangedListener(CopyPasteManager.ContentChangedListener listener,
Disposable parentDisposable) |
boolean |
areDataFlavorsAvailable(java.awt.datatransfer.DataFlavor... flavors) |
java.awt.datatransfer.Transferable [] |
getAllContents() |
java.awt.datatransfer.Transferable |
getContents() |
<T> T |
getContents(java.awt.datatransfer.DataFlavor flavor) |
static CopyPasteManagerEx |
getInstanceEx() |
boolean |
isCutElement(java.lang.Object element) |
void |
lostOwnership(java.awt.datatransfer.Clipboard clipboard,
java.awt.datatransfer.Transferable contents) |
void |
moveContentToStackTop(java.awt.datatransfer.Transferable t) |
void |
removeContent(java.awt.datatransfer.Transferable t) |
void |
removeContentChangedListener(CopyPasteManager.ContentChangedListener listener) |
void |
setContents(java.awt.datatransfer.Transferable content) |
void |
stopKillRings()
We support 'kill rings' at the editor, i.e.
|
getInstance
public static CopyPasteManagerEx getInstanceEx()
public void lostOwnership(java.awt.datatransfer.Clipboard clipboard, java.awt.datatransfer.Transferable contents)
lostOwnership
in interface java.awt.datatransfer.ClipboardOwner
public void addContentChangedListener(CopyPasteManager.ContentChangedListener listener)
addContentChangedListener
in class CopyPasteManager
public void addContentChangedListener(CopyPasteManager.ContentChangedListener listener, Disposable parentDisposable)
addContentChangedListener
in class CopyPasteManager
public void removeContentChangedListener(CopyPasteManager.ContentChangedListener listener)
removeContentChangedListener
in class CopyPasteManager
public boolean areDataFlavorsAvailable(java.awt.datatransfer.DataFlavor... flavors)
areDataFlavorsAvailable
in class CopyPasteManager
public void setContents(java.awt.datatransfer.Transferable content)
setContents
in class CopyPasteManager
public boolean isCutElement(java.lang.Object element)
isCutElement
in class CopyPasteManager
public void stopKillRings()
CopyPasteManager
stopKillRings
in class CopyPasteManager
KillRingTransferable
public java.awt.datatransfer.Transferable getContents()
getContents
in class CopyPasteManager
public <T> T getContents(java.awt.datatransfer.DataFlavor flavor)
getContents
in class CopyPasteManager
public java.awt.datatransfer.Transferable [] getAllContents()
getAllContents
in class CopyPasteManager
public void removeContent(java.awt.datatransfer.Transferable t)
public void moveContentToStackTop(java.awt.datatransfer.Transferable t)