Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

DropListener.java 1.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /*
  2. * Copyright 2000-2016 Vaadin Ltd.
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License"); you may not
  5. * use this file except in compliance with the License. You may obtain a copy of
  6. * the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
  12. * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
  13. * License for the specific language governing permissions and limitations under
  14. * the License.
  15. */
  16. package com.vaadin.ui.dnd.event;
  17. import java.lang.reflect.Method;
  18. import com.vaadin.event.ConnectorEventListener;
  19. import com.vaadin.ui.AbstractComponent;
  20. import com.vaadin.ui.dnd.DropTargetExtension;
  21. import com.vaadin.util.ReflectTools;
  22. /**
  23. * Interface to be implemented when creating a drop listener on a drop target
  24. * for HTML5 drag and drop.
  25. *
  26. * @param <T>
  27. * Type of the drop target component.
  28. * @author Vaadin Ltd
  29. * @see DropTargetExtension#addDropListener(DropListener)
  30. * @since 8.1
  31. */
  32. @FunctionalInterface
  33. public interface DropListener<T extends AbstractComponent>
  34. extends ConnectorEventListener {
  35. static final Method DROP_METHOD = ReflectTools
  36. .getMethod(DropListener.class);
  37. /**
  38. * Called when drop event is fired.
  39. *
  40. * @param event
  41. * Server side drop event.
  42. */
  43. void drop(DropEvent<T> event);
  44. }