|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.swing.TransferHandler org.rosuda.JGR.toolkit.TextTransferHandler
public class TextTransferHandler
TextTransferHandler - copied out of the Java sources, because i need it as accessible class. RoSuDa 2003 - 2005
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.TransferHandler |
---|
javax.swing.TransferHandler.DropLocation, javax.swing.TransferHandler.TransferSupport |
Field Summary |
---|
Fields inherited from class javax.swing.TransferHandler |
---|
COPY, COPY_OR_MOVE, LINK, MOVE, NONE |
Constructor Summary | |
---|---|
TextTransferHandler()
|
Method Summary | |
---|---|
boolean |
canImport(javax.swing.JComponent comp,
java.awt.datatransfer.DataFlavor[] flavors)
This method indicates if a component would accept an import of the given set of data flavors prior to actually attempting to import it. |
protected java.awt.datatransfer.Transferable |
createTransferable(javax.swing.JComponent comp)
Create a Transferable to use as the source for a data transfer. |
protected void |
exportDone(javax.swing.JComponent source,
java.awt.datatransfer.Transferable data,
int action)
This method is called after data has been exported. |
protected java.awt.datatransfer.DataFlavor |
getImportFlavor(java.awt.datatransfer.DataFlavor[] flavors,
javax.swing.text.JTextComponent c)
Try to find a flavor that can be used to import a Transferable. |
int |
getSourceActions(javax.swing.JComponent c)
This is the type of transfer actions supported by the source. |
protected void |
handleReaderImport(java.io.Reader in,
javax.swing.text.JTextComponent c,
boolean useRead)
Import the given stream data into the text component. |
boolean |
importData(javax.swing.JComponent comp,
java.awt.datatransfer.Transferable t)
This method causes a transfer to a component from a clipboard or a DND drop operation. |
Methods inherited from class javax.swing.TransferHandler |
---|
canImport, exportAsDrag, exportToClipboard, getCopyAction, getCutAction, getPasteAction, getVisualRepresentation, importData |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TextTransferHandler()
Method Detail |
---|
protected java.awt.datatransfer.DataFlavor getImportFlavor(java.awt.datatransfer.DataFlavor[] flavors, javax.swing.text.JTextComponent c)
protected void handleReaderImport(java.io.Reader in, javax.swing.text.JTextComponent c, boolean useRead) throws javax.swing.text.BadLocationException, java.io.IOException
javax.swing.text.BadLocationException
java.io.IOException
public int getSourceActions(javax.swing.JComponent c)
getSourceActions
in class javax.swing.TransferHandler
c
- The component holding the data to be transfered. This argument
is provided to enable sharing of TransferHandlers by multiple
components.
protected java.awt.datatransfer.Transferable createTransferable(javax.swing.JComponent comp)
createTransferable
in class javax.swing.TransferHandler
comp
- The component holding the data to be transfered. This argument
is provided to enable sharing of TransferHandlers by multiple
components.
protected void exportDone(javax.swing.JComponent source, java.awt.datatransfer.Transferable data, int action)
exportDone
in class javax.swing.TransferHandler
source
- The component that was the source of the data.data
- The data that was transferred or possibly null if the action
is NONE
.action
- The actual action that was performed.public boolean importData(javax.swing.JComponent comp, java.awt.datatransfer.Transferable t)
importData
in class javax.swing.TransferHandler
comp
- The component to receive the transfer. This argument is
provided to enable sharing of TransferHandlers by multiple
components.t
- The data to import
public boolean canImport(javax.swing.JComponent comp, java.awt.datatransfer.DataFlavor[] flavors)
canImport
in class javax.swing.TransferHandler
comp
- The component to receive the transfer. This argument is
provided to enable sharing of TransferHandlers by multiple
components.flavors
- The data formats available
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |