| Modifier and Type | Field and Description |
|---|---|
| private static final WeakReferenceQueue | DATA_FORMAT_LIST
A static cache of all DataFormats created and currently in use. |
| private static final DataFormat | DRAG_IMAGE
Data format used internally, represents dragged image. |
| private static final DataFormat | DRAG_IMAGE_OFFSET
Data format used internally, represents offset in the dragged image. |
| public static final DataFormat | FILES
Represents a List of Files. |
| public static final DataFormat | HTML
Represents an HTML formatted string. |
| private final Set | identifier
A set of identifiers, typically mime types, for this DataFormat. |
| public static final DataFormat | IMAGE
A special platform specific image type, such as is commonly used on the clipboard and interoperates widely with other applications. |
| public static final DataFormat | PLAIN_TEXT
Represents a plain text string. |
| public static final DataFormat | RTF
Represents an RTF formatted string |
| public static final DataFormat | URL
Represents a URL, encoded as a String |
| Access | Constructor and Description |
|---|---|
| public | DataFormat(String...
The set of ids used to represent this DataFormat on the clipboard. ids)Create a new DataFormat, specifying the set of ids that are associated with this data format. |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | Returns: true if this object is equal to the obj argument; false otherwise.the reference object with which to compare. obj)Overrides java. Indicates whether some other object is "equal to" this one. |
| public final Set | Returns: an unmodifiable set that is never null.Gets the unmodifiable set of identifiers for this DataFormat. |
| public int | Returns: a hash code for thisDataFormat object.Overrides java. Returns a hash code for this |
| public static DataFormat | Returns: The matching DataFormatIf null or the empty string, then null is returned. mimeType)Looks for the DataFormat which has been previously created with the given mime type as one of its ids. |
| public String | Returns: a string representation of thisDataFormat object.Overrides java. Returns a string representation of this |
| DATA_FORMAT_LIST | back to summary |
|---|---|
| private static final WeakReferenceQueue<DataFormat> DATA_FORMAT_LIST A static cache of all DataFormats created and currently in use. This is needed by the underlying implementation, such that, given a mime type, we can determine the associated DataFormat. The OS level is going to supply us with a mime type (or other string based key), and we need to be able to map this back to the FX DataFormat. | |
| DRAG_IMAGE | back to summary |
|---|---|
| private static final DataFormat DRAG_IMAGE Data format used internally, represents dragged image. Making this a private field prevents user from creating this DataFormat and breaking our drag view implementation. | |
| DRAG_IMAGE_OFFSET | back to summary |
|---|---|
| private static final DataFormat DRAG_IMAGE_OFFSET Data format used internally, represents offset in the dragged image. Making this a private field prevents user from creating this DataFormat and breaking our drag view implementation. | |
| FILES | back to summary |
|---|---|
| public static final DataFormat FILES Represents a List of Files. | |
| HTML | back to summary |
|---|---|
| public static final DataFormat HTML Represents an HTML formatted string. | |
| identifier | back to summary |
|---|---|
| private final Set<String> identifier A set of identifiers, typically mime types, for this DataFormat. In most cases this will be a single String. | |
| IMAGE | back to summary |
|---|---|
| public static final DataFormat IMAGE A special platform specific image type, such as is commonly used on the clipboard and interoperates widely with other applications. For example, on Mac this might ultimately be a TIFF while on Windows it might be a DIB (device independent bitmap). | |
| PLAIN_TEXT | back to summary |
|---|---|
| public static final DataFormat PLAIN_TEXT Represents a plain text string. | |
| RTF | back to summary |
|---|---|
| public static final DataFormat RTF Represents an RTF formatted string | |
| URL | back to summary |
|---|---|
| public static final DataFormat URL Represents a URL, encoded as a String | |
| DataFormat | back to summary |
|---|---|
| public DataFormat(String... ids) Create a new DataFormat, specifying the set of ids that are associated with this data format. Typically the ids are one or more mime types. For each id, any data associated with this DataFormat will be registered on the clipboard. For example, suppose I had the following:
With the above code, if I were to look on the clipboard, I'd find the String "Hello"
listed both for "text/foo" and "text/bar" on the clipboard.
Note that the ids may be subject to platform restrictions in some cases.
For instance, Swing requires a mime type so if an
| |
| equals | back to summary |
|---|---|
| public boolean equals(Object obj) Overrides java. Indicates whether some other object is "equal to" this one. | |
| getIdentifiers | back to summary |
|---|---|
| public final Set Gets the unmodifiable set of identifiers for this DataFormat. | |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Returns a hash code for this
| |
| lookupMimeType | back to summary |
|---|---|
| public static DataFormat lookupMimeType(String mimeType) Looks for the DataFormat which has been previously created with the given mime type as one of its ids.
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Returns a string representation of this | |