JAPI 0.9.0
Yet another Java API
API Documentation

net.sf.japi.swing.bookmarks
Class BookmarkTransferable

java.lang.Object
  extended by net.sf.japi.swing.bookmarks.BookmarkTransferable
All Implemented Interfaces:
Transferable

public class BookmarkTransferable
extends Object
implements Transferable

Class for transfering a bookmark through a clipboard or drag and drop.

Author:
Christian Hujer

Constructor Summary
BookmarkTransferable(BookmarkManager.Bookmark bookmark)
          Create a BookmarkTransferable.
 
Method Summary
static DataFlavor getBookmarkDataFlavor()
          Get the DataFlavor for Bookmarks.
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BookmarkTransferable

public BookmarkTransferable(BookmarkManager.Bookmark bookmark)
Create a BookmarkTransferable.

Parameters:
bookmark - Bookmark to transfer
Method Detail

getTransferData

public Object getTransferData(DataFlavor flavor)
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
See Also:
DataFlavor.getRepresentationClass()

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

getBookmarkDataFlavor

public static DataFlavor getBookmarkDataFlavor()
Get the DataFlavor for Bookmarks.

Returns:
DataFlavor for Bookmarks

JAPI
Yet another Java API
API Documentation

© 2005-2006 Christian Hujer. All rights reserved. See copyright