org.openide.util.datatransfer
Class PasteType

java.lang.Object
  extended by org.openide.util.datatransfer.PasteType
All Implemented Interfaces:
HelpCtx.Provider

public abstract class PasteType
extends java.lang.Object
implements HelpCtx.Provider

Clipboard operation providing one kind of paste action. Used by Node.getPasteTypes.

Author:
Petr Hamernik

Constructor Summary
PasteType()
           
 
Method Summary
 HelpCtx getHelpCtx()
          Help content for the action.
 java.lang.String getName()
          Display name for the paste action.
abstract  java.awt.datatransfer.Transferable paste()
          Perform the paste action.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PasteType

public PasteType()
Method Detail

getName

public java.lang.String getName()
Display name for the paste action. This should be presented as an item in a menu.

Returns:
the name of the action

getHelpCtx

public HelpCtx getHelpCtx()
Help content for the action.

Specified by:
getHelpCtx in interface HelpCtx.Provider
Returns:
the help context

paste

public abstract java.awt.datatransfer.Transferable paste()
                                                  throws java.io.IOException
Perform the paste action.

Returns:
transferable which should be inserted into the clipboard after the paste action. It can be null, meaning that the clipboard content is not affected. Use e.g. ExTransferable.EMPTY to clear it.
Throws:
java.io.IOException - if something fails