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.

ComboboxPrimaryStyleNames.java 885B

1234567891011121314151617181920212223242526272829303132
  1. package com.vaadin.tests.components.combobox;
  2. import com.vaadin.server.data.DataSource;
  3. import com.vaadin.tests.components.TestBase;
  4. import com.vaadin.ui.Button;
  5. import com.vaadin.ui.ComboBox;
  6. public class ComboboxPrimaryStyleNames extends TestBase {
  7. @Override
  8. protected void setup() {
  9. final ComboBox<String> box = new ComboBox(null,
  10. DataSource.create("Value 1", "Value 2", "Value 3", "Value 4"));
  11. box.setPrimaryStyleName("my-combobox");
  12. addComponent(box);
  13. addComponent(new Button("Set primary style",
  14. event -> box.setPrimaryStyleName("my-second-combobox")));
  15. }
  16. @Override
  17. protected String getDescription() {
  18. return "Combobox should work with primary stylenames both initially and dynamically";
  19. }
  20. @Override
  21. protected Integer getTicketNumber() {
  22. return 9901;
  23. }
  24. }