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.

RichTextAreaCreateLink.java 1.0KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. package com.vaadin.tests.components.richtextarea;
  2. import com.vaadin.server.VaadinRequest;
  3. import com.vaadin.shared.ui.ContentMode;
  4. import com.vaadin.tests.components.AbstractTestUI;
  5. import com.vaadin.ui.Button;
  6. import com.vaadin.ui.Label;
  7. import com.vaadin.ui.RichTextArea;
  8. public class RichTextAreaCreateLink extends AbstractTestUI {
  9. @Override
  10. protected String getTestDescription() {
  11. return "Test the 'Create Link' button of a rich text area in supported browsers.";
  12. }
  13. @Override
  14. protected Integer getTicketNumber() {
  15. return 11888;
  16. }
  17. @Override
  18. protected void setup(VaadinRequest request) {
  19. final RichTextArea area = new RichTextArea();
  20. final Label label = new Label(area.getValue(),
  21. ContentMode.PREFORMATTED);
  22. label.setCaption("Value recieved from RichTextArea:");
  23. final Button button = new Button("get area value",
  24. event -> label.setValue(area.getValue()));
  25. addComponent(area);
  26. addComponent(button);
  27. addComponent(label);
  28. }
  29. }