public class ClipBoardManager
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
private class |
ClipBoardManager.AllPermissionSecuryManager
Default security manager that accept all.
|
Modifier and Type | Field and Description |
---|---|
static ClipBoardManager |
CLIP_BOARD
Clip board manager singleton
|
private java.awt.datatransfer.Clipboard |
clipboard
Clip bord link with
|
Modifier | Constructor and Description |
---|---|
private |
ClipBoardManager()
Constructs ClipBoardManager
|
Modifier and Type | Method and Description |
---|---|
private java.lang.String |
decodeByteBuffer(java.awt.datatransfer.DataFlavor dataFlavor)
Decode a content store in byte buffer in clip board to string
|
private java.lang.String |
decodeCharBuffer(java.awt.datatransfer.DataFlavor dataFlavor)
Decode a content store in char buffer in clip board to string
|
private java.lang.String |
decodeInputStream(java.awt.datatransfer.DataFlavor dataFlavor)
Decode a content store in input stream in clip board to string
|
private java.lang.String |
decodeReader(java.awt.datatransfer.DataFlavor dataFlavor)
Decode a content store in reader in clip board to string
|
boolean |
isFileListStore()
Indicates if clip board contains a file list
|
boolean |
isStringStore()
Indicates if clip board contains a string
|
java.util.List<java.io.File> |
obtainListOfFile()
Obtain list of file from clip board
|
java.lang.String |
obtainString()
Obtain the stored string in clip board
|
boolean |
storeFileList(java.io.File... files)
Store file list in clip board
|
boolean |
storeFileList(java.util.List<java.io.File> fileList)
Store a file list
|
void |
storeString(java.lang.String text)
Store string in clip board
|
public static final ClipBoardManager CLIP_BOARD
private java.awt.datatransfer.Clipboard clipboard
private java.lang.String decodeByteBuffer(java.awt.datatransfer.DataFlavor dataFlavor)
dataFlavor
- Nature of datanull
if decode failedprivate java.lang.String decodeCharBuffer(java.awt.datatransfer.DataFlavor dataFlavor)
dataFlavor
- Nature of datanull
if decode failedprivate java.lang.String decodeInputStream(java.awt.datatransfer.DataFlavor dataFlavor)
dataFlavor
- Nature of datanull
if decode failedprivate java.lang.String decodeReader(java.awt.datatransfer.DataFlavor dataFlavor)
dataFlavor
- Nature of datanull
if decode failedpublic boolean isFileListStore()
true
if clip board contains a file listpublic boolean isStringStore()
true
if clip board contains a stringpublic java.util.List<java.io.File> obtainListOfFile()
public java.lang.String obtainString()
null
if no string insidepublic boolean storeFileList(java.io.File... files)
files
- File list to storetrue
if store appendpublic boolean storeFileList(java.util.List<java.io.File> fileList)
fileList
- File listtrue
if store appendpublic void storeString(java.lang.String text)
text
- String to stroe