Class RTATextTransferHandler.TextTransferable
java.lang.Object
org.fife.ui.rtextarea.RTATextTransferHandler.TextTransferable
- All Implemented Interfaces:
Transferable
- Enclosing class:
RTATextTransferHandler
A possible implementation of the Transferable interface for RTextAreas.
- Version:
- 0.1
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate JTextComponentprivate Positionprivate Positionprotected Stringprivate static DataFlavor[]private static DataFlavor[] -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected StringFetch the data in a text/plain format.getTransferData(DataFlavor flavor) Returns an object which represents the data to be transferred.Returns an array of DataFlavor objects indicating the flavors the data can be provided in.booleanisDataFlavorSupported(DataFlavor flavor) Returns whether the specified data flavor is supported for this object.protected booleanisPlainFlavor(DataFlavor flavor) Returns whether the specified data flavor is a plain flavor that is supported.protected booleanShould the plain text flavors be offered? If so, the method getPlainData should be implemented to provide something reasonable.protected booleanisStringFlavor(DataFlavor flavor) Returns whether the specified data flavor is a String flavor that is supported.(package private) void
-
Field Details
-
p0
-
p1
-
c
-
plainData
-
stringFlavors
-
plainFlavors
-
-
Constructor Details
-
TextTransferable
TextTransferable(JTextComponent c, int start, int end)
-
-
Method Details
-
getPlainData
Fetch the data in a text/plain format. -
getTransferData
Returns an object which represents the data to be transferred. The class of the object returned is defined by the representation class of the flavor.- Specified by:
getTransferDatain interfaceTransferable- Parameters:
flavor- the requested flavor for the data- Throws:
UnsupportedFlavorException- if the requested data flavor is not supported.- See Also:
-
getTransferDataFlavors
Returns an array of DataFlavor objects indicating the flavors the data can be provided in. The array should be ordered according to preference for providing the data (from most richly descriptive to least descriptive).- Specified by:
getTransferDataFlavorsin interfaceTransferable- Returns:
- an array of data flavors in which this data can be transferred
-
isDataFlavorSupported
Returns whether the specified data flavor is supported for this object.- Specified by:
isDataFlavorSupportedin interfaceTransferable- Parameters:
flavor- the requested flavor for the data- Returns:
- boolean indicating whether the data flavor is supported
-
isPlainFlavor
Returns whether the specified data flavor is a plain flavor that is supported.- Parameters:
flavor- the requested flavor for the data- Returns:
- boolean indicating whether the data flavor is supported
-
isPlainSupported
protected boolean isPlainSupported()Should the plain text flavors be offered? If so, the method getPlainData should be implemented to provide something reasonable. -
isStringFlavor
Returns whether the specified data flavor is a String flavor that is supported.- Parameters:
flavor- the requested flavor for the data- Returns:
- boolean indicating whether the data flavor is supported
-
removeText
void removeText()
-