com.notuvy.clip
Class ClipboardAccess
java.lang.Object
com.notuvy.clip.ClipboardAccess
- All Implemented Interfaces:
- ClipboardOwner
public abstract class ClipboardAccess
- extends Object
- implements ClipboardOwner
A utility that provides read/write access to the system Clipboard.
Notice that if this is loaded in a headless environment, then a stub implementation is
created. This should never be a problem because the only meaningful headless environment
where this will be used is the unit test framework.
This utility (and the system clipboard) is only meaningful in a graphical environment.
- Author:
- murali
Field Summary |
protected static org.apache.log4j.Logger |
LOG
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LOG
protected static final org.apache.log4j.Logger LOG
ClipboardAccess
public ClipboardAccess()
setDummy
protected static ValueHolder<String> setDummy()
- For unit tests.
- Returns:
- The internal string value holder that the tests can use to simulate system clipboard changes.
read
public static String read()
save
public static void save(String pString)
readText
public abstract String readText()
saveText
public abstract void saveText(String pString)
lostOwnership
public void lostOwnership(Clipboard pClipboard,
Transferable pTransferable)
- Specified by:
lostOwnership
in interface ClipboardOwner
main
public static void main(String[] args)
Copyright © 2013. All Rights Reserved.