com.inet.html.handler
Interface PasteFileHandler
public interface PasteFileHandler
This interface may be used to change the paste-file behavior of the InetHtmlDocument/Views. To
install this handler add an implementation of this interface to client property of the
JEditorPane where you want to use it. The key of the property has to be PASTE_HANDLER_KEY
The handler will be called before every file paste.
Method Summary |
boolean |
handlePaste(java.io.File file,
javax.swing.text.Document doc)
This method will be called by the InetHtmlTransferhandler before every file paste. |
PASTE_HANDLER_KEY
static final java.lang.String PASTE_HANDLER_KEY
- See Also:
- Constant Field Values
handlePaste
boolean handlePaste(java.io.File file,
javax.swing.text.Document doc)
- This method will be called by the InetHtmlTransferhandler before every file paste.
If it returns true, the TransferHandler will abort it's own paste method for this file.
Note: If this method crashed for any reason, this error will be caught and the default
paste method will be executed.
- Parameters:
file
- The file to pastedoc
- The document where to paste
- Returns:
- has to return true, if the event was consumed