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.

TabsheetNotEnoughHorizontalSpace.java 2.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. /*
  2. * Copyright 2000-2016 Vaadin Ltd.
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License"); you may not
  5. * use this file except in compliance with the License. You may obtain a copy of
  6. * the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
  12. * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
  13. * License for the specific language governing permissions and limitations under
  14. * the License.
  15. */
  16. package com.vaadin.tests.components.tabsheet;
  17. import com.vaadin.annotations.Theme;
  18. import com.vaadin.server.VaadinRequest;
  19. import com.vaadin.tests.components.AbstractReindeerTestUI;
  20. import com.vaadin.ui.Panel;
  21. import com.vaadin.ui.TabSheet;
  22. /**
  23. * Test to see if tabsheet navigation buttons render correctly in Chameleon
  24. *
  25. * @author Vaadin Ltd
  26. */
  27. @Theme("chameleon")
  28. public class TabsheetNotEnoughHorizontalSpace extends AbstractReindeerTestUI {
  29. private TabSheet tabsheet = new TabSheet();
  30. /*
  31. * (non-Javadoc)
  32. *
  33. * @see com.vaadin.tests.components.AbstractTestUI#setup(com.vaadin.server.
  34. * VaadinRequest)
  35. */
  36. @Override
  37. protected void setup(VaadinRequest request) {
  38. generateTabs();
  39. tabsheet.setSizeFull();
  40. addComponent(tabsheet);
  41. }
  42. private void generateTabs() {
  43. tabsheet.removeAllComponents();
  44. for (int i = 0; i < 100; ++i) {
  45. tabsheet.addTab(new Panel(), "Tab" + i);
  46. }
  47. }
  48. /*
  49. * (non-Javadoc)
  50. *
  51. * @see com.vaadin.tests.components.AbstractTestUI#getTestDescription()
  52. */
  53. @Override
  54. protected String getTestDescription() {
  55. return "Scroll-buttons should render correctly on all browsers";
  56. }
  57. /*
  58. * (non-Javadoc)
  59. *
  60. * @see com.vaadin.tests.components.AbstractTestUI#getTicketNumber()
  61. */
  62. @Override
  63. protected Integer getTicketNumber() {
  64. return 12154;
  65. }
  66. }