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.

VSourceIsTarget.java 599B

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