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.

ScrollDestination.java 1.7KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. /*
  2. * Copyright 2000-2022 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.v7.shared.ui.grid;
  17. /**
  18. * Enumeration, specifying the destinations that are supported when scrolling
  19. * rows or columns into view.
  20. *
  21. * @since 7.4
  22. * @author Vaadin Ltd
  23. */
  24. public enum ScrollDestination {
  25. /**
  26. * Scroll as little as possible to show the target element. If the element
  27. * fits into view, this works as START or END depending on the current
  28. * scroll position. If the element does not fit into view, this works as
  29. * START.
  30. */
  31. ANY,
  32. /**
  33. * Scrolls so that the element is shown at the start of the viewport. The
  34. * viewport will, however, not scroll beyond its contents.
  35. */
  36. START,
  37. /**
  38. * Scrolls so that the element is shown in the middle of the viewport. The
  39. * viewport will, however, not scroll beyond its contents, given more
  40. * elements than what the viewport is able to show at once. Under no
  41. * circumstances will the viewport scroll before its first element.
  42. */
  43. MIDDLE,
  44. /**
  45. * Scrolls so that the element is shown at the end of the viewport. The
  46. * viewport will, however, not scroll before its first element.
  47. */
  48. END
  49. }