You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

VSourceIsSameAsTarget.java 578B

12345678910111213141516171819202122
  1. /*
  2. @ITMillApache2LicenseForJavaFiles@
  3. */
  4. /**
  5. *
  6. */
  7. package com.vaadin.terminal.gwt.client.ui.dd;
  8. import com.vaadin.terminal.gwt.client.Paintable;
  9. import com.vaadin.terminal.gwt.client.UIDL;
  10. final public class VSourceIsSameAsTarget extends VAcceptCriterion {
  11. @Override
  12. public boolean validates(VDragEvent drag, UIDL configuration) {
  13. Paintable dragSource = drag.getTransferable().getDragSource();
  14. Paintable paintable = VDragAndDropManager.get().getCurrentDropHandler()
  15. .getPaintable();
  16. return paintable == dragSource;
  17. }
  18. }