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.

CheckboxCaptionWrapping.java 1.2KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. package com.vaadin.tests.components.checkbox;
  2. import com.vaadin.tests.components.TestBase;
  3. import com.vaadin.ui.CheckBox;
  4. import com.vaadin.ui.Label;
  5. import com.vaadin.ui.VerticalLayout;
  6. public class CheckboxCaptionWrapping extends TestBase {
  7. @Override
  8. protected String getDescription() {
  9. return "The checkbox caption consists of 10 words which should all be shown. There should be no extra white space between the checkbox caption and the label below it.";
  10. }
  11. @Override
  12. protected Integer getTicketNumber() {
  13. return 3263;
  14. }
  15. @Override
  16. protected void setup() {
  17. setTheme("tests-tickets");
  18. VerticalLayout mainLayout = new VerticalLayout();
  19. CheckBox cb = new CheckBox(
  20. "Checkbox with some Incididunt ut labore et dolore magna aliqua.");
  21. cb.setStyleName("wrap");
  22. cb.setWidth("100%");
  23. mainLayout.setStyleName("borders");
  24. mainLayout.setWidth("300px");
  25. mainLayout.addComponent(cb);
  26. mainLayout.addComponent(new Label(
  27. "Lorem ipsum dolor sit amet, consectetur adipisicing"
  28. + " elit, sed do eiusmod tempor."));
  29. addComponent(mainLayout);
  30. }
  31. }