站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > NetBeans API Javadoc 5.5.1

NodeTransfer.Paste (NetBeans Nodes API) - NetBeans API Javadoc 5.5.1

org.openide.nodes 6.7.31

org.openide.nodes
Interface NodeTransfer.Paste

Enclosing class:
NodeTransfer

public static interface NodeTransfer.Paste

An intelligent source of paste types (ways how to paste) for a target node.

Each node should check for this type in a paste operation to allow anyone to insert something into it.

Sample example of implementation of Node.getPasteTypes(java.awt.datatransfer.Transferable):

   public PasteType[] getPasteTypes (Transferable t) {
     NodeTransfer.Paste p = (NodeTransfer.Paste)t.getTransferData (
       NodeTransfer.nodePasteFlavor
     );
     return p.types (this);
   }
 


Method Summary
 PasteType[] types(Node target)
          Method that checks the type of target node and can decide which paste types it supports.
 

Method Detail

types

PasteType[] types(Node target)
Method that checks the type of target node and can decide which paste types it supports.

Parameters:
target - the target node
Returns:
array of paste types that are valid for such a target node

org.openide.nodes 6.7.31

Built on March 26 2007.  |  Portions Copyright 1997-2005 Sun Microsystems, Inc. All rights reserved.