Package org.faceless.pdf2.viewer2.util
Class RichTextTransferHandler.RichTransferable
- java.lang.Object
-
- org.faceless.pdf2.viewer2.util.RichTextTransferHandler.RichTransferable
-
- All Implemented Interfaces:
Transferable
- Enclosing class:
- RichTextTransferHandler
public static class RichTextTransferHandler.RichTransferable extends Object implements Transferable
Transferable class that can transfer Rich-Text as plain, RTF or HTML. Takes it's input from either a) A List of AttributedStrings, as supplied from TextSelection ranges b) A javax.swing.text.Document, as taken from a JTextComponent
-
-
Constructor Summary
Constructors Constructor Description RichTransferable(AttributedString string)
RichTransferable(Document doc, int start, int end)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
getTransferData(DataFlavor flavor)
DataFlavor[]
getTransferDataFlavors()
boolean
isDataFlavorSupported(DataFlavor flavor)
-
-
-
Constructor Detail
-
RichTransferable
public RichTransferable(AttributedString string)
-
RichTransferable
public RichTransferable(Document doc, int start, int end)
-
-
Method Detail
-
getTransferDataFlavors
public DataFlavor[] getTransferDataFlavors()
- Specified by:
getTransferDataFlavors
in interfaceTransferable
-
isDataFlavorSupported
public boolean isDataFlavorSupported(DataFlavor flavor)
- Specified by:
isDataFlavorSupported
in interfaceTransferable
-
getTransferData
public Object getTransferData(DataFlavor flavor) throws IOException
- Specified by:
getTransferData
in interfaceTransferable
- Throws:
IOException
-
-