Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

TextRenderer.java 1.3KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  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.ui.renderers;
  17. import com.vaadin.ui.LegacyGrid.AbstractRenderer;
  18. /**
  19. * A renderer for presenting simple plain-text string values.
  20. *
  21. * @since 7.4
  22. * @author Vaadin Ltd
  23. */
  24. public class TextRenderer extends AbstractRenderer<String> {
  25. /**
  26. * Creates a new text renderer
  27. */
  28. public TextRenderer() {
  29. this("");
  30. }
  31. /**
  32. * Creates a new text renderer
  33. *
  34. * @param nullRepresentation
  35. * the textual representation of {@code null} value
  36. */
  37. public TextRenderer(String nullRepresentation) {
  38. super(String.class, nullRepresentation);
  39. }
  40. @Override
  41. public String getNullRepresentation() {
  42. return super.getNullRepresentation();
  43. }
  44. }