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.8KB

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