Home » openjdk-7 » javax » swing » plaf » basic » [javadoc | source]
javax.swing.plaf.basic
class: BasicTransferable [javadoc | source]
java.lang.Object
   javax.swing.plaf.basic.BasicTransferable

All Implemented Interfaces:
    Transferable, UIResource

Direct Known Subclasses:
    FileTransferable, TextTransferable

A transferable implementation for the default data transfer of some Swing components.
Field Summary
protected  String plainData     
protected  String htmlData     
Constructor:
 public BasicTransferable(String plainData,
    String htmlData) 
Method from javax.swing.plaf.basic.BasicTransferable Summary:
getHTMLData,   getPlainData,   getRicherData,   getRicherFlavors,   getTransferData,   getTransferDataFlavors,   isDataFlavorSupported,   isHTMLFlavor,   isHTMLSupported,   isPlainFlavor,   isPlainSupported,   isRicherFlavor,   isStringFlavor
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from javax.swing.plaf.basic.BasicTransferable Detail:
 protected String getHTMLData() 
    Fetch the data in a text/html format
 protected String getPlainData() 
    Fetch the data in a text/plain format.
 protected Object getRicherData(DataFlavor flavor) throws UnsupportedFlavorException 
 protected DataFlavor[] getRicherFlavors() 
    Some subclasses will have flavors that are more descriptive than HTML or plain text. If this method returns a non-null value, it will be placed at the start of the array of supported flavors.
 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.
 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).
 public boolean isDataFlavorSupported(DataFlavor flavor) 
    Returns whether or not the specified data flavor is supported for this object.
 protected boolean isHTMLFlavor(DataFlavor flavor) 
    Returns whether or not the specified data flavor is an HTML flavor that is supported.
 protected boolean isHTMLSupported() 
    Should the HTML flavors be offered? If so, the method getHTMLData should be implemented to provide something reasonable.
 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 isRicherFlavor(DataFlavor flavor) 
 protected boolean isStringFlavor(DataFlavor flavor) 
    Returns whether or not the specified data flavor is a String flavor that is supported.