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.

EffectAllowed.java 1.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. /*
  2. * Copyright 2000-2018 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.shared.ui.dnd;
  17. /**
  18. * Used to specify the effect that is allowed for a drag operation.
  19. *
  20. * @author Vaadin Ltd
  21. * @since 8.1
  22. */
  23. public enum EffectAllowed {
  24. /**
  25. * The item may not be dropped.
  26. */
  27. NONE("none"),
  28. /**
  29. * A copy of the source item may be made at the new location.
  30. */
  31. COPY("copy"),
  32. /**
  33. * An item may be moved to a new location.
  34. */
  35. MOVE("move"),
  36. /**
  37. * A link may be established to the source at the new location.
  38. */
  39. LINK("link"),
  40. /**
  41. * A copy or move operation is permitted.
  42. */
  43. COPY_MOVE("copyMove"),
  44. /**
  45. * A copy or link operation is permitted.
  46. */
  47. COPY_LINK("copyLink"),
  48. /**
  49. * A link or move operation is permitted.
  50. */
  51. LINK_MOVE("linkMove"),
  52. /**
  53. * All operations are permitted.
  54. */
  55. ALL("all"),
  56. /**
  57. * Default state, equivalent to ALL.
  58. */
  59. UNINITIALIZED("uninitialized");
  60. private final String value;
  61. EffectAllowed(String value) {
  62. this.value = value;
  63. }
  64. /**
  65. * Get the string value that is accepted by the client side drag event.
  66. *
  67. * @return String value accepted by the client side drag event.
  68. */
  69. public String getValue() {
  70. return value;
  71. }
  72. }