您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

DetailsGenerator.java 1.4KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. /*
  2. * Copyright 2000-2016 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.client.widget.grid;
  17. import com.google.gwt.user.client.ui.Widget;
  18. /**
  19. * A callback interface for generating details for a particular row in Grid.
  20. *
  21. * @since 7.5.0
  22. * @author Vaadin Ltd
  23. */
  24. public interface DetailsGenerator {
  25. /** A details generator that provides no details */
  26. public static final DetailsGenerator NULL = new DetailsGenerator() {
  27. @Override
  28. public Widget getDetails(int rowIndex) {
  29. return null;
  30. }
  31. };
  32. /**
  33. * This method is called for whenever a new details row needs to be
  34. * generated.
  35. *
  36. * @param rowIndex
  37. * the index of the row for which to generate details
  38. * @return the details for the given row, or <code>null</code> to leave the
  39. * details empty.
  40. */
  41. Widget getDetails(int rowIndex);
  42. }