com.vaadin.event.dd.acceptcriteria.


Class SourceIs

java.lang.Object
  com.vaadin.event.dd.acceptcriteria.ClientSideCriterion
      com.vaadin.event.dd.acceptcriteria.SourceIs

All Implemented Interfaces:

AcceptCriterion, Serializable

public class SourceIs
extends ClientSideCriterion

Client side criteria that checks if the drag source is one of the given components.

Since:

6.3

See Also:

Serialized Form

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

Constructor Detail

SourceIs

public SourceIs(Component... component)
Method Detail

paintContent

public void paintContent(PaintTarget target)
                  throws PaintException

Overrides:
paintContent in class ClientSideCriterion

Throws:
PaintException

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: