.v-button-icon-only .v-icon {
margin-right: -.5em;
-- }
++ }
import com.vaadin.tests.components.AbstractTestCase;\r
import com.vaadin.ui.Button;\r
import com.vaadin.ui.HorizontalLayout;\r
+import com.vaadin.ui.Root.LegacyWindow;\r
import com.vaadin.ui.VerticalLayout;\r
-import com.vaadin.ui.Window;\r
+ import com.vaadin.ui.themes.BaseTheme;\r
\r
public class ButtonsInHorizontalLayout extends AbstractTestCase {\r
\r
public void init() {\r
VerticalLayout content = new VerticalLayout();\r
content.setMargin(true);\r
- setMainWindow(new Window("", content));\r
+ content.setSpacing(true);\r
+ \r
+ content.addComponent(createButtonLayout(null));\r
+ content.addComponent(createButtonLayout(BaseTheme.BUTTON_LINK));\r
+ \r
++ setMainWindow(new LegacyWindow("", content));\r
+ }\r
+ \r
+ private HorizontalLayout createButtonLayout(String style) {\r
HorizontalLayout layout = new HorizontalLayout();\r
layout.setSpacing(true);\r
- layout.addComponent(new Button(\r
- "Look at me in IE7 or IE8 in compatibility mode"));\r
- layout.addComponent(new Button(\r
- "Look at me in IE7 or IE8 in compatibility mode"));\r
- layout.addComponent(new Button(\r
- "Look at me in IE7 or IE8 in compatibility mode"));\r
- content.addComponent(layout);\r
- setMainWindow(new LegacyWindow("", content));\r
+ layout.addComponent(createButton(style));\r
+ layout.addComponent(createButton(style));\r
+ layout.addComponent(createButton(style));\r
+ return layout;\r
+ }\r
+ \r
+ private Button createButton(String style) {\r
+ Button button = new Button(\r
+ "Look at me in IE7 or IE8 in compatibility mode");\r
+ if (style != null && style.length() != 0) {\r
+ button.setStyleName(style);\r
+ }\r
+ return button;\r
}\r
\r
@Override\r
--- /dev/null
-import com.vaadin.ui.Window;\r
+ package com.vaadin.tests.components.table;\r
+ \r
+ import java.util.ArrayList;\r
+ import java.util.List;\r
+ \r
+ import com.vaadin.data.util.BeanItemContainer;\r
+ import com.vaadin.tests.components.TestBase;\r
+ import com.vaadin.tests.util.Person;\r
+ import com.vaadin.ui.HorizontalLayout;\r
++import com.vaadin.ui.Root.LegacyWindow;\r
+ import com.vaadin.ui.Table;\r
- setMainWindow(new Window("", new TestView()));\r
+ \r
+ public class ScrollCausesRequestLoop extends TestBase {\r
+ \r
+ @Override\r
+ protected void setup() {\r
++ setMainWindow(new LegacyWindow("", new TestView()));\r
+ }\r
+ \r
+ @Override\r
+ protected String getDescription() {\r
+ return "Scrolling a table causes an infinite loop of UIDL requests in some cases";\r
+ }\r
+ \r
+ @Override\r
+ protected Integer getTicketNumber() {\r
+ return 8040;\r
+ }\r
+ \r
+ private static class TestView extends HorizontalLayout {\r
+ \r
+ TestView() {\r
+ Table table = new Table();\r
+ List<Person> data = createData();\r
+ BeanItemContainer<Person> container = new BeanItemContainer<Person>(\r
+ Person.class, data) {\r
+ \r
+ @Override\r
+ public Person getIdByIndex(int index) {\r
+ try {\r
+ // Simulate some loading delay with some exaggeration\r
+ // to make easier to reproduce\r
+ Thread.sleep(50);\r
+ } catch (InterruptedException e) {\r
+ Thread.currentThread().interrupt();\r
+ throw new RuntimeException(e);\r
+ }\r
+ return super.getIdByIndex(index);\r
+ }\r
+ };\r
+ table.setContainerDataSource(container);\r
+ addComponent(table);\r
+ }\r
+ }\r
+ \r
+ private static List<Person> createData() {\r
+ int count = 500;\r
+ List<Person> data = new ArrayList<Person>(count);\r
+ for (int i = 0; i < count; i++) {\r
+ data.add(new Person("Person", "" + i, "Email", "Phone", "Street",\r
+ 12345, "City"));\r
+ }\r
+ return data;\r
+ }\r
+ }\r
--- /dev/null
-import com.vaadin.ui.Window;
+ package com.vaadin.tests.components.table;
+
+ import com.vaadin.tests.components.TestBase;
+ import com.vaadin.ui.CssLayout;
++import com.vaadin.ui.Root.LegacyWindow;
+ import com.vaadin.ui.Table;
- Window main = getMainWindow();
+
+ public class TableHeaderZoom extends TestBase {
+
+ @Override
+ protected void setup() {
+ Table table = new Table();
+ table.setHeight("100px");
+ table.setWidth("200px");
+ table.setEnabled(false);
+ table.addContainerProperty("Column 1", String.class, "");
+
++ LegacyWindow main = getMainWindow();
+ main.setContent(new CssLayout());
+ main.addComponent(table);
+ }
+
+ @Override
+ protected String getDescription() {
+ return "Table header text/icon disappears when zooming out";
+ }
+
+ @Override
+ protected Integer getTicketNumber() {
+ return 6870;
+ }
+ }