org.netbeans.swing.outline 1.20

org.netbeans.swing.etable
Class ETableTransferable

java.lang.Object
  extended by org.netbeans.swing.etable.ETableTransferable
All Implemented Interfaces:
Transferable

public class ETableTransferable
extends Object
implements Transferable

Transferable for use with the ETable. This class is partial copy (with omission of the HTML transfers) of javax.swing.plaf.basic.BasicTransferable which is unfortunately not public.


Field Summary
protected  String plainData
          The data content of this transferable
 
Constructor Summary
ETableTransferable(String plainData)
          Create a new transferable.
 
Method Summary
protected  String getPlainData()
          Fetch the data in a text/plain format.
 Object getTransferData(DataFlavor flavor)
          Returns an object which represents the data to be transferred.
 DataFlavor[] getTransferDataFlavors()
          Returns an array of DataFlavor objects indicating the flavors the data can be provided in.
 boolean isDataFlavorSupported(DataFlavor flavor)
          Returns whether or not the specified data flavor is supported for this object.
protected  boolean isPlainFlavor(DataFlavor flavor)
          Returns whether or not the specified data flavor is an plain flavor that is supported.
protected  boolean isPlainSupported()
          Should the plain text flavors be offered? If so, the method getPlainData should be implemented to provide something reasonable.
protected  boolean isStringFlavor(DataFlavor flavor)
          Returns whether or not the specified data flavor is a String flavor that is supported.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

plainData

protected String plainData
The data content of this transferable

Constructor Detail

ETableTransferable

public ETableTransferable(String plainData)
Create a new transferable.

Parameters:
plainData - The data content of this transferable
Method Detail

getTransferDataFlavors

public DataFlavor[] getTransferDataFlavors()
Returns an array of DataFlavor objects indicating the flavors the data can be provided in. The array should be ordered according to preference for providing the data (from most richly descriptive to least descriptive).

Specified by:
getTransferDataFlavors in interface Transferable
Returns:
an array of data flavors in which this data can be transferred

isDataFlavorSupported

public boolean isDataFlavorSupported(DataFlavor flavor)
Returns whether or not the specified data flavor is supported for this object.

Specified by:
isDataFlavorSupported in interface Transferable
Parameters:
flavor - the requested flavor for the data
Returns:
boolean indicating whether or not the data flavor is supported

getTransferData

public Object getTransferData(DataFlavor flavor)
                       throws UnsupportedFlavorException,
                              IOException
Returns an object which represents the data to be transferred. The class of the object returned is defined by the representation class of the flavor.

Specified by:
getTransferData in interface Transferable
Parameters:
flavor - the requested flavor for the data
Throws:
IOException - if the data is no longer available in the requested flavor.
UnsupportedFlavorException - if the requested data flavor is not supported.
See Also:
DataFlavor.getRepresentationClass()

isPlainFlavor

protected boolean isPlainFlavor(DataFlavor flavor)
Returns whether or not the specified data flavor is an plain flavor that is supported.

Parameters:
flavor - the requested flavor for the data
Returns:
boolean indicating whether or not the data flavor is supported

isPlainSupported

protected boolean isPlainSupported()
Should the plain text flavors be offered? If so, the method getPlainData should be implemented to provide something reasonable.


getPlainData

protected String getPlainData()
Fetch the data in a text/plain format.


isStringFlavor

protected boolean isStringFlavor(DataFlavor flavor)
Returns whether or not the specified data flavor is a String flavor that is supported.

Parameters:
flavor - the requested flavor for the data
Returns:
boolean indicating whether or not the data flavor is supported

org.netbeans.swing.outline 1.20

Built on May 25 2012.  |  Portions Copyright 1997-2012 Oracle. All rights reserved.