您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

TableNavigationPageDown.java 1.7KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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.table;
  17. import com.vaadin.server.VaadinRequest;
  18. import com.vaadin.tests.components.AbstractReindeerTestUI;
  19. import com.vaadin.v7.ui.Table;
  20. public class TableNavigationPageDown extends AbstractReindeerTestUI {
  21. private static final int ROW_NUMBER = 50;
  22. @Override
  23. protected void setup(VaadinRequest req) {
  24. Table table = new Table();
  25. table.setSelectable(true);
  26. table.setImmediate(true);
  27. table.setHeight("150px");
  28. table.addContainerProperty("num", Integer.class, "num");
  29. table.addContainerProperty("Foo", String.class, "Foov");
  30. table.addContainerProperty("Bar", String.class, "Barv");
  31. for (int i = 0; i < ROW_NUMBER; i++) {
  32. Object key = table.addItem();
  33. table.getItem(key).getItemProperty("num").setValue(i);
  34. }
  35. addComponent(table);
  36. }
  37. @Override
  38. protected String getTestDescription() {
  39. return "Navigation in Table with PageDown/PageUp/Home/End keys should work";
  40. }
  41. @Override
  42. protected Integer getTicketNumber() {
  43. return 15332;
  44. }
  45. }