RTFTransfer provides a platform specific mechanism
for converting text in RTF format represented as a java String
to a platform specific representation of the data and vice versa.
An example of a java String containing RTF text is shown
below:
String rtfData = "{\\rtf1{\\colortbl;\\red255\\green0\\blue0;}\\uc1\\b\\i Hello World}";
Transfer
| Modifier and Type | Field and Description |
|---|---|
| private static RTFTransfer | |
| private static final String | |
| private static final int | |
| private static final String | |
| private static final String | |
| private static final int | |
| private static final int |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv boolean | |
| public static RTFTransfer | Returns: the singleton instance of the RTFTransfer classReturns the singleton instance of the RTFTransfer class. |
| protected int[] | getTypeIds()
Implements abstract org. |
| protected String[] | getTypeNames()
Implements abstract org. |
| public void | javaToNative(Object
a java object, TransferData String containing RTF textan empty transferData)TransferData object that will
be filled in on return with the platform specific format of the dataOverrides org. javaToNative converts RTF-formatted text
represented by a java String to a platform specific representation.
|
| public Object | Returns: a javaString containing RTF text if the conversion was successful;
otherwise nullthe platform specific representation of the data to be converted transferData)Overrides org. nativeToJava converts a platform specific
representation of RTF text to a java String.
|
| protected boolean | validate(Object
a java representation of the data to be converted object)Overrides org. |
| _instance | back to summary |
|---|---|
| private static RTFTransfer _instance | |
| APPLICATION_RTF | back to summary |
|---|---|
| private static final String APPLICATION_RTF | |
| APPLICATION_RTF_ID | back to summary |
|---|---|
| private static final int APPLICATION_RTF_ID | |
| TEXT_RTF | back to summary |
|---|---|
| private static final String TEXT_RTF | |
| TEXT_RTF2 | back to summary |
|---|---|
| private static final String TEXT_RTF2 | |
| TEXT_RTF2_ID | back to summary |
|---|---|
| private static final int TEXT_RTF2_ID | |
| TEXT_RTF_ID | back to summary |
|---|---|
| private static final int TEXT_RTF_ID | |
| RTFTransfer | back to summary |
|---|---|
| private RTFTransfer() | |
| checkRTF | back to summary |
|---|---|
| pack-priv boolean checkRTF(Object object) | |
| getInstance | back to summary |
|---|---|
| public static RTFTransfer getInstance() Returns the singleton instance of the RTFTransfer class.
| |
| getTypeIds | back to summary |
|---|---|
| protected int[] getTypeIds() Implements abstract org. Doc from org. Returns the platform specific ids of the data types that can be converted using this transfer agent.
| |
| getTypeNames | back to summary |
|---|---|
| protected String[] getTypeNames() Implements abstract org. Doc from org. Returns the platform specific names of the data types that can be converted using this transfer agent. | |
| javaToNative | back to summary |
|---|---|
| public void javaToNative(Object object, TransferData transferData) Overrides org. This implementation of
| |
| nativeToJava | back to summary |
|---|---|
| public Object nativeToJava(TransferData transferData) Overrides org. This implementation of
| |
| validate | back to summary |
|---|---|
| protected boolean validate(Object object) Overrides org. Doc from org. Test that the object is of the correct format for this Transfer class. | |