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.

FooterCell.java 4.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163
  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.ui.components.grid;
  17. import java.io.Serializable;
  18. import com.vaadin.shared.ui.ContentMode;
  19. import com.vaadin.shared.ui.grid.GridStaticCellType;
  20. import com.vaadin.ui.Component;
  21. /**
  22. * An individual cell on a Grid footer row.
  23. *
  24. * @author Vaadin Ltd
  25. * @since 8.0
  26. */
  27. public interface FooterCell extends Serializable {
  28. /**
  29. * Returns the textual caption of this cell.
  30. *
  31. * @return the footer caption
  32. */
  33. public String getText();
  34. /**
  35. * Sets the textual caption of this cell.
  36. *
  37. * @param text
  38. * the footer caption to set, not null
  39. */
  40. public void setText(String text);
  41. /**
  42. * Returns the HTML content displayed in this cell.
  43. *
  44. * @return the html
  45. *
  46. */
  47. public String getHtml();
  48. /**
  49. * Sets the HTML content displayed in this cell.
  50. *
  51. * @param html
  52. * the html to set
  53. */
  54. public void setHtml(String html);
  55. /**
  56. * Returns the component displayed in this cell.
  57. *
  58. * @return the component
  59. */
  60. public Component getComponent();
  61. /**
  62. * Sets the component displayed in this cell.
  63. *
  64. * @param component
  65. * the component to set
  66. */
  67. public void setComponent(Component component);
  68. /**
  69. * Returns the type of content stored in this cell.
  70. *
  71. * @return cell content type
  72. */
  73. public GridStaticCellType getCellType();
  74. /**
  75. * Gets the column id where this cell is.
  76. *
  77. * @return column id for this cell
  78. */
  79. public String getColumnId();
  80. /**
  81. * Returns the custom style name for this cell.
  82. *
  83. * @return the style name or null if no style name has been set
  84. */
  85. public String getStyleName();
  86. /**
  87. * Sets a custom style name for this cell.
  88. *
  89. * @param styleName
  90. * the style name to set or null to not use any style name
  91. */
  92. public void setStyleName(String styleName);
  93. /**
  94. * Gets the tooltip for the cell.
  95. * <p>
  96. * The tooltip is shown in the mode returned by
  97. * {@link #getDescriptionContentMode()}.
  98. *
  99. * @return the tooltip text for this cell
  100. * @since 8.4
  101. */
  102. public String getDescription();
  103. /**
  104. * Sets the tooltip for the cell.
  105. * <p>
  106. * By default, tooltips are shown as plain text. For HTML tooltips, see
  107. * {@link #setDescription(String, ContentMode)} or
  108. * {@link #setDescriptionContentMode(ContentMode)}.
  109. *
  110. * @param description
  111. * the tooltip to show when hovering the cell
  112. * @since 8.4
  113. */
  114. public void setDescription(String description);
  115. /**
  116. * Sets the tooltip for the cell to be shown with the given content mode.
  117. *
  118. * @see ContentMode
  119. * @param description
  120. * the tooltip to show when hovering the cell
  121. * @param descriptionContentMode
  122. * the content mode to use for the tooltip (HTML or plain text)
  123. * @since 8.4
  124. */
  125. public void setDescription(String description,
  126. ContentMode descriptionContentMode);
  127. /**
  128. * Gets the content mode for the tooltip.
  129. *
  130. * @see ContentMode
  131. * @return the content mode for the tooltip
  132. * @since 8.4
  133. */
  134. public ContentMode getDescriptionContentMode();
  135. /**
  136. * Sets the content mode for the tooltip.
  137. *
  138. * @see ContentMode
  139. * @param descriptionContentMode
  140. * the content mode for the tooltip
  141. * @since 8.4
  142. */
  143. public void setDescriptionContentMode(ContentMode descriptionContentMode);
  144. }