|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.swing.TransferHandler javax.swing.plaf.basic.BasicTextUI.TextTransferHandler
Nested Class Summary | |
(package private) static class |
BasicTextUI.TextTransferHandler.TextTransferable
A possible implementation of the Transferable interface for text components. |
Nested classes inherited from class javax.swing.TransferHandler |
|
Field Summary | |
private JTextComponent |
exportComp
|
private int |
p0
|
private int |
p1
|
private boolean |
shouldRemove
|
Fields inherited from class javax.swing.TransferHandler |
COPY, COPY_OR_MOVE, MOVE, NONE |
Constructor Summary | |
(package private) |
BasicTextUI.TextTransferHandler()
|
Method Summary | |
boolean |
canImport(JComponent comp,
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 Transferable |
createTransferable(JComponent comp)
Create a Transferable to use as the source for a data transfer. |
protected void |
exportDone(JComponent source,
Transferable data,
int action)
This method is called after data has been exported. |
protected DataFlavor |
getImportFlavor(DataFlavor[] flavors,
JTextComponent c)
Try to find a flavor that can be used to import a Transferable. |
int |
getSourceActions(JComponent c)
This is the type of transfer actions supported by the source. |
protected void |
handleReaderImport(Reader in,
JTextComponent c,
boolean useRead)
Import the given stream data into the text component. |
boolean |
importData(JComponent comp,
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 |
exportAsDrag, exportToClipboard, getCopyAction, getCutAction, getPasteAction, getVisualRepresentation |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private JTextComponent exportComp
private boolean shouldRemove
private int p0
private int p1
Constructor Detail |
BasicTextUI.TextTransferHandler()
Method Detail |
protected DataFlavor getImportFlavor(DataFlavor[] flavors, JTextComponent c)
protected void handleReaderImport(Reader in, JTextComponent c, boolean useRead) throws BadLocationException, IOException
BadLocationException
IOException
public int getSourceActions(JComponent c)
getSourceActions
in class TransferHandler
c
- The component holding the data to be transfered. This
argument is provided to enable sharing of TransferHandlers by
multiple components.
protected Transferable createTransferable(JComponent comp)
createTransferable
in class 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(JComponent source, Transferable data, int action)
exportDone
in class 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(JComponent comp, Transferable t)
importData
in class 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(JComponent comp, DataFlavor[] flavors)
canImport
in class 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 |