Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

WindowStyleNames.java 1005B

123456789101112131415161718192021222324252627282930313233343536
  1. package com.vaadin.tests.components.window;
  2. import com.vaadin.tests.components.TestBase;
  3. import com.vaadin.ui.Button;
  4. public class WindowStyleNames extends TestBase {
  5. @Override
  6. protected String getDescription() {
  7. return "Click 'add style' to add a 'new' style to the window. The 'old' style should disappear and only the 'new' style should be set. Verify using e.g. firebug";
  8. }
  9. @Override
  10. protected Integer getTicketNumber() {
  11. return 3059;
  12. }
  13. @Override
  14. protected void setup() {
  15. setWindowStyle("old");
  16. addComponent(new Button("Set style to 'new'",
  17. event -> setWindowStyle("new")));
  18. addComponent(new Button("Set style to 'custom'",
  19. event -> setWindowStyle("custom")));
  20. addComponent(new Button("Add 'foo' style",
  21. event -> getMainWindow().addStyleName("foo")));
  22. }
  23. protected void setWindowStyle(String string) {
  24. getMainWindow().setStyleName(string);
  25. }
  26. }