Package org.fife.ui.rsyntaxtextarea
Class StyledTextTransferable
java.lang.Object
org.fife.ui.rsyntaxtextarea.StyledTextTransferable
- All Implemented Interfaces:
Transferable
Object used during copy/paste and DnD operations to represent styled text.
It can return the text being moved as HTML, RTF or plain text. This
class is basically the same as
java.awt.datatransfer.StringSelection
, except that it can also
return the text in a couple of styled text formats.- Version:
- 1.0
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionStyledTextTransferable
(String plain, String html, byte[] rtfBytes) Constructor. -
Method Summary
Modifier and TypeMethodDescriptiongetTransferData
(DataFlavor flavor) boolean
isDataFlavorSupported
(DataFlavor flavor)
-
Field Details
-
plain
The transferred plain text. -
html
The transferred text, as HTML. -
rtfBytes
private byte[] rtfBytesThe RTF data, in bytes (the RTF is 7-bit ascii). -
FLAVORS
The "flavors" the text can be returned as.
-
-
Constructor Details
-
StyledTextTransferable
Constructor.- Parameters:
html
- The transferred text, as HTML.rtfBytes
- The transferred text, as RTF bytes.
-
-
Method Details
-
getTransferData
- Specified by:
getTransferData
in interfaceTransferable
- Throws:
UnsupportedFlavorException
IOException
-
getTransferDataFlavors
- Specified by:
getTransferDataFlavors
in interfaceTransferable
-
isDataFlavorSupported
- Specified by:
isDataFlavorSupported
in interfaceTransferable
-