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.

RichTextArea.java 996B

12345678910111213141516171819202122232425262728293031323334353637
  1. /*
  2. @ITMillApache2LicenseForJavaFiles@
  3. */
  4. package com.vaadin.ui;
  5. import com.vaadin.terminal.PaintException;
  6. import com.vaadin.terminal.PaintTarget;
  7. import com.vaadin.terminal.gwt.client.ui.richtextarea.VRichTextArea;
  8. /**
  9. * A simple RichTextArea to edit HTML format text.
  10. *
  11. * Note, that using {@link TextField#setMaxLength(int)} method in
  12. * {@link RichTextArea} may produce unexpected results as formatting is counted
  13. * into length of field.
  14. */
  15. @SuppressWarnings("serial")
  16. @ClientWidget(VRichTextArea.class)
  17. public class RichTextArea extends TextField {
  18. @Override
  19. public void paintContent(PaintTarget target) throws PaintException {
  20. target.addAttribute("richtext", true);
  21. super.paintContent(target);
  22. }
  23. /**
  24. * RichTextArea does not support input prompt.
  25. */
  26. @Override
  27. public void setInputPrompt(String inputPrompt) {
  28. throw new UnsupportedOperationException(
  29. "RichTextArea does not support inputPrompt");
  30. }
  31. }