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.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    This method will be called by the InetHtmlTransferhandler before every file paste.
  • Field Details

  • Method Details

    • handlePaste

      boolean handlePaste(File file, 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 paste
      doc - The document where to paste
      Returns:
      has to return true, if the event was consumed