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.

VDropHandler.java 2.3KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. /*
  2. @VaadinApache2LicenseForJavaFiles@
  3. */
  4. package com.vaadin.terminal.gwt.client.ui.dd;
  5. import com.vaadin.terminal.gwt.client.ApplicationConnection;
  6. import com.vaadin.terminal.gwt.client.VPaintableWidget;
  7. /**
  8. * Vaadin Widgets that want to receive something via drag and drop implement
  9. * this interface.
  10. */
  11. public interface VDropHandler {
  12. /**
  13. * Called by DragAndDropManager when a drag operation is in progress and the
  14. * cursor enters the area occupied by this Paintable.
  15. *
  16. * @param dragEvent
  17. * DragEvent which contains the transferable and other
  18. * information for the operation
  19. */
  20. public void dragEnter(VDragEvent dragEvent);
  21. /**
  22. * Called by DragAndDropManager when a drag operation is in progress and the
  23. * cursor leaves the area occupied by this Paintable.
  24. *
  25. * @param dragEvent
  26. * DragEvent which contains the transferable and other
  27. * information for the operation
  28. */
  29. public void dragLeave(VDragEvent dragEvent);
  30. /**
  31. * Called by DragAndDropManager when a drag operation was in progress and a
  32. * drop was performed on this Paintable.
  33. *
  34. *
  35. * @param dragEvent
  36. * DragEvent which contains the transferable and other
  37. * information for the operation
  38. *
  39. * @return true if the Tranferrable of this drag event needs to be sent to
  40. * the server, false if drop is rejected or no server side event
  41. * should be sent
  42. */
  43. public boolean drop(VDragEvent drag);
  44. /**
  45. * When drag is over current drag handler.
  46. *
  47. * With drag implementation by {@link VDragAndDropManager} will be called
  48. * when mouse is moved. HTML5 implementations call this continuously even
  49. * though mouse is not moved.
  50. *
  51. * @param currentDrag
  52. */
  53. public void dragOver(VDragEvent currentDrag);
  54. /**
  55. * Returns the Paintable into which this DragHandler is associated
  56. */
  57. public VPaintableWidget getPaintable();
  58. /**
  59. * Returns the application connection to which this {@link VDropHandler}
  60. * belongs to. DragAndDropManager uses this fucction to send Transferable to
  61. * server side.
  62. */
  63. public ApplicationConnection getApplicationConnection();
  64. }