org.devaki.nextobjects.workspace.models.graphics
Class ObjectSelection

java.lang.Object
  extended byorg.devaki.nextobjects.workspace.models.graphics.ObjectSelection
All Implemented Interfaces:
java.awt.datatransfer.Transferable

public class ObjectSelection
extends java.lang.Object
implements java.awt.datatransfer.Transferable

This class represent a group of selectioned objects This could be a string or a list of objects

Author:
eflorent

Field Summary
static java.awt.datatransfer.DataFlavor baseObjectFlavor
           
 
Constructor Summary
ObjectSelection(java.lang.String pString)
          Construct a selection
ObjectSelection(java.util.Vector pView)
          Construct a selection
 
Method Summary
 java.lang.Object getTransferData(java.awt.datatransfer.DataFlavor parFlavor)
          Get the data for a given dataflavor
 java.awt.datatransfer.DataFlavor[] getTransferDataFlavors()
          Get the supported flavors
 boolean isDataFlavorSupported(java.awt.datatransfer.DataFlavor parFlavor)
          Check if this dataflavor is supported
 void lostOwnership(java.awt.datatransfer.Clipboard parClipboard, java.awt.datatransfer.Transferable parTransferable)
          The clipboard lost ownership
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

baseObjectFlavor

public static java.awt.datatransfer.DataFlavor baseObjectFlavor
Constructor Detail

ObjectSelection

public ObjectSelection(java.util.Vector pView)
Construct a selection

Parameters:
pView - a vector of object views

ObjectSelection

public ObjectSelection(java.lang.String pString)
Construct a selection

Parameters:
pString - a String
Method Detail

getTransferDataFlavors

public java.awt.datatransfer.DataFlavor[] getTransferDataFlavors()
Get the supported flavors

Specified by:
getTransferDataFlavors in interface java.awt.datatransfer.Transferable
Returns:
supported dataflavors as an array

isDataFlavorSupported

public boolean isDataFlavorSupported(java.awt.datatransfer.DataFlavor parFlavor)
Check if this dataflavor is supported

Specified by:
isDataFlavorSupported in interface java.awt.datatransfer.Transferable
Parameters:
parFlavor - the flavor
Returns:
true if supported

getTransferData

public java.lang.Object getTransferData(java.awt.datatransfer.DataFlavor parFlavor)
                                 throws java.awt.datatransfer.UnsupportedFlavorException
Get the data for a given dataflavor

Specified by:
getTransferData in interface java.awt.datatransfer.Transferable
Parameters:
parFlavor - the dataflavor
Returns:
the object
Throws:
java.awt.datatransfer.UnsupportedFlavorException

lostOwnership

public void lostOwnership(java.awt.datatransfer.Clipboard parClipboard,
                          java.awt.datatransfer.Transferable parTransferable)
The clipboard lost ownership

Parameters:
parClipboard - the clipboard
parTransferable - the object


Copyright © 2002-2004 devaki.org. All Rights Reserved.