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) booleanisDataFlavorSupported(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:
getTransferDatain interfaceTransferable- Throws:
UnsupportedFlavorExceptionIOException
-
getTransferDataFlavors
- Specified by:
getTransferDataFlavorsin interfaceTransferable
-
isDataFlavorSupported
- Specified by:
isDataFlavorSupportedin interfaceTransferable
-