oracle.jdeveloper.palette
Class DataTransferable
java.lang.Object
oracle.jdeveloper.palette.DataTransferable
- All Implemented Interfaces:
- PaletteTransferable, java.awt.datatransfer.Transferable
- public abstract class DataTransferable
- extends java.lang.Object
- implements PaletteTransferable
The DataTransferable
abstract class should be subclassed by any palette editor wishing to do drag and drop operations in the JSP Visual Editor. This allows for handling of drag and drop operations, as well as a simple "Click and Clack" operation as well.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DataTransferable
public DataTransferable()
setContext
public void setContext(Context context)
- Description copied from interface:
PaletteTransferable
- Set the current
Context
-
- Specified by:
setContext
in interface PaletteTransferable
-
- Parameters:
context
- the current context
getContext
public Context getContext()
setIsClicked
public void setIsClicked(boolean clicked)
- Description copied from interface:
PaletteTransferable
- A user may need to know if it the item is actually dragging or was clicked.
-
- Specified by:
setIsClicked
in interface PaletteTransferable
isClicked
public boolean isClicked()
getTransferDataFlavors
public java.awt.datatransfer.DataFlavor[] getTransferDataFlavors()
-
- Specified by:
getTransferDataFlavors
in interface java.awt.datatransfer.Transferable
isDataFlavorSupported
public boolean isDataFlavorSupported(java.awt.datatransfer.DataFlavor flavor)
-
- Specified by:
isDataFlavorSupported
in interface java.awt.datatransfer.Transferable
getOptionalTransferable
public java.awt.datatransfer.Transferable getOptionalTransferable()
- Description copied from interface:
PaletteTransferable
- Return your own optionalTransferable to handle right-click drags
-
- Specified by:
getOptionalTransferable
in interface PaletteTransferable
-
- Returns:
- optional
Transferable
getTransferData
public java.lang.Object getTransferData(java.awt.datatransfer.DataFlavor flavor)
throws java.awt.datatransfer.UnsupportedFlavorException,
java.io.IOException
-
- Specified by:
getTransferData
in interface java.awt.datatransfer.Transferable
-
- Throws:
java.awt.datatransfer.UnsupportedFlavorException
java.io.IOException
getTransferData
public abstract java.lang.String getTransferData()
- Return a String to be parsed and inserted into the Visual Editor.
-
- Returns:
Copyright © 1997, 2004, Oracle. All rights reserved.