Class ClipboardContent
java.lang.Object
com.codename1.ui.ClipboardContent
- Direct Known Subclasses:
RichTextClipboardData
A set of alternative clipboard representations keyed by MIME type. A clipboard write should
normally include text/plain plus any richer formats it can provide. Clipboard readers negotiate
by inspecting #getMimeTypes() and requesting the representation they understand best.
Values are usually String or byte[]. Ports may support additional native value types, but must
retain the plain-text representation when one is supplied.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfindPreferredMimeType(String[] preferredMimeTypes) Returns the first available MIME type from the caller's preference list, or null.Returns the representation for a MIME type, or null when it isn't available.String[]Returns the available MIME types in preference order.Returns a string representation, or null when the value isn't a string.booleanhasMimeType(String mimeType) Returns true when this content includes the requested MIME type.Adds or replaces a representation.
-
Field Details
-
MIME_TEXT
- See Also:
-
MIME_HTML
- See Also:
-
MIME_RTF
- See Also:
-
MIME_MARKDOWN
- See Also:
-
MIME_ASCIIDOC
- See Also:
-
-
Constructor Details
-
ClipboardContent
public ClipboardContent()
-
-
Method Details
-
setData
Adds or replaces a representation. Passing null removes the MIME type. -
getData
-
getText
-
hasMimeType
Returns true when this content includes the requested MIME type. -
getMimeTypes
Returns the available MIME types in preference order. -
findPreferredMimeType
-