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.

AbsoluteLayoutPrimaryStylename.java 1.1KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. package com.vaadin.tests.components.absolutelayout;
  2. import com.vaadin.tests.components.TestBase;
  3. import com.vaadin.ui.AbsoluteLayout;
  4. import com.vaadin.ui.Button;
  5. import com.vaadin.ui.Component;
  6. import com.vaadin.ui.NativeButton;
  7. public class AbsoluteLayoutPrimaryStylename extends TestBase {
  8. @Override
  9. protected void setup() {
  10. final AbsoluteLayout layout = new AbsoluteLayout();
  11. layout.setWidth("100px");
  12. layout.setWidth("200px");
  13. layout.setPrimaryStyleName("my-absolute-layout");
  14. Component comp1 = new NativeButton("Child 1");
  15. comp1.setWidth("100%");
  16. comp1.setHeight("50px");
  17. layout.addComponent(comp1);
  18. addComponent(layout);
  19. addComponent(new Button("Change primary stylename",
  20. event -> layout
  21. .setPrimaryStyleName("my-second-absolute-layout")));
  22. }
  23. @Override
  24. protected String getDescription() {
  25. return "Absolutelayout should handle setting primary stylename both initially and dynamically";
  26. }
  27. @Override
  28. protected Integer getTicketNumber() {
  29. return 9899;
  30. }
  31. }