java.lang.Object
com.flexstor.common.awt.TextClipboard
- All Implemented Interfaces:
- java.awt.datatransfer.ClipboardOwner
- public class TextClipboard
- extends java.lang.Object
- implements java.awt.datatransfer.ClipboardOwner
A basic clipboard implementation that
1. supports text only.
2. can use a local clipboard or the system clipboard.
- Version:
- 2.0
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
bIsOwner
private boolean bIsOwner
clipboard
private java.awt.datatransfer.Clipboard clipboard
DELIMIT
public static final java.lang.String DELIMIT
- See Also:
- Constant Field Values
cDELIMIT
public static final char cDELIMIT
- See Also:
- Constant Field Values
TextClipboard
public TextClipboard(java.lang.String sName)
- Creates a basic clipboard that supports text only.
If trying to access the system clipboard and it is inaccessable, due to an SecurityException, then a
local clipboard will be used instead.
lostOwnership
public void lostOwnership(java.awt.datatransfer.Clipboard clipboard,
java.awt.datatransfer.Transferable contents)
- Required by the ClipboardOwner interface. Called when another application/process
gains ownership of the clipboard.
- Specified by:
lostOwnership in interface java.awt.datatransfer.ClipboardOwner
hasOwnership
public boolean hasOwnership()
- Returns true if this instance has ownership of the clipboard.
copy
public void copy(java.lang.String sData)
- Copies sData to the clipboard.
paste
public java.lang.String paste()
- Copies data from the clipboard.