com.vaadin.event
Class DataBoundTransferable

java.lang.Object
  extended by com.vaadin.event.TransferableImpl
      extended by com.vaadin.event.DataBoundTransferable
All Implemented Interfaces:
Transferable, Serializable
Direct Known Subclasses:
Table.TableTransferable, Tree.TreeTransferable

public abstract class DataBoundTransferable
extends TransferableImpl

Parent class for Transferable implementations that have a Vaadin container as a data source. The transfer is associated with an item (identified by its Id) and optionally also a property identifier (e.g. a table column identifier when transferring a single table cell). The component must implement the interface Container.Viewer. In most cases, receivers of data transfers should depend on this class instead of its concrete subclasses.

Since:
6.3
See Also:
Serialized Form

Constructor Summary
DataBoundTransferable(Component sourceComponent, Map<String,Object> rawVariables)
           
 
Method Summary
abstract  Object getItemId()
          Returns the identifier of the item being transferred.
abstract  Object getPropertyId()
          Returns the optional property identifier that the transfer concerns.
 Container getSourceContainer()
          Returns the container data source from which the transfer occurs.
 
Methods inherited from class com.vaadin.event.TransferableImpl
getData, getDataFlavors, getSourceComponent, setData
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataBoundTransferable

public DataBoundTransferable(Component sourceComponent,
                             Map<String,Object> rawVariables)
Method Detail

getItemId

public abstract Object getItemId()
Returns the identifier of the item being transferred.

Returns:
item identifier

getPropertyId

public abstract Object getPropertyId()
Returns the optional property identifier that the transfer concerns. This can be e.g. the table column from which a drag operation originated.

Returns:
property identifier

getSourceContainer

public Container getSourceContainer()
Returns the container data source from which the transfer occurs. Container.Viewer.getContainerDataSource() is used to obtain the underlying container of the source component.

Returns:
Container


Copyright © 2000-2011 Vaadin Ltd. All Rights Reserved.