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.

GridConstants.java 2.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  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.grid;
  17. import java.io.Serializable;
  18. /**
  19. * Container class for common constants and default values used by the Grid
  20. * component.
  21. *
  22. * @since 7.4
  23. * @author Vaadin Ltd
  24. */
  25. public final class GridConstants implements Serializable {
  26. /**
  27. * Enum describing different sections of Grid.
  28. *
  29. * @since 7.6
  30. */
  31. public enum Section {
  32. HEADER, BODY, FOOTER
  33. }
  34. /**
  35. * Default padding in pixels when scrolling programmatically, without an
  36. * explicitly defined padding value.
  37. */
  38. public static final int DEFAULT_PADDING = 0;
  39. /**
  40. * Delay before a long tap action is triggered. Number in milliseconds.
  41. */
  42. public static final int LONG_TAP_DELAY = 500;
  43. /**
  44. * The threshold in pixels a finger can move while long tapping.
  45. */
  46. public static final int LONG_TAP_THRESHOLD = 3;
  47. /* Column constants */
  48. /**
  49. * Default maximum width for columns.
  50. */
  51. public static final double DEFAULT_MAX_WIDTH = -1;
  52. /**
  53. * Default minimum width for columns.
  54. */
  55. public static final double DEFAULT_MIN_WIDTH = 10.0d;
  56. /**
  57. * Default expand ratio for columns.
  58. */
  59. public static final int DEFAULT_EXPAND_RATIO = -1;
  60. /**
  61. * Default width for columns.
  62. */
  63. public static final double DEFAULT_COLUMN_WIDTH_PX = -1;
  64. /**
  65. * Event ID for item click events
  66. */
  67. public static final String ITEM_CLICK_EVENT_ID = "itemClick";
  68. /** The default save button caption in the editor */
  69. public static final String DEFAULT_SAVE_CAPTION = "Save";
  70. /** The default cancel button caption in the editor */
  71. public static final String DEFAULT_CANCEL_CAPTION = "Cancel";
  72. /**
  73. * Event ID constant for editor open event
  74. */
  75. public static final String EDITOR_OPEN_EVENT_ID = "editorOpen";
  76. /**
  77. * Event ID constant for editor move event
  78. */
  79. public static final String EDITOR_MOVE_EVENT_ID = "editorMove";
  80. /**
  81. * Event ID constant for editor close event
  82. */
  83. public static final String EDITOR_CLOSE_EVENT_ID = "editorClose";
  84. }