- All Implemented Interfaces:
- Serializable,- Cloneable,- Map<DataFormat,- Object> 
Data container for 
Clipboard data. It can hold multiple data in
 several data formats.- Since:
- JavaFX 2.0
- See Also:
- 
Nested Class SummaryNested classes/interfaces declared in class java.util.AbstractMapAbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K, V> 
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptiongetFiles()Gets the List of Files from theClipboardContentwhich had previously been put.final StringgetHtml()Gets the HTML String from theClipboardContentwhich had previously been put.final ImagegetImage()Gets the Image from theClipboardContentwhich had previously been put.final StringgetRtf()Gets the RTF String from theClipboardContentwhich had previously been put.final StringGets the plain text String from theClipboardContentwhich had previously been put.final StringgetUrl()Gets the URL String from theClipboardContentwhich had previously been put.final booleanhasFiles()Gets whether a List of Files (DataFormat.FILES) has been put to thisClipboardContent.final booleanhasHtml()Gets whether an HTML String (DataFormat.HTML) has been put to thisClipboardContent.final booleanhasImage()Gets whether an Image (DataFormat.IMAGE) has been put to thisClipboardContent.final booleanhasRtf()Gets whether a RTF String (DataFormat.RTF) has been put to thisClipboardContent.final booleanGets whether a plain text String (DataFormat.PLAIN_TEXT) has been put to thisClipboardContent.final booleanhasUrl()Gets whether a URL String (DataFormat.URL) has been put to thisClipboardContent.final booleanPuts a List of Files into theClipboardContent.final booleanputFilesByPath(List<String> filePaths) Puts a List of Files into theClipboardContent, based on the file path.final booleanPuts an HTML String into theClipboardContent.final booleanPuts an Image into theClipboardContent.final booleanPuts a RTF String into theClipboardContent.final booleanPuts a plain text String into theClipboardContent.final booleanPuts a URL String into theClipboardContent.Methods declared in class java.util.HashMapclear, clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, get, getOrDefault, isEmpty, keySet, merge, newHashMap, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, valuesMethods declared in class java.util.AbstractMapequals, hashCode, toString
- 
Constructor Details- 
ClipboardContentpublic ClipboardContent()Creates aClipboardContent.
 
- 
- 
Method Details- 
hasStringpublic final boolean hasString()Gets whether a plain text String (DataFormat.PLAIN_TEXT) has been put to thisClipboardContent.- Returns:
- true if containsKey(DataFormat.PLAIN_TEXT)returns true, false otherwise
 
- 
putStringPuts a plain text String into theClipboardContent. This is equivalent to invokingput(DataFormat.PLAIN_TEXT, s). Setting this value to null effectively clears it from theClipboardContent.- Parameters:
- s- The string to place. This may be null.
- Returns:
- always true (the string is always successfully put)
 
- 
getStringGets the plain text String from theClipboardContentwhich had previously been put. This is equivalent to invokingget(DataFormat.PLAIN_TEXT). If no such entry exists, null is returned.- Returns:
- The String in the ClipboardContentassociated withDataFormat.PLAIN_TEXT, or null if there is not one.
 
- 
hasUrlpublic final boolean hasUrl()Gets whether a URL String (DataFormat.URL) has been put to thisClipboardContent.- Returns:
- true if containsKey(DataFormat.URL)returns true, false otherwise
 
- 
putUrlPuts a URL String into theClipboardContent. This is equivalent to invokingput(DataFormat.URL, url). Setting this value to null effectively clears it from theClipboardContent.- Parameters:
- url- The string to place. This may be null.
- Returns:
- always true (the URL is always successfully put)
 
- 
getUrlGets the URL String from theClipboardContentwhich had previously been put. This is equivalent to invokingget(DataFormat.URL). If no such entry exists, null is returned.- Returns:
- The String in the ClipboardContentassociated withDataFormat.URL, or null if there is not one.
 
- 
hasHtmlpublic final boolean hasHtml()Gets whether an HTML String (DataFormat.HTML) has been put to thisClipboardContent.- Returns:
- true if containsKey(DataFormat.HTML)returns true, false otherwise
 
- 
putHtmlPuts an HTML String into theClipboardContent. This is equivalent to invokingput(DataFormat.HTML, html). Setting this value to null effectively clears it from theClipboardContent.- Parameters:
- html- The string to place. This may be null.
- Returns:
- always true (the HTML is always successfully put)
 
- 
getHtmlGets the HTML String from theClipboardContentwhich had previously been put. This is equivalent to invokingget(DataFormat.HTML). If no such entry exists, null is returned.- Returns:
- The String in the ClipboardContentassociated withDataFormat.HTML, or null if there is not one.
 
- 
hasRtfpublic final boolean hasRtf()Gets whether a RTF String (DataFormat.RTF) has been put to thisClipboardContent.- Returns:
- true if containsKey(DataFormat.RTF)returns true, false otherwise
 
- 
putRtfPuts a RTF String into theClipboardContent. This is equivalent to invokingput(DataFormat.RTF, rtf). Setting this value to null effectively clears it from theClipboardContent.- Parameters:
- rtf- The string to place. This may be null.
- Returns:
- always true (the RTF is always successfully put)
 
- 
getRtfGets the RTF String from theClipboardContentwhich had previously been put. This is equivalent to invokingget(DataFormat.RTF). If no such entry exists, null is returned.- Returns:
- The String in the ClipboardContentassociated withDataFormat.RTF, or null if there is not one.
 
- 
hasImagepublic final boolean hasImage()Gets whether an Image (DataFormat.IMAGE) has been put to thisClipboardContent.- Returns:
- true if containsKey(DataFormat.IMAGE)returns true, false otherwise
 
- 
putImagePuts an Image into theClipboardContent. This is equivalent to invokingput(DataFormat.IMAGE, i). Setting this value to null effectively clears it from theClipboardContent. When an image is placed on the clipboard in this manner, an operating system dependent image is loaded onto the clipboard (such as TIFF on Mac or DIB on Windows).- Parameters:
- i- The image to place. This may be null.
- Returns:
- always true (the image is always successfully put)
 
- 
getImageGets the Image from theClipboardContentwhich had previously been put. This is equivalent to invokingget(DataFormat.IMAGE). If no such entry exists, null is returned.- Returns:
- The Image in the ClipboardContentassociated withDataFormat.IMAGE, or null if there is not one.
 
- 
hasFilespublic final boolean hasFiles()Gets whether a List of Files (DataFormat.FILES) has been put to thisClipboardContent.- Returns:
- true if containsKey(DataFormat.FILES)returns true, false otherwise
 
- 
putFilesPuts a List of Files into theClipboardContent. This is equivalent to invokingput(DataFormat.FILES, files). Setting this value to null effectively clears it from theClipboardContent.- Parameters:
- files- The files to place. This may be null.
- Returns:
- always true (the files are always successfully put)
 
- 
putFilesByPathPuts a List of Files into theClipboardContent, based on the file path. This is simply a convenience method which constructs a List of Files and invokes theputFiles(java.util.List<java.io.File>)method.- Parameters:
- filePaths- The files to place. This may be null.
- Returns:
- always true (the files are always successfully put)
 
- 
getFilesGets the List of Files from theClipboardContentwhich had previously been put. This is equivalent to invokingget(DataFormat.FILES). If no such entry exists, null is returned.- Returns:
- The List of Files in the ClipboardContentassociated withDataFormat.FILES, or null if there is not one.
 
 
-