Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

DragStartListener.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.DragSourceExtension;
  21. import com.vaadin.util.ReflectTools;
  22. /**
  23. * Interface to be implemented when creating a dragstart listener on a drag
  24. * source for HTML5 drag and drop.
  25. *
  26. * @param <T>
  27. * Type of draggable component.
  28. * @author Vaadin Ltd
  29. * @see DragSourceExtension#addDragStartListener(DragStartListener)
  30. * @since 8.1
  31. */
  32. @FunctionalInterface
  33. public interface DragStartListener<T extends AbstractComponent>
  34. extends ConnectorEventListener {
  35. static final Method DRAGSTART_METHOD = ReflectTools
  36. .getMethod(DragStartListener.class);
  37. /**
  38. * Called when dragstart event is fired.
  39. *
  40. * @param event
  41. * Server side dragstart event.
  42. */
  43. void dragStart(DragStartEvent<T> event);
  44. }