diff options
Diffstat (limited to 'uitest/src/com/vaadin/tests/components')
33 files changed, 270 insertions, 271 deletions
diff --git a/uitest/src/com/vaadin/tests/components/combobox/ComboBoxReapperingOldValue.java b/uitest/src/com/vaadin/tests/components/combobox/ComboBoxReapperingOldValue.java index 4482cf3121..62286a3998 100644 --- a/uitest/src/com/vaadin/tests/components/combobox/ComboBoxReapperingOldValue.java +++ b/uitest/src/com/vaadin/tests/components/combobox/ComboBoxReapperingOldValue.java @@ -12,8 +12,8 @@ import com.vaadin.ui.UI.LegacyWindow; import com.vaadin.ui.VerticalLayout; @SuppressWarnings("serial") -public class ComboBoxReapperingOldValue extends Application - implements ValueChangeListener { +public class ComboBoxReapperingOldValue extends Application implements + ValueChangeListener { ComboBox cbox1 = new ComboBox(); ComboBox cbox2 = new ComboBox(); diff --git a/uitest/src/com/vaadin/tests/components/combobox/NewItemsESCPress.java b/uitest/src/com/vaadin/tests/components/combobox/NewItemsESCPress.java index 00e9242a7a..0acb4a3c1d 100644 --- a/uitest/src/com/vaadin/tests/components/combobox/NewItemsESCPress.java +++ b/uitest/src/com/vaadin/tests/components/combobox/NewItemsESCPress.java @@ -19,7 +19,7 @@ public class NewItemsESCPress extends TestBase { box.setNewItemHandler(new NewItemHandler() { @Override public void addNewItem(String newItemCaption) { - String value = (String) addedItems.getValue(); + String value = addedItems.getValue(); addedItems.setValue(value + newItemCaption + "\n"); box.addItem(newItemCaption); } diff --git a/uitest/src/com/vaadin/tests/components/form/FormClearDatasourceRepaint.java b/uitest/src/com/vaadin/tests/components/form/FormClearDatasourceRepaint.java index 539263a363..ad6b13f6d2 100644 --- a/uitest/src/com/vaadin/tests/components/form/FormClearDatasourceRepaint.java +++ b/uitest/src/com/vaadin/tests/components/form/FormClearDatasourceRepaint.java @@ -30,7 +30,7 @@ public class FormClearDatasourceRepaint extends TestBase { } public void setValue2(String value) { - this.value2 = value; + value2 = value; } } diff --git a/uitest/src/com/vaadin/tests/components/form/UndefinedWideFormWithRelativeWideFooter.java b/uitest/src/com/vaadin/tests/components/form/UndefinedWideFormWithRelativeWideFooter.java index 218e3998a6..58be87d3dd 100644 --- a/uitest/src/com/vaadin/tests/components/form/UndefinedWideFormWithRelativeWideFooter.java +++ b/uitest/src/com/vaadin/tests/components/form/UndefinedWideFormWithRelativeWideFooter.java @@ -5,12 +5,11 @@ import com.vaadin.ui.Alignment; import com.vaadin.ui.Button; import com.vaadin.ui.Form; import com.vaadin.ui.HorizontalLayout; -import com.vaadin.ui.UI.LegacyWindow; import com.vaadin.ui.TextField; +import com.vaadin.ui.UI.LegacyWindow; @SuppressWarnings("serial") -public class UndefinedWideFormWithRelativeWideFooter extends - Application { +public class UndefinedWideFormWithRelativeWideFooter extends Application { @Override public void init() { diff --git a/uitest/src/com/vaadin/tests/components/formlayout/TableInFormLayoutCausesScrolling.java b/uitest/src/com/vaadin/tests/components/formlayout/TableInFormLayoutCausesScrolling.java index 360c559086..aa2d371671 100644 --- a/uitest/src/com/vaadin/tests/components/formlayout/TableInFormLayoutCausesScrolling.java +++ b/uitest/src/com/vaadin/tests/components/formlayout/TableInFormLayoutCausesScrolling.java @@ -2,9 +2,9 @@ package com.vaadin.tests.components.formlayout; import com.vaadin.tests.components.AbstractTestCase; import com.vaadin.ui.FormLayout; -import com.vaadin.ui.UI.LegacyWindow; import com.vaadin.ui.Table; import com.vaadin.ui.TextField; +import com.vaadin.ui.UI.LegacyWindow; public class TableInFormLayoutCausesScrolling extends AbstractTestCase { diff --git a/uitest/src/com/vaadin/tests/components/image/ImageAltText.java b/uitest/src/com/vaadin/tests/components/image/ImageAltText.java index 6abbc41213..efee376bfe 100644 --- a/uitest/src/com/vaadin/tests/components/image/ImageAltText.java +++ b/uitest/src/com/vaadin/tests/components/image/ImageAltText.java @@ -18,6 +18,7 @@ public class ImageAltText extends TestBase { Button changeAltTexts = new Button("Change alt text", new Button.ClickListener() { + @Override public void buttonClick(ClickEvent event) { image.setAlternateText("New alt text!"); } diff --git a/uitest/src/com/vaadin/tests/components/menubar/MenuBarInSplitPanel.java b/uitest/src/com/vaadin/tests/components/menubar/MenuBarInSplitPanel.java index 59aebd0bd7..5a59aa6187 100644 --- a/uitest/src/com/vaadin/tests/components/menubar/MenuBarInSplitPanel.java +++ b/uitest/src/com/vaadin/tests/components/menubar/MenuBarInSplitPanel.java @@ -4,8 +4,8 @@ import com.vaadin.tests.components.AbstractTestCase; import com.vaadin.ui.HorizontalSplitPanel; import com.vaadin.ui.Label; import com.vaadin.ui.MenuBar; -import com.vaadin.ui.UI.LegacyWindow; import com.vaadin.ui.Tree; +import com.vaadin.ui.UI.LegacyWindow; import com.vaadin.ui.VerticalLayout; public class MenuBarInSplitPanel extends AbstractTestCase { diff --git a/uitest/src/com/vaadin/tests/components/orderedlayout/LayoutResizeTest.java b/uitest/src/com/vaadin/tests/components/orderedlayout/LayoutResizeTest.java index ea3b319c5c..de65e260b6 100644 --- a/uitest/src/com/vaadin/tests/components/orderedlayout/LayoutResizeTest.java +++ b/uitest/src/com/vaadin/tests/components/orderedlayout/LayoutResizeTest.java @@ -37,16 +37,16 @@ public class LayoutResizeTest extends TestBase { Button resize = new Button("Resize to 700x400", new Button.ClickListener() { - @Override - public void buttonClick(ClickEvent event) { - event.getButton() - .getUI() - .getPage() - .getJavaScript() - .execute( - "setTimeout(function() {window.resizeTo(700,400)}, 500)"); - } - }); + @Override + public void buttonClick(ClickEvent event) { + event.getButton() + .getUI() + .getPage() + .getJavaScript() + .execute( + "setTimeout(function() {window.resizeTo(700,400)}, 500)"); + } + }); left.addComponent(resize); resize = new Button("Resize to 900x600", new Button.ClickListener() { @@ -54,10 +54,10 @@ public class LayoutResizeTest extends TestBase { public void buttonClick(ClickEvent event) { event.getButton() .getUI() - .getPage() - .getJavaScript() - .execute( - "setTimeout(function() {window.resizeTo(900,600)}, 500)"); + .getPage() + .getJavaScript() + .execute( + "setTimeout(function() {window.resizeTo(900,600)}, 500)"); } }); left.addComponent(resize); diff --git a/uitest/src/com/vaadin/tests/components/orderedlayout/OrderedLayoutCases.java b/uitest/src/com/vaadin/tests/components/orderedlayout/OrderedLayoutCases.java index e029e3903a..125dfae37a 100644 --- a/uitest/src/com/vaadin/tests/components/orderedlayout/OrderedLayoutCases.java +++ b/uitest/src/com/vaadin/tests/components/orderedlayout/OrderedLayoutCases.java @@ -25,55 +25,55 @@ import com.vaadin.ui.VerticalLayout; public class OrderedLayoutCases extends AbstractTestUI { private static final String[] dimensionValues = { "-1px", "5px", "350px", - "800px", "100%", "50%" }; + "800px", "100%", "50%" }; private static class SampleChild extends VerticalLayout { public SampleChild() { setStyleName("sampleChild"); addComponent(createSimpleSelector("Child width", new ValueChangeListener() { - @Override - public void valueChange(ValueChangeEvent event) { - setWidth(event.getProperty().getValue().toString()); - } - }, dimensionValues)); + @Override + public void valueChange(ValueChangeEvent event) { + setWidth(event.getProperty().getValue().toString()); + } + }, dimensionValues)); addComponent(createSimpleSelector("Child height", new ValueChangeListener() { - @Override - public void valueChange(ValueChangeEvent event) { - setHeight(event.getProperty().getValue().toString()); - } - }, dimensionValues)); + @Override + public void valueChange(ValueChangeEvent event) { + setHeight(event.getProperty().getValue().toString()); + } + }, dimensionValues)); addComponent(createSimpleSelector("Caption", new ValueChangeListener() { - @Override - public void valueChange(ValueChangeEvent event) { - String value = event.getProperty().getValue() - .toString(); - if (value.length() == 0) { - setCaption(null); - } else if (value.equals("Long")) { - setCaption("A rather long caption just to see what happens"); - } else { - setCaption(value); - } - } - }, "", "Short", "Long")); + @Override + public void valueChange(ValueChangeEvent event) { + String value = event.getProperty().getValue() + .toString(); + if (value.length() == 0) { + setCaption(null); + } else if (value.equals("Long")) { + setCaption("A rather long caption just to see what happens"); + } else { + setCaption(value); + } + } + }, "", "Short", "Long")); addComponent(createSimpleSelector("Expand ratio", new ValueChangeListener() { - @Override - public void valueChange(ValueChangeEvent event) { - AbstractOrderedLayout parent = (AbstractOrderedLayout) getParent(); - if (parent == null) { - return; - } - String value = event.getProperty().getValue() - .toString(); - parent.setExpandRatio(SampleChild.this, - Float.parseFloat(value)); - } - }, "0", "1", "2")); + @Override + public void valueChange(ValueChangeEvent event) { + AbstractOrderedLayout parent = (AbstractOrderedLayout) getParent(); + if (parent == null) { + return; + } + String value = event.getProperty().getValue() + .toString(); + parent.setExpandRatio(SampleChild.this, + Float.parseFloat(value)); + } + }, "0", "1", "2")); // Why is Alignment not an enum? Now we have to use reflection just // to get the different values as hardcoding is never an option! ;) @@ -86,26 +86,26 @@ public class OrderedLayoutCases extends AbstractTestUI { } addComponent(createSimpleSelector("Alignment", new ValueChangeListener() { - @Override - public void valueChange(ValueChangeEvent event) { - String value = event.getProperty().getValue() - .toString(); - AlignmentHandler parent = (AlignmentHandler) getParent(); - if (parent == null) { - return; - } - try { - Field field = Alignment.class - .getDeclaredField(value); - Alignment alignment = (Alignment) field - .get(null); - parent.setComponentAlignment(SampleChild.this, - alignment); - } catch (Exception e) { - throw new RuntimeException(e); - } - } - }, alignmentValues, "TOP_LEFT")); // Sorry for not using + @Override + public void valueChange(ValueChangeEvent event) { + String value = event.getProperty().getValue() + .toString(); + AlignmentHandler parent = (AlignmentHandler) getParent(); + if (parent == null) { + return; + } + try { + Field field = Alignment.class + .getDeclaredField(value); + Alignment alignment = (Alignment) field + .get(null); + parent.setComponentAlignment(SampleChild.this, + alignment); + } catch (Exception e) { + throw new RuntimeException(e); + } + } + }, alignmentValues, "TOP_LEFT")); // Sorry for not using // more reflection magic // just to find the // default value... @@ -119,12 +119,12 @@ public class OrderedLayoutCases extends AbstractTestUI { @Override protected void setup(WrappedRequest request) { TestUtils - .injectCSS( - getUI(), - ".sampleChild, .theLayout {border: 1px solid black;}" - + ".theLayout > div:first-child {background: aqua;}" - + ".theLayout > div:first-child + div {background: yellow;}" - + ".theLayout > div:first-child + div + div {background: lightgrey;}"); + .injectCSS( + getUI(), + ".sampleChild, .theLayout {border: 1px solid black;}" + + ".theLayout > div:first-child {background: aqua;}" + + ".theLayout > div:first-child + div {background: yellow;}" + + ".theLayout > div:first-child + div + div {background: lightgrey;}"); currentLayout = new HorizontalLayout(); for (int i = 0; i < 3; i++) { @@ -136,196 +136,196 @@ public class OrderedLayoutCases extends AbstractTestUI { sizeBar.addComponent(createSimpleSelector("Layout width", new ValueChangeListener() { - @Override - public void valueChange(ValueChangeEvent event) { - currentLayout.setWidth(event.getProperty().getValue() - .toString()); - } - }, dimensionValues)); + @Override + public void valueChange(ValueChangeEvent event) { + currentLayout.setWidth(event.getProperty().getValue() + .toString()); + } + }, dimensionValues)); sizeBar.addComponent(createSimpleSelector("Layout height", new ValueChangeListener() { - @Override - public void valueChange(ValueChangeEvent event) { - currentLayout.setHeight(event.getProperty().getValue() - .toString()); - } - }, dimensionValues)); + @Override + public void valueChange(ValueChangeEvent event) { + currentLayout.setHeight(event.getProperty().getValue() + .toString()); + } + }, dimensionValues)); sizeBar.addComponent(createSimpleSelector("Spacing", new ValueChangeListener() { - @Override - public void valueChange(ValueChangeEvent event) { - currentLayout.setSpacing(Boolean.parseBoolean(event - .getProperty().getValue().toString())); - } - }, "false", "true")); + @Override + public void valueChange(ValueChangeEvent event) { + currentLayout.setSpacing(Boolean.parseBoolean(event + .getProperty().getValue().toString())); + } + }, "false", "true")); sizeBar.addComponent(createSimpleSelector("Margin", new ValueChangeListener() { - @Override - public void valueChange(ValueChangeEvent event) { - currentLayout.setMargin(Boolean.parseBoolean(event - .getProperty().getValue().toString())); - } - }, "false", "true")); + @Override + public void valueChange(ValueChangeEvent event) { + currentLayout.setMargin(Boolean.parseBoolean(event + .getProperty().getValue().toString())); + } + }, "false", "true")); sizeBar.addComponent(createSimpleSelector("Direction", new ValueChangeListener() { - @Override - public void valueChange(ValueChangeEvent event) { - Object value = event.getProperty().getValue(); - - AbstractOrderedLayout newLayout; - if (value.equals("Horizontal")) { - newLayout = new HorizontalLayout(); - } else { - newLayout = new VerticalLayout(); - } - - while (currentLayout.getComponentCount() > 0) { - newLayout.addComponent(currentLayout - .getComponent(0)); - } - newLayout.setStyleName("theLayout"); - - newLayout.setHeight(currentLayout.getHeight(), - currentLayout.getHeightUnits()); - newLayout.setWidth(currentLayout.getWidth(), - currentLayout.getWidthUnits()); - - newLayout.setMargin(currentLayout.getMargin()); - newLayout.setSpacing(currentLayout.isSpacing()); - - getLayout().replaceComponent(currentLayout, newLayout); - getLayout().setExpandRatio(newLayout, 1); - currentLayout = newLayout; - } - }, "Horizontal", "Vertical")); + @Override + public void valueChange(ValueChangeEvent event) { + Object value = event.getProperty().getValue(); + + AbstractOrderedLayout newLayout; + if (value.equals("Horizontal")) { + newLayout = new HorizontalLayout(); + } else { + newLayout = new VerticalLayout(); + } + + while (currentLayout.getComponentCount() > 0) { + newLayout.addComponent(currentLayout + .getComponent(0)); + } + newLayout.setStyleName("theLayout"); + + newLayout.setHeight(currentLayout.getHeight(), + currentLayout.getHeightUnits()); + newLayout.setWidth(currentLayout.getWidth(), + currentLayout.getWidthUnits()); + + newLayout.setMargin(currentLayout.getMargin()); + newLayout.setSpacing(currentLayout.isSpacing()); + + getLayout().replaceComponent(currentLayout, newLayout); + getLayout().setExpandRatio(newLayout, 1); + currentLayout = newLayout; + } + }, "Horizontal", "Vertical")); HorizontalLayout caseBar = new HorizontalLayout(); caseBar.addComponent(new Button("Undefined without relative", new ClickListener() { - @Override - public void buttonClick(ClickEvent event) { - resetState(); - setState(sizeBar, 2, 1); - // width: 350px to middle child - setChildState(1, 0, 2); - // middle center allign to middle child - setChildState(1, 4, 5); - // long captions to right child - setChildState(2, 2, 2); - } - })); + @Override + public void buttonClick(ClickEvent event) { + resetState(); + setState(sizeBar, 2, 1); + // width: 350px to middle child + setChildState(1, 0, 2); + // middle center allign to middle child + setChildState(1, 4, 5); + // long captions to right child + setChildState(2, 2, 2); + } + })); caseBar.addComponent(new Button("Undefined with relative", new ClickListener() { - @Override - public void buttonClick(ClickEvent event) { - resetState(); - // width: 100% to middle child - setChildState(1, 0, 4); - } - })); + @Override + public void buttonClick(ClickEvent event) { + resetState(); + // width: 100% to middle child + setChildState(1, 0, 4); + } + })); caseBar.addComponent(new Button("Fixed with overflow", new ClickListener() { - @Override - public void buttonClick(ClickEvent event) { - resetState(); - // layout width: 350px - setState(sizeBar, 0, 2); - // layout margin enabled - setState(sizeBar, 3, 1); - } - })); + @Override + public void buttonClick(ClickEvent event) { + resetState(); + // layout width: 350px + setState(sizeBar, 0, 2); + // layout margin enabled + setState(sizeBar, 3, 1); + } + })); caseBar.addComponent(new Button("Fixed with extra space", new ClickListener() { - @Override - public void buttonClick(ClickEvent event) { - resetState(); - // Layout width: 800px - setState(sizeBar, 0, 3); - // layout margin enabled - setState(sizeBar, 3, 1); - // width: 350px to middle child - setChildState(1, 0, 2); - // short caption for middle child - setChildState(1, 2, 1); - // top center align for middle child - setChildState(1, 4, 2); - } - })); + @Override + public void buttonClick(ClickEvent event) { + resetState(); + // Layout width: 800px + setState(sizeBar, 0, 3); + // layout margin enabled + setState(sizeBar, 3, 1); + // width: 350px to middle child + setChildState(1, 0, 2); + // short caption for middle child + setChildState(1, 2, 1); + // top center align for middle child + setChildState(1, 4, 2); + } + })); caseBar.addComponent(new Button("Expand with alignment", new ClickListener() { - @Override - public void buttonClick(ClickEvent event) { - resetState(); - // Layout width: 800px - setState(sizeBar, 0, 3); - // Layout height: 350px - setState(sizeBar, 1, 2); - // Expand: 1 to middle child - setChildState(1, 3, 1); - // Align bottom left to middle child - setChildState(1, 4, 6); - // Long caption to middle child - setChildState(1, 2, 2); - } - })); + @Override + public void buttonClick(ClickEvent event) { + resetState(); + // Layout width: 800px + setState(sizeBar, 0, 3); + // Layout height: 350px + setState(sizeBar, 1, 2); + // Expand: 1 to middle child + setChildState(1, 3, 1); + // Align bottom left to middle child + setChildState(1, 4, 6); + // Long caption to middle child + setChildState(1, 2, 2); + } + })); caseBar.addComponent(new Button("Multiple expands", new ClickListener() { - @Override - public void buttonClick(ClickEvent event) { - resetState(); - // Layout width: 800px - setState(sizeBar, 0, 3); - // Layout height: 350px - setState(sizeBar, 1, 2); - // Long caption to left child - setChildState(0, 2, 2); - // Width 350px to middle child - setChildState(1, 0, 2); - // Apply to left and middle child - for (int i = 0; i < 2; i++) { - // Expand: 1 - setChildState(i, 3, 1); - // Align: middle center - setChildState(i, 4, 5); - } - } - })); + @Override + public void buttonClick(ClickEvent event) { + resetState(); + // Layout width: 800px + setState(sizeBar, 0, 3); + // Layout height: 350px + setState(sizeBar, 1, 2); + // Long caption to left child + setChildState(0, 2, 2); + // Width 350px to middle child + setChildState(1, 0, 2); + // Apply to left and middle child + for (int i = 0; i < 2; i++) { + // Expand: 1 + setChildState(i, 3, 1); + // Align: middle center + setChildState(i, 4, 5); + } + } + })); caseBar.addComponent(new Button("Fixed + relative height", new ClickListener() { - @Override - public void buttonClick(ClickEvent event) { - resetState(); - // Layout height: 100% - setState(sizeBar, 1, 4); - // Height: 350px to left child - setChildState(0, 1, 2); - // Height: 100% to middle child - setChildState(1, 1, 4); - // Short caption to middle child - setChildState(1, 2, 1); - // Alignment: bottom left to right child - setChildState(2, 4, 7); - } - })); + @Override + public void buttonClick(ClickEvent event) { + resetState(); + // Layout height: 100% + setState(sizeBar, 1, 4); + // Height: 350px to left child + setChildState(0, 1, 2); + // Height: 100% to middle child + setChildState(1, 1, 4); + // Short caption to middle child + setChildState(1, 2, 1); + // Alignment: bottom left to right child + setChildState(2, 4, 7); + } + })); caseBar.addComponent(new Button("Undefined + relative height", new ClickListener() { - @Override - public void buttonClick(ClickEvent event) { - resetState(); - // Height: 350px to left child - setChildState(0, 1, 2); - // Short caption to left child - setChildState(0, 2, 1); - // Height: 100% to middle child - setChildState(1, 1, 4); - // Alignment: bottom left to right child - setChildState(2, 4, 7); - } - })); + @Override + public void buttonClick(ClickEvent event) { + resetState(); + // Height: 350px to left child + setChildState(0, 1, 2); + // Short caption to left child + setChildState(0, 2, 1); + // Height: 100% to middle child + setChildState(1, 1, 4); + // Alignment: bottom left to right child + setChildState(2, 4, 7); + } + })); caseBar.setSpacing(true); diff --git a/uitest/src/com/vaadin/tests/components/orderedlayout/VerticalLayoutWidthCalculation.java b/uitest/src/com/vaadin/tests/components/orderedlayout/VerticalLayoutWidthCalculation.java index bc76a0c0ce..60d20ad8be 100644 --- a/uitest/src/com/vaadin/tests/components/orderedlayout/VerticalLayoutWidthCalculation.java +++ b/uitest/src/com/vaadin/tests/components/orderedlayout/VerticalLayoutWidthCalculation.java @@ -4,8 +4,8 @@ import com.vaadin.tests.components.AbstractTestCase; import com.vaadin.ui.Button; import com.vaadin.ui.Button.ClickEvent; import com.vaadin.ui.HorizontalLayout; -import com.vaadin.ui.UI.LegacyWindow; import com.vaadin.ui.TextField; +import com.vaadin.ui.UI.LegacyWindow; import com.vaadin.ui.VerticalLayout; import com.vaadin.ui.Window; diff --git a/uitest/src/com/vaadin/tests/components/splitpanel/SplitPanelWidthOnResize.java b/uitest/src/com/vaadin/tests/components/splitpanel/SplitPanelWidthOnResize.java index c35838e751..5043af10ac 100644 --- a/uitest/src/com/vaadin/tests/components/splitpanel/SplitPanelWidthOnResize.java +++ b/uitest/src/com/vaadin/tests/components/splitpanel/SplitPanelWidthOnResize.java @@ -5,8 +5,8 @@ import com.vaadin.tests.components.AbstractTestCase; import com.vaadin.ui.Button; import com.vaadin.ui.HorizontalSplitPanel; import com.vaadin.ui.NativeButton; -import com.vaadin.ui.UI.LegacyWindow; import com.vaadin.ui.TextField; +import com.vaadin.ui.UI.LegacyWindow; import com.vaadin.ui.VerticalLayout; public class SplitPanelWidthOnResize extends AbstractTestCase { diff --git a/uitest/src/com/vaadin/tests/components/table/Footer.java b/uitest/src/com/vaadin/tests/components/table/Footer.java index 7fd8d3563f..cf6c3b6185 100644 --- a/uitest/src/com/vaadin/tests/components/table/Footer.java +++ b/uitest/src/com/vaadin/tests/components/table/Footer.java @@ -52,7 +52,7 @@ public class Footer extends TestBase { visible.addListener(new Property.ValueChangeListener() { @Override public void valueChange(ValueChangeEvent event) { - table.setFooterVisible((Boolean) visible.getValue()); + table.setFooterVisible(visible.getValue()); } }); diff --git a/uitest/src/com/vaadin/tests/components/table/ScrollCausesRequestLoop.java b/uitest/src/com/vaadin/tests/components/table/ScrollCausesRequestLoop.java index edd524d657..1ef30ff6b0 100644 --- a/uitest/src/com/vaadin/tests/components/table/ScrollCausesRequestLoop.java +++ b/uitest/src/com/vaadin/tests/components/table/ScrollCausesRequestLoop.java @@ -7,8 +7,8 @@ import com.vaadin.data.util.BeanItemContainer; import com.vaadin.tests.components.AbstractTestCase; import com.vaadin.tests.util.Person; import com.vaadin.ui.HorizontalLayout; -import com.vaadin.ui.UI.LegacyWindow; import com.vaadin.ui.Table; +import com.vaadin.ui.UI.LegacyWindow; public class ScrollCausesRequestLoop extends AbstractTestCase { diff --git a/uitest/src/com/vaadin/tests/components/table/SortLongTable.java b/uitest/src/com/vaadin/tests/components/table/SortLongTable.java index afc63c0eda..65e60a05a1 100644 --- a/uitest/src/com/vaadin/tests/components/table/SortLongTable.java +++ b/uitest/src/com/vaadin/tests/components/table/SortLongTable.java @@ -1,8 +1,8 @@ package com.vaadin.tests.components.table; import com.vaadin.tests.components.AbstractTestCase; -import com.vaadin.ui.UI.LegacyWindow; import com.vaadin.ui.Table; +import com.vaadin.ui.UI.LegacyWindow; import com.vaadin.ui.VerticalLayout; public class SortLongTable extends AbstractTestCase { diff --git a/uitest/src/com/vaadin/tests/components/table/TableExtraScrollbars.java b/uitest/src/com/vaadin/tests/components/table/TableExtraScrollbars.java index f8fb624c0b..76e05c51d0 100644 --- a/uitest/src/com/vaadin/tests/components/table/TableExtraScrollbars.java +++ b/uitest/src/com/vaadin/tests/components/table/TableExtraScrollbars.java @@ -4,8 +4,8 @@ import com.vaadin.data.Container; import com.vaadin.data.Item; import com.vaadin.data.util.IndexedContainer; import com.vaadin.tests.components.AbstractTestCase; -import com.vaadin.ui.UI.LegacyWindow; import com.vaadin.ui.Table; +import com.vaadin.ui.UI.LegacyWindow; import com.vaadin.ui.VerticalLayout; public class TableExtraScrollbars extends AbstractTestCase { diff --git a/uitest/src/com/vaadin/tests/components/table/TableHeaderZoom.java b/uitest/src/com/vaadin/tests/components/table/TableHeaderZoom.java index 26f8e25d3b..ef26f73f92 100644 --- a/uitest/src/com/vaadin/tests/components/table/TableHeaderZoom.java +++ b/uitest/src/com/vaadin/tests/components/table/TableHeaderZoom.java @@ -2,8 +2,8 @@ package com.vaadin.tests.components.table; import com.vaadin.tests.components.TestBase; import com.vaadin.ui.CssLayout; -import com.vaadin.ui.UI.LegacyWindow; import com.vaadin.ui.Table; +import com.vaadin.ui.UI.LegacyWindow; public class TableHeaderZoom extends TestBase { diff --git a/uitest/src/com/vaadin/tests/components/table/TableHeightWhenHidingHeaders.java b/uitest/src/com/vaadin/tests/components/table/TableHeightWhenHidingHeaders.java index 6bbf06635a..2ed9ed4599 100644 --- a/uitest/src/com/vaadin/tests/components/table/TableHeightWhenHidingHeaders.java +++ b/uitest/src/com/vaadin/tests/components/table/TableHeightWhenHidingHeaders.java @@ -4,8 +4,8 @@ import com.vaadin.data.Property.ValueChangeEvent; import com.vaadin.data.Property.ValueChangeListener; import com.vaadin.tests.components.AbstractTestCase; import com.vaadin.ui.CheckBox; -import com.vaadin.ui.UI.LegacyWindow; import com.vaadin.ui.Table; +import com.vaadin.ui.UI.LegacyWindow; /** * Setting table height and setting column header mode as hidden leaves the body diff --git a/uitest/src/com/vaadin/tests/components/table/TableScrollOnFocus.java b/uitest/src/com/vaadin/tests/components/table/TableScrollOnFocus.java index 4782ca94f7..bfbc4f82c1 100644 --- a/uitest/src/com/vaadin/tests/components/table/TableScrollOnFocus.java +++ b/uitest/src/com/vaadin/tests/components/table/TableScrollOnFocus.java @@ -16,7 +16,7 @@ public class TableScrollOnFocus extends TestBase { chkSelectable.addListener(new ValueChangeListener() { @Override public void valueChange(ValueChangeEvent event) { - table.setSelectable((Boolean) chkSelectable.getValue()); + table.setSelectable(chkSelectable.getValue()); } }); diff --git a/uitest/src/com/vaadin/tests/components/table/TableToggleVisibility.java b/uitest/src/com/vaadin/tests/components/table/TableToggleVisibility.java index 9ca2605cd9..7df73a6b4c 100644 --- a/uitest/src/com/vaadin/tests/components/table/TableToggleVisibility.java +++ b/uitest/src/com/vaadin/tests/components/table/TableToggleVisibility.java @@ -7,8 +7,8 @@ import com.vaadin.ui.Button; import com.vaadin.ui.HorizontalLayout; import com.vaadin.ui.HorizontalSplitPanel; import com.vaadin.ui.Label; -import com.vaadin.ui.UI.LegacyWindow; import com.vaadin.ui.Table; +import com.vaadin.ui.UI.LegacyWindow; import com.vaadin.ui.VerticalLayout; public class TableToggleVisibility extends AbstractTestCase { diff --git a/uitest/src/com/vaadin/tests/components/table/TestCurrentPageFirstItem.java b/uitest/src/com/vaadin/tests/components/table/TestCurrentPageFirstItem.java index c563312efa..8244835df7 100644 --- a/uitest/src/com/vaadin/tests/components/table/TestCurrentPageFirstItem.java +++ b/uitest/src/com/vaadin/tests/components/table/TestCurrentPageFirstItem.java @@ -7,10 +7,8 @@ import com.vaadin.tests.components.TestBase; import com.vaadin.ui.Button; import com.vaadin.ui.Button.ClickEvent; import com.vaadin.ui.Button.ClickListener; -import com.vaadin.ui.UI.LegacyWindow; import com.vaadin.ui.HorizontalLayout; import com.vaadin.ui.Table; -import com.vaadin.ui.VerticalLayout; public class TestCurrentPageFirstItem extends TestBase implements ClickListener { diff --git a/uitest/src/com/vaadin/tests/components/tabsheet/TabsheetNPE.java b/uitest/src/com/vaadin/tests/components/tabsheet/TabsheetNPE.java index 1934649902..eb47003d03 100644 --- a/uitest/src/com/vaadin/tests/components/tabsheet/TabsheetNPE.java +++ b/uitest/src/com/vaadin/tests/components/tabsheet/TabsheetNPE.java @@ -5,9 +5,9 @@ import com.vaadin.ui.Button; import com.vaadin.ui.Button.ClickEvent; import com.vaadin.ui.Button.ClickListener; import com.vaadin.ui.Label; -import com.vaadin.ui.UI.LegacyWindow; import com.vaadin.ui.TabSheet; import com.vaadin.ui.TabSheet.Tab; +import com.vaadin.ui.UI.LegacyWindow; import com.vaadin.ui.VerticalLayout; public class TabsheetNPE extends AbstractTestCase implements ClickListener { diff --git a/uitest/src/com/vaadin/tests/components/textfield/TextChangeEvents2.java b/uitest/src/com/vaadin/tests/components/textfield/TextChangeEvents2.java index 363e9d448d..538589808d 100644 --- a/uitest/src/com/vaadin/tests/components/textfield/TextChangeEvents2.java +++ b/uitest/src/com/vaadin/tests/components/textfield/TextChangeEvents2.java @@ -163,7 +163,7 @@ public class TextChangeEvents2 extends TestBase { @Override public void valueChange(ValueChangeEvent event) { TextField tf = (TextField) event.getProperty(); - String val = (String) tf.getValue(); + String val = tf.getValue(); if (val != null && val.length() > 4) { tf.setValue(val.substring(0, 4)); } diff --git a/uitest/src/com/vaadin/tests/components/textfield/TextFieldInLayoutInTable.java b/uitest/src/com/vaadin/tests/components/textfield/TextFieldInLayoutInTable.java index bab39bf656..c32854f6f1 100644 --- a/uitest/src/com/vaadin/tests/components/textfield/TextFieldInLayoutInTable.java +++ b/uitest/src/com/vaadin/tests/components/textfield/TextFieldInLayoutInTable.java @@ -3,9 +3,9 @@ package com.vaadin.tests.components.textfield; import com.vaadin.Application; import com.vaadin.ui.Component; import com.vaadin.ui.Panel; -import com.vaadin.ui.UI.LegacyWindow; import com.vaadin.ui.Table; import com.vaadin.ui.TextField; +import com.vaadin.ui.UI.LegacyWindow; import com.vaadin.ui.VerticalLayout; public class TextFieldInLayoutInTable extends Application { diff --git a/uitest/src/com/vaadin/tests/components/tree/TreeFiltering.java b/uitest/src/com/vaadin/tests/components/tree/TreeFiltering.java index be65a335be..13edf9e37f 100644 --- a/uitest/src/com/vaadin/tests/components/tree/TreeFiltering.java +++ b/uitest/src/com/vaadin/tests/components/tree/TreeFiltering.java @@ -49,7 +49,7 @@ public class TreeFiltering extends TestBase { @Override public void valueChange(ValueChangeEvent event) { - cont.setIncludeParentsWhenFiltering((Boolean) ((CheckBox) event + cont.setIncludeParentsWhenFiltering(((CheckBox) event .getProperty()).getValue()); ccTree.markAsDirty(); } diff --git a/uitest/src/com/vaadin/tests/components/tree/TreePerformanceTest.java b/uitest/src/com/vaadin/tests/components/tree/TreePerformanceTest.java index 892b7e669a..529a0238c6 100644 --- a/uitest/src/com/vaadin/tests/components/tree/TreePerformanceTest.java +++ b/uitest/src/com/vaadin/tests/components/tree/TreePerformanceTest.java @@ -2,8 +2,8 @@ package com.vaadin.tests.components.tree; import com.vaadin.tests.components.AbstractTestCase; import com.vaadin.ui.Layout; -import com.vaadin.ui.UI.LegacyWindow; import com.vaadin.ui.Tree; +import com.vaadin.ui.UI.LegacyWindow; import com.vaadin.ui.VerticalLayout; public class TreePerformanceTest extends AbstractTestCase { diff --git a/uitest/src/com/vaadin/tests/components/tree/TreeScrolling.java b/uitest/src/com/vaadin/tests/components/tree/TreeScrolling.java index 70c2d5d433..737712dd52 100644 --- a/uitest/src/com/vaadin/tests/components/tree/TreeScrolling.java +++ b/uitest/src/com/vaadin/tests/components/tree/TreeScrolling.java @@ -2,9 +2,9 @@ package com.vaadin.tests.components.tree; import com.vaadin.tests.components.AbstractTestCase; import com.vaadin.ui.RichTextArea; -import com.vaadin.ui.UI.LegacyWindow; import com.vaadin.ui.TextField; import com.vaadin.ui.Tree; +import com.vaadin.ui.UI.LegacyWindow; import com.vaadin.ui.VerticalLayout; public class TreeScrolling extends AbstractTestCase { diff --git a/uitest/src/com/vaadin/tests/components/tree/TreeToolTips.java b/uitest/src/com/vaadin/tests/components/tree/TreeToolTips.java index 4b892c2150..59e3fec1f9 100644 --- a/uitest/src/com/vaadin/tests/components/tree/TreeToolTips.java +++ b/uitest/src/com/vaadin/tests/components/tree/TreeToolTips.java @@ -20,8 +20,9 @@ public class TreeToolTips extends TestBase { } }); - for (Object rootItems : tree.rootItemIds()) + for (Object rootItems : tree.rootItemIds()) { tree.expandItemsRecursively(rootItems); + } addComponent(tree); } diff --git a/uitest/src/com/vaadin/tests/components/treetable/DisappearingComponents.java b/uitest/src/com/vaadin/tests/components/treetable/DisappearingComponents.java index d9f6dcc2ac..d06dd1ec0a 100644 --- a/uitest/src/com/vaadin/tests/components/treetable/DisappearingComponents.java +++ b/uitest/src/com/vaadin/tests/components/treetable/DisappearingComponents.java @@ -3,8 +3,8 @@ package com.vaadin.tests.components.treetable; import com.vaadin.server.ExternalResource; import com.vaadin.tests.components.AbstractTestCase; import com.vaadin.ui.Link; -import com.vaadin.ui.UI.LegacyWindow; import com.vaadin.ui.TreeTable; +import com.vaadin.ui.UI.LegacyWindow; public class DisappearingComponents extends AbstractTestCase { diff --git a/uitest/src/com/vaadin/tests/components/ui/LazyInitUIs.java b/uitest/src/com/vaadin/tests/components/ui/LazyInitUIs.java index a3ca2420f7..5278fb0073 100644 --- a/uitest/src/com/vaadin/tests/components/ui/LazyInitUIs.java +++ b/uitest/src/com/vaadin/tests/components/ui/LazyInitUIs.java @@ -20,8 +20,8 @@ public class LazyInitUIs extends AbstractTestUIProvider { } @Override - public UI createInstance(VaadinSession application, Class<? extends UI> type, - WrappedRequest request) { + public UI createInstance(VaadinSession application, + Class<? extends UI> type, WrappedRequest request) { return getUI(request); } diff --git a/uitest/src/com/vaadin/tests/components/ui/UriFragmentTest.java b/uitest/src/com/vaadin/tests/components/ui/UriFragmentTest.java index b64770408b..591a045e1d 100644 --- a/uitest/src/com/vaadin/tests/components/ui/UriFragmentTest.java +++ b/uitest/src/com/vaadin/tests/components/ui/UriFragmentTest.java @@ -1,8 +1,8 @@ package com.vaadin.tests.components.ui; import com.vaadin.server.Page; -import com.vaadin.server.WrappedRequest; import com.vaadin.server.Page.FragmentChangedEvent; +import com.vaadin.server.WrappedRequest; import com.vaadin.tests.components.AbstractTestUI; import com.vaadin.ui.Button; import com.vaadin.ui.Button.ClickEvent; diff --git a/uitest/src/com/vaadin/tests/components/window/SubWindowFocusAndBlurListeners.java b/uitest/src/com/vaadin/tests/components/window/SubWindowFocusAndBlurListeners.java index 273d48514c..bb247ee065 100644 --- a/uitest/src/com/vaadin/tests/components/window/SubWindowFocusAndBlurListeners.java +++ b/uitest/src/com/vaadin/tests/components/window/SubWindowFocusAndBlurListeners.java @@ -11,8 +11,8 @@ import com.vaadin.tests.components.TestBase; import com.vaadin.ui.Button; import com.vaadin.ui.Button.ClickEvent; import com.vaadin.ui.Notification; -import com.vaadin.ui.UI; import com.vaadin.ui.TextField; +import com.vaadin.ui.UI; import com.vaadin.ui.Window; public class SubWindowFocusAndBlurListeners extends TestBase { diff --git a/uitest/src/com/vaadin/tests/components/window/WindowScrollingComponentIntoView.java b/uitest/src/com/vaadin/tests/components/window/WindowScrollingComponentIntoView.java index 033de48446..c1e9367dc7 100644 --- a/uitest/src/com/vaadin/tests/components/window/WindowScrollingComponentIntoView.java +++ b/uitest/src/com/vaadin/tests/components/window/WindowScrollingComponentIntoView.java @@ -8,8 +8,8 @@ import com.vaadin.ui.Component; import com.vaadin.ui.HorizontalLayout; import com.vaadin.ui.Label; import com.vaadin.ui.Panel; -import com.vaadin.ui.UI.LegacyWindow; import com.vaadin.ui.Table; +import com.vaadin.ui.UI.LegacyWindow; import com.vaadin.ui.VerticalLayout; import com.vaadin.ui.Window; diff --git a/uitest/src/com/vaadin/tests/components/window/WindowScrollingUp.java b/uitest/src/com/vaadin/tests/components/window/WindowScrollingUp.java index 5f55ad8cf3..2d2e9eec48 100644 --- a/uitest/src/com/vaadin/tests/components/window/WindowScrollingUp.java +++ b/uitest/src/com/vaadin/tests/components/window/WindowScrollingUp.java @@ -3,8 +3,8 @@ package com.vaadin.tests.components.window; import com.vaadin.tests.components.AbstractTestCase; import com.vaadin.ui.Button; import com.vaadin.ui.Button.ClickEvent; -import com.vaadin.ui.UI.LegacyWindow; import com.vaadin.ui.Table; +import com.vaadin.ui.UI.LegacyWindow; public class WindowScrollingUp extends AbstractTestCase { |