Extension SDK 10.1.2

oracle.javatools.editor.plugins
Class DragDropPlugin.DragTransferable

java.lang.Object
  extended byoracle.javatools.editor.plugins.DragDropPlugin.DragTransferable
All Implemented Interfaces:
java.awt.datatransfer.Transferable
Enclosing class:
DragDropPlugin

protected class DragDropPlugin.DragTransferable
extends java.lang.Object
implements java.awt.datatransfer.Transferable

The DragTransferable class provides extra information like the editor and offset where the data comes from. This helps us if the drag-n-drop operation occurs within the SAME editor.


Constructor Summary
protected DragDropPlugin.DragTransferable()
          Construct a new transferable.
 
Method Summary
protected  BasicEditorPane getEditorPane()
          Fetch the editor pane that initiated the drag operation.
 java.lang.Object getTransferData(java.awt.datatransfer.DataFlavor flavor)
          Returns an object which represents the data to be transferred.
 java.awt.datatransfer.DataFlavor[] getTransferDataFlavors()
          Returns an array of DataFlavor objects indicating the flavors the data can be provided in.
 boolean isDataFlavorSupported(java.awt.datatransfer.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

DragDropPlugin.DragTransferable

protected DragDropPlugin.DragTransferable()
Construct a new transferable.

Method Detail

getTransferDataFlavors

public java.awt.datatransfer.DataFlavor[] getTransferDataFlavors()
Returns an array of DataFlavor objects indicating the flavors the data can be provided in.

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

isDataFlavorSupported

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

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

getTransferData

public java.lang.Object getTransferData(java.awt.datatransfer.DataFlavor flavor)
                                 throws java.awt.datatransfer.UnsupportedFlavorException
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 java.awt.datatransfer.Transferable
Parameters:
flavor - the requested flavor for the data
Throws:
java.awt.datatransfer.UnsupportedFlavorException - if the requested data flavor is not supported.

getEditorPane

protected BasicEditorPane getEditorPane()
Fetch the editor pane that initiated the drag operation.

Returns:
the editor that started the drag operation.

Extension SDK

 

Copyright © 1997, 2004, Oracle. All rights reserved.