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.

Scrollable.java 1.8KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. /*
  2. @VaadinApache2LicenseForJavaFiles@
  3. */
  4. package com.vaadin.terminal;
  5. import java.io.Serializable;
  6. /**
  7. * <p>
  8. * This interface is implemented by all visual objects that can be scrolled
  9. * programmatically from the server-side. The unit of scrolling is pixel.
  10. * </p>
  11. *
  12. * @author Vaadin Ltd.
  13. * @version
  14. * @VERSION@
  15. * @since 3.0
  16. */
  17. public interface Scrollable extends Serializable {
  18. /**
  19. * Gets scroll left offset.
  20. *
  21. * <p>
  22. * Scrolling offset is the number of pixels this scrollable has been
  23. * scrolled right.
  24. * </p>
  25. *
  26. * @return Horizontal scrolling position in pixels.
  27. */
  28. public int getScrollLeft();
  29. /**
  30. * Sets scroll left offset.
  31. *
  32. * <p>
  33. * Scrolling offset is the number of pixels this scrollable has been
  34. * scrolled right.
  35. * </p>
  36. *
  37. * @param scrollLeft
  38. * the xOffset.
  39. */
  40. public void setScrollLeft(int scrollLeft);
  41. /**
  42. * Gets scroll top offset.
  43. *
  44. * <p>
  45. * Scrolling offset is the number of pixels this scrollable has been
  46. * scrolled down.
  47. * </p>
  48. *
  49. * @return Vertical scrolling position in pixels.
  50. */
  51. public int getScrollTop();
  52. /**
  53. * Sets scroll top offset.
  54. *
  55. * <p>
  56. * Scrolling offset is the number of pixels this scrollable has been
  57. * scrolled down.
  58. * </p>
  59. *
  60. * <p>
  61. * The scrolling position is limited by the current height of the content
  62. * area. If the position is below the height, it is scrolled to the bottom.
  63. * However, if the same response also adds height to the content area,
  64. * scrolling to bottom only scrolls to the bottom of the previous content
  65. * area.
  66. * </p>
  67. *
  68. * @param scrollTop
  69. * the yOffset.
  70. */
  71. public void setScrollTop(int scrollTop);
  72. }