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.

ValueChangeMode.java 1.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. /*
  2. * Copyright 2000-2014 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.textfield;
  17. /**
  18. * Different modes for when and how often field value changes are transmitted
  19. * from the client to the server.
  20. */
  21. public enum ValueChangeMode {
  22. /**
  23. * Fires a server-side event when the field loses focus.
  24. */
  25. BLUR,
  26. /**
  27. * Fires a server-side event every time the client-side value changes. This
  28. * gives the least latency but may cause unnecessary traffic.
  29. */
  30. EAGER,
  31. /**
  32. * Fires a server-side event at defined intervals as long as the value
  33. * changes from one event to the next. For instance, you can use this mode
  34. * to transmit a snapshot of the contents of a text area every second as
  35. * long as the user keeps typing.
  36. */
  37. TIMEOUT,
  38. /**
  39. * On every user event, schedule a server-side event after a defined
  40. * interval, cancelling the currently-scheduled event if any. This is a good
  41. * choice if you want to, for instance, wait for a small break in the user's
  42. * typing before sending the event.
  43. */
  44. LAZY
  45. }