aboutsummaryrefslogtreecommitdiffstats
path: root/uitest/src/com/vaadin/tests/components
diff options
context:
space:
mode:
authorLeif Åstrand <leif@vaadin.com>2012-11-21 13:45:18 +0200
committerLeif Åstrand <leif@vaadin.com>2012-11-21 13:45:18 +0200
commit3fc9f19534b7d1ab06fc73b146b9d31868c205c1 (patch)
tree1bffb8b9105fe8c150276c646f0ff119f9d6a565 /uitest/src/com/vaadin/tests/components
parent375024684a58c27657abb79ff63f92ce247437b5 (diff)
downloadvaadin-framework-3fc9f19534b7d1ab06fc73b146b9d31868c205c1.tar.gz
vaadin-framework-3fc9f19534b7d1ab06fc73b146b9d31868c205c1.zip
Global code cleanup
Change-Id: I14f46e6aa4f9cbdd9037f1c4ad1ac38fe7cbda86
Diffstat (limited to 'uitest/src/com/vaadin/tests/components')
-rw-r--r--uitest/src/com/vaadin/tests/components/AbstractComponentTest.java1
-rw-r--r--uitest/src/com/vaadin/tests/components/HierarchyChangeForRemovedComponentContainers.java1
-rw-r--r--uitest/src/com/vaadin/tests/components/absolutelayout/AbsoluteLayoutHideComponent.java1
-rw-r--r--uitest/src/com/vaadin/tests/components/button/ShortCutListenerModification.java1
-rw-r--r--uitest/src/com/vaadin/tests/components/combobox/GridLayoutComboBoxZoomOut.java3
-rw-r--r--uitest/src/com/vaadin/tests/components/datefield/PopupDateFieldTextEnabled.java5
-rw-r--r--uitest/src/com/vaadin/tests/components/orderedlayout/InsertComponentInHorizontalLayout.java3
-rw-r--r--uitest/src/com/vaadin/tests/components/table/PropertyValueChange.java4
-rw-r--r--uitest/src/com/vaadin/tests/components/tabsheet/TabsheetShouldUpdateHeight.java1
-rw-r--r--uitest/src/com/vaadin/tests/components/tree/TreeIconUpdate.java2
-rw-r--r--uitest/src/com/vaadin/tests/components/ui/InitialFragmentEvent.java23
-rw-r--r--uitest/src/com/vaadin/tests/components/ui/UIsInMultipleTabs.java3
12 files changed, 26 insertions, 22 deletions
diff --git a/uitest/src/com/vaadin/tests/components/AbstractComponentTest.java b/uitest/src/com/vaadin/tests/components/AbstractComponentTest.java
index 0cde43119a..f36437326a 100644
--- a/uitest/src/com/vaadin/tests/components/AbstractComponentTest.java
+++ b/uitest/src/com/vaadin/tests/components/AbstractComponentTest.java
@@ -14,7 +14,6 @@ import com.vaadin.event.FieldEvents.BlurNotifier;
import com.vaadin.event.FieldEvents.FocusEvent;
import com.vaadin.event.FieldEvents.FocusListener;
import com.vaadin.event.FieldEvents.FocusNotifier;
-import com.vaadin.server.ErrorEvent;
import com.vaadin.server.Resource;
import com.vaadin.server.ThemeResource;
import com.vaadin.tests.util.Log;
diff --git a/uitest/src/com/vaadin/tests/components/HierarchyChangeForRemovedComponentContainers.java b/uitest/src/com/vaadin/tests/components/HierarchyChangeForRemovedComponentContainers.java
index db6ff9f537..4a9c46409e 100644
--- a/uitest/src/com/vaadin/tests/components/HierarchyChangeForRemovedComponentContainers.java
+++ b/uitest/src/com/vaadin/tests/components/HierarchyChangeForRemovedComponentContainers.java
@@ -7,7 +7,6 @@ import com.vaadin.ui.VerticalLayout;
public class HierarchyChangeForRemovedComponentContainers extends TestBase {
-
private HorizontalLayout mainContent;
private VerticalLayout lo2;
diff --git a/uitest/src/com/vaadin/tests/components/absolutelayout/AbsoluteLayoutHideComponent.java b/uitest/src/com/vaadin/tests/components/absolutelayout/AbsoluteLayoutHideComponent.java
index b08d27eefa..eba39499cd 100644
--- a/uitest/src/com/vaadin/tests/components/absolutelayout/AbsoluteLayoutHideComponent.java
+++ b/uitest/src/com/vaadin/tests/components/absolutelayout/AbsoluteLayoutHideComponent.java
@@ -74,6 +74,7 @@ public class AbsoluteLayoutHideComponent extends AbstractTestUI {
btnLogin.setWidth("-1px");
btnLogin.setHeight("-1px");
btnLogin.addClickListener(new Button.ClickListener() {
+ @Override
public void buttonClick(Button.ClickEvent event) {
login();
}
diff --git a/uitest/src/com/vaadin/tests/components/button/ShortCutListenerModification.java b/uitest/src/com/vaadin/tests/components/button/ShortCutListenerModification.java
index 646b8f67f7..51ca47b4b7 100644
--- a/uitest/src/com/vaadin/tests/components/button/ShortCutListenerModification.java
+++ b/uitest/src/com/vaadin/tests/components/button/ShortCutListenerModification.java
@@ -2,7 +2,6 @@ package com.vaadin.tests.components.button;
import com.vaadin.event.ShortcutAction.KeyCode;
import com.vaadin.event.ShortcutAction.ModifierKey;
-import com.vaadin.server.ErrorEvent;
import com.vaadin.tests.components.TestBase;
import com.vaadin.ui.Button;
import com.vaadin.ui.Button.ClickEvent;
diff --git a/uitest/src/com/vaadin/tests/components/combobox/GridLayoutComboBoxZoomOut.java b/uitest/src/com/vaadin/tests/components/combobox/GridLayoutComboBoxZoomOut.java
index 410b5c17ad..c2c3703ee4 100644
--- a/uitest/src/com/vaadin/tests/components/combobox/GridLayoutComboBoxZoomOut.java
+++ b/uitest/src/com/vaadin/tests/components/combobox/GridLayoutComboBoxZoomOut.java
@@ -12,8 +12,7 @@ public class GridLayoutComboBoxZoomOut extends AbstractTestCase {
@Override
public void init() {
- LegacyWindow mainWindow = new LegacyWindow(
- "Gridlayoutbug Application");
+ LegacyWindow mainWindow = new LegacyWindow("Gridlayoutbug Application");
setMainWindow(mainWindow);
Label description = new Label(
diff --git a/uitest/src/com/vaadin/tests/components/datefield/PopupDateFieldTextEnabled.java b/uitest/src/com/vaadin/tests/components/datefield/PopupDateFieldTextEnabled.java
index 731869f668..1ba6409a6f 100644
--- a/uitest/src/com/vaadin/tests/components/datefield/PopupDateFieldTextEnabled.java
+++ b/uitest/src/com/vaadin/tests/components/datefield/PopupDateFieldTextEnabled.java
@@ -9,6 +9,7 @@ public class PopupDateFieldTextEnabled extends TestBase {
private static final String ENABLED = "DateField text box enabled";
private static final String DISABLED = "DateField text box disabled";
+
@Override
public void setup() {
final PopupDateField field = new PopupDateField();
@@ -19,9 +20,9 @@ public class PopupDateFieldTextEnabled extends TestBase {
public void valueChange(Property.ValueChangeEvent event) {
field.setTextFieldEnabled((Boolean) event.getProperty()
.getValue());
- if(field.isTextFieldEnabled()){
+ if (field.isTextFieldEnabled()) {
box.setCaption(ENABLED);
- }else{
+ } else {
box.setCaption(DISABLED);
}
}
diff --git a/uitest/src/com/vaadin/tests/components/orderedlayout/InsertComponentInHorizontalLayout.java b/uitest/src/com/vaadin/tests/components/orderedlayout/InsertComponentInHorizontalLayout.java
index 7ddaabd60e..0849980384 100644
--- a/uitest/src/com/vaadin/tests/components/orderedlayout/InsertComponentInHorizontalLayout.java
+++ b/uitest/src/com/vaadin/tests/components/orderedlayout/InsertComponentInHorizontalLayout.java
@@ -22,7 +22,6 @@ import com.vaadin.ui.Button.ClickEvent;
import com.vaadin.ui.Button.ClickListener;
import com.vaadin.ui.ComboBox;
import com.vaadin.ui.Component;
-import com.vaadin.ui.ComponentContainer;
import com.vaadin.ui.HorizontalLayout;
import com.vaadin.ui.VerticalLayout;
@@ -56,7 +55,7 @@ public class InsertComponentInHorizontalLayout extends AbstractTestUI {
@Override
protected void setup(VaadinRequest request) {
- setContent((ComponentContainer) getTestLayout());
+ setContent(getTestLayout());
}
@Override
diff --git a/uitest/src/com/vaadin/tests/components/table/PropertyValueChange.java b/uitest/src/com/vaadin/tests/components/table/PropertyValueChange.java
index e85bfc55a7..1e3c058458 100644
--- a/uitest/src/com/vaadin/tests/components/table/PropertyValueChange.java
+++ b/uitest/src/com/vaadin/tests/components/table/PropertyValueChange.java
@@ -49,8 +49,8 @@ public class PropertyValueChange extends TestBase {
Object columnId) {
final Label l = new Label();
@SuppressWarnings("unchecked")
- final Property<Integer> integer = (Property<Integer>) source
- .getContainerProperty(itemId, "integer");
+ final Property<Integer> integer = source.getContainerProperty(
+ itemId, "integer");
l.setValue(String.valueOf(getMultipliedValue(integer)));
// we must hook value change listener to ensure updates in all use
diff --git a/uitest/src/com/vaadin/tests/components/tabsheet/TabsheetShouldUpdateHeight.java b/uitest/src/com/vaadin/tests/components/tabsheet/TabsheetShouldUpdateHeight.java
index af0cd8b49b..f1a53eca60 100644
--- a/uitest/src/com/vaadin/tests/components/tabsheet/TabsheetShouldUpdateHeight.java
+++ b/uitest/src/com/vaadin/tests/components/tabsheet/TabsheetShouldUpdateHeight.java
@@ -26,6 +26,7 @@ public class TabsheetShouldUpdateHeight extends TestBase {
final Button btnSwitch = new Button("switch to Tab2",
new Button.ClickListener() {
+ @Override
public void buttonClick(final ClickEvent inEvent) {
tabsOuter.setSelectedTab(tabsInner);
tabsInner.setSelectedTab(tab2);
diff --git a/uitest/src/com/vaadin/tests/components/tree/TreeIconUpdate.java b/uitest/src/com/vaadin/tests/components/tree/TreeIconUpdate.java
index 8e0eac801d..6580133645 100644
--- a/uitest/src/com/vaadin/tests/components/tree/TreeIconUpdate.java
+++ b/uitest/src/com/vaadin/tests/components/tree/TreeIconUpdate.java
@@ -41,6 +41,7 @@ public class TreeIconUpdate extends TestBase {
Button button = new Button("Change icon", new ClickListener() {
+ @Override
public void buttonClick(ClickEvent event) {
tree.getItem("bar0").getItemProperty("icon").setValue(ICON2);
}
@@ -49,6 +50,7 @@ public class TreeIconUpdate extends TestBase {
addComponent(button);
button = new Button("Change caption", new ClickListener() {
+ @Override
public void buttonClick(ClickEvent event) {
tree.getItem("bar0").getItemProperty("name").setValue("foo");
}
diff --git a/uitest/src/com/vaadin/tests/components/ui/InitialFragmentEvent.java b/uitest/src/com/vaadin/tests/components/ui/InitialFragmentEvent.java
index c9788b8540..ce8ca8e083 100644
--- a/uitest/src/com/vaadin/tests/components/ui/InitialFragmentEvent.java
+++ b/uitest/src/com/vaadin/tests/components/ui/InitialFragmentEvent.java
@@ -15,19 +15,23 @@ public class InitialFragmentEvent extends AbstractTestUI {
@Override
protected void setup(VaadinRequest request) {
- getPage().addUriFragmentChangedListener(new UriFragmentChangedListener() {
-
- public void uriFragmentChanged(UriFragmentChangedEvent source) {
- String newFragment = source.getUriFragment();
- log.log("Fragment changed from " + lastKnownFragment + " to "
- + newFragment);
- lastKnownFragment = newFragment;
- }
- });
+ getPage().addUriFragmentChangedListener(
+ new UriFragmentChangedListener() {
+
+ @Override
+ public void uriFragmentChanged(
+ UriFragmentChangedEvent source) {
+ String newFragment = source.getUriFragment();
+ log.log("Fragment changed from " + lastKnownFragment
+ + " to " + newFragment);
+ lastKnownFragment = newFragment;
+ }
+ });
addComponent(log);
addComponent(new Button("Set fragment to 'foo'",
new Button.ClickListener() {
+ @Override
public void buttonClick(ClickEvent event) {
setFragment("foo");
}
@@ -35,6 +39,7 @@ public class InitialFragmentEvent extends AbstractTestUI {
addComponent(new Button("Set fragment to 'bar'",
new Button.ClickListener() {
+ @Override
public void buttonClick(ClickEvent event) {
setFragment("bar");
}
diff --git a/uitest/src/com/vaadin/tests/components/ui/UIsInMultipleTabs.java b/uitest/src/com/vaadin/tests/components/ui/UIsInMultipleTabs.java
index 49b8472a7a..25bf40edde 100644
--- a/uitest/src/com/vaadin/tests/components/ui/UIsInMultipleTabs.java
+++ b/uitest/src/com/vaadin/tests/components/ui/UIsInMultipleTabs.java
@@ -18,8 +18,7 @@ public class UIsInMultipleTabs extends AbstractTestUIProvider {
public static class TabUI extends UI {
@Override
protected void init(VaadinRequest request) {
- VaadinSession application = VaadinSession
- .getCurrent();
+ VaadinSession application = VaadinSession.getCurrent();
AtomicInteger count = numberOfUIsOpened.get(application);
if (count == null) {
numberOfUIsOpened.putIfAbsent(application, new AtomicInteger());