|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgraphics.clipboard.ClipBoardUtils
public class ClipBoardUtils
Nested Class Summary | |
---|---|
static class |
ClipBoardUtils.ClipboardAction
|
Constructor Summary | |
---|---|
ClipBoardUtils()
|
Method Summary | |
---|---|
static void |
captureScreen()
|
static void |
convertClipboardToRtf()
|
static void |
copyImageAndTextToClipboardAsRtf(java.awt.image.BufferedImage image,
java.lang.String caption)
This will copy, using RTF, to the clipboard. |
static void |
copyToClipboardAsRtf(java.awt.Rectangle r)
|
static java.io.Reader |
createClipboardReader()
|
static java.io.Writer |
createClipboardWriter()
|
static java.awt.Image |
getClipBoardImage()
|
static java.lang.Object |
getJPeg(java.awt.Rectangle screenRect)
|
static java.lang.String |
getTextFromClipboard()
|
static java.awt.datatransfer.DataFlavor[] |
getTransferDataFlavors()
|
static boolean |
isContentAvailable()
|
static void |
main(java.lang.String[] args)
|
static void |
saveTextToClipboard(java.lang.String data)
|
static boolean |
setContents(java.awt.Image image,
java.awt.datatransfer.ClipboardOwner owner)
Sets the current contents of the clipboard to the specified image and registers the specified clipboard owner as the owner of the new contents |
static boolean |
setContents(javax.swing.JComponent c,
java.awt.datatransfer.ClipboardOwner owner)
|
static boolean |
setContents(java.lang.String content,
java.awt.datatransfer.ClipboardOwner owner)
Sets the current contents of the clipboard to the specified StringBuffer and registers the specified clipboard owner as the owner of the new contents |
static boolean |
setContents(java.awt.datatransfer.Transferable contents,
java.awt.datatransfer.ClipboardOwner owner)
Sets the current contents of the clipboard to the specified transferable object and registers the specified clipboard owner as the owner of the new contents. |
static boolean |
setImageContents(java.awt.Component comp,
java.awt.datatransfer.ClipboardOwner owner)
Sets the current contents of the clipboard to an graphical image of the component and registers the specified clipboard owner as the owner of the new contents This method isn't just called setContents(Component comp, ClipboardOwner owner) because Components might implement the Transferable Interface themselves which would lead to confusion with the setContents(Transferable trans,ClipboardOwner owner)-method. |
static void |
setRtfContents(java.io.ByteArrayOutputStream baos,
java.awt.datatransfer.ClipboardOwner owner)
Fills the clipboard with a RTF-Transferable. |
static void |
transparentDialogToClipBoard()
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ClipBoardUtils()
Method Detail |
---|
public static void captureScreen()
public static void copyToClipboardAsRtf(java.awt.Rectangle r) throws java.awt.AWTException, java.io.IOException, com.lowagie.text.DocumentException
java.awt.AWTException
java.io.IOException
com.lowagie.text.DocumentException
public static java.lang.String getTextFromClipboard()
public static java.io.Reader createClipboardReader()
public static java.io.Writer createClipboardWriter()
public static boolean isContentAvailable()
public static void saveTextToClipboard(java.lang.String data)
public static java.awt.Image getClipBoardImage() throws java.awt.datatransfer.UnsupportedFlavorException, java.io.IOException
java.awt.datatransfer.UnsupportedFlavorException
java.io.IOException
public static java.lang.Object getJPeg(java.awt.Rectangle screenRect) throws java.awt.AWTException, java.io.IOException
java.awt.AWTException
java.io.IOException
public static boolean setContents(java.lang.String content, java.awt.datatransfer.ClipboardOwner owner)
content
- a string to be placed on the clipboardowner
- a class
public static boolean setContents(java.awt.datatransfer.Transferable contents, java.awt.datatransfer.ClipboardOwner owner)
contents
- transferable contentsowner
- listener for lost ownership
public static boolean setContents(java.awt.Image image, java.awt.datatransfer.ClipboardOwner owner)
image
- owner
-
public static boolean setContents(javax.swing.JComponent c, java.awt.datatransfer.ClipboardOwner owner)
public static boolean setImageContents(java.awt.Component comp, java.awt.datatransfer.ClipboardOwner owner)
comp
-
public static void setRtfContents(java.io.ByteArrayOutputStream baos, java.awt.datatransfer.ClipboardOwner owner)
baos
- - an rtf in form of ByteArrayOutputStreampublic static void copyImageAndTextToClipboardAsRtf(java.awt.image.BufferedImage image, java.lang.String caption) throws java.io.IOException, com.lowagie.text.DocumentException
image
- The bufferedImage to be viewedcaption
- A plaintext caption that will apear under the image
java.io.IOException
com.lowagie.text.DocumentException
public static void convertClipboardToRtf() throws java.awt.datatransfer.UnsupportedFlavorException, java.io.IOException, com.lowagie.text.DocumentException
java.awt.datatransfer.UnsupportedFlavorException
java.io.IOException
com.lowagie.text.DocumentException
public static void transparentDialogToClipBoard()
public static java.awt.datatransfer.DataFlavor[] getTransferDataFlavors()
public static void main(java.lang.String[] args)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |