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.

GridClientRpc.java 1.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  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.grid;
  17. import com.vaadin.shared.communication.ClientRpc;
  18. /**
  19. * Server-to-client RPC interface for the Grid component.
  20. *
  21. * @since 7.4
  22. * @author Vaadin Ltd
  23. */
  24. public interface GridClientRpc extends ClientRpc {
  25. /**
  26. * Command client Grid to scroll to a specific data row and its (optional)
  27. * details.
  28. *
  29. * @param row
  30. * zero-based row index. If the row index is below zero or above
  31. * the row count of the client-side data source, a client-side
  32. * exception will be triggered. Since this exception has no
  33. * handling by default, an out-of-bounds value will cause a
  34. * client-side crash.
  35. * @param destination
  36. * desired placement of scrolled-to row. See the documentation
  37. * for {@link ScrollDestination} for more information.
  38. */
  39. public void scrollToRow(int row, ScrollDestination destination);
  40. /**
  41. * Command client Grid to scroll to the first row.
  42. */
  43. public void scrollToStart();
  44. /**
  45. * Command client Grid to scroll to the last row.
  46. */
  47. public void scrollToEnd();
  48. /**
  49. * Command client Grid to recalculate column widths.
  50. *
  51. * @since 8.1.1
  52. */
  53. public void recalculateColumnWidths();
  54. }