com.vaadin.event.dd.acceptcriteria
Class SourceIsTarget

java.lang.Object
  extended by com.vaadin.event.dd.acceptcriteria.ClientSideCriterion
      extended by com.vaadin.event.dd.acceptcriteria.SourceIsTarget
All Implemented Interfaces:
AcceptCriterion, Serializable

public class SourceIsTarget
extends ClientSideCriterion

A criterion that ensures the drag source is the same as drop target. Eg. Tree or Table could support only re-ordering of items, but no Transferables coming outside.

Note! Class is singleton, use get() method to get the instance.

Since:
6.3
See Also:
Serialized Form

Method Summary
 boolean accept(DragAndDropEvent dragEvent)
          Validates the data in event to be appropriate for the DropHandler.drop(DragAndDropEvent) method.
static SourceIsTarget get()
           
 
Methods inherited from class com.vaadin.event.dd.acceptcriteria.ClientSideCriterion
getIdentifier, isClientSideVerifiable, paint, paintContent, paintResponse
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

accept

public boolean accept(DragAndDropEvent dragEvent)
Description copied from interface: AcceptCriterion
Validates the data in event to be appropriate for the DropHandler.drop(DragAndDropEvent) method.

Note that even if your criterion is validated on client side, you should always validate the data on server side too.

Returns:

get

public static SourceIsTarget get()


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