com.cleancode.util
Class TextClipboard

java.lang.Object
  extended by com.cleancode.util.TextClipboard

public final class TextClipboard
extends Object

Support for getting and setting text on the system clipboard.

Since:
CleanCode 0.9
Version:
$Revision: 9 $
Author:
Michael Sorens

Field Summary
static String VERSION
          Current version of this class.
 
Method Summary
static String getText()
          Gets the text on the system clipboard.
static void setText(String text)
          Sets the system clipboard to the specified text.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

VERSION

public static final String VERSION
Current version of this class.

Method Detail

setText

public static void setText(String text)
Sets the system clipboard to the specified text.

Parameters:
text - text to load into clipboard
See Also:
getText()

getText

public static String getText()
                      throws UnsupportedFlavorException,
                             IOException
Gets the text on the system clipboard.

Returns:
String representation of the clipboard text.
Throws:
UnsupportedFlavorException - if the clipboard does not contain text.
IOException - if I/O problem
See Also:
setText(java.lang.String)


CleanCode Java Libraries Copyright © 2001-2012 Michael Sorens - Revised 2012.12.10 Get CleanCode at SourceForge.net. Fast, secure and Free Open Source software downloads