diff options
author | Leif Åstrand <leif@vaadin.com> | 2013-04-05 16:53:19 +0300 |
---|---|---|
committer | Vaadin Code Review <review@vaadin.com> | 2013-04-05 14:01:47 +0000 |
commit | c926a09f54cd08856c8cd7a15fd00cf0b62b63b5 (patch) | |
tree | d316521846d1ad38efed6f99ae0b218d7dacf22c /uitest | |
parent | fc2e1dfa9e39944c1008d0572ba7cb7c639109bb (diff) | |
download | vaadin-framework-c926a09f54cd08856c8cd7a15fd00cf0b62b63b5.tar.gz vaadin-framework-c926a09f54cd08856c8cd7a15fd00cf0b62b63b5.zip |
Global code reformat
Change-Id: I4b3c74ede518aa2712038d1451974a93cdecabc2
Diffstat (limited to 'uitest')
44 files changed, 163 insertions, 49 deletions
diff --git a/uitest/src/com/vaadin/launcher/DevelopmentServerLauncher.java b/uitest/src/com/vaadin/launcher/DevelopmentServerLauncher.java index 444a70348c..ad372bd5bc 100644 --- a/uitest/src/com/vaadin/launcher/DevelopmentServerLauncher.java +++ b/uitest/src/com/vaadin/launcher/DevelopmentServerLauncher.java @@ -58,8 +58,9 @@ public class DevelopmentServerLauncher { // Pass-through of arguments for Jetty final Map<String, String> serverArgs = parseArguments(args); - if (!serverArgs.containsKey("shutdownPort")) + if (!serverArgs.containsKey("shutdownPort")) { serverArgs.put("shutdownPort", "8889"); + } int port = Integer.parseInt(serverArgs.get("shutdownPort")); if (port > 0) { diff --git a/uitest/src/com/vaadin/tests/components/button/ButtonWithShortcutNotRendered.java b/uitest/src/com/vaadin/tests/components/button/ButtonWithShortcutNotRendered.java index b01e0a85d0..f866928054 100644 --- a/uitest/src/com/vaadin/tests/components/button/ButtonWithShortcutNotRendered.java +++ b/uitest/src/com/vaadin/tests/components/button/ButtonWithShortcutNotRendered.java @@ -83,6 +83,7 @@ public class ButtonWithShortcutNotRendered extends AbstractTestUI { addValueChangeListener(new Property.ValueChangeListener() { + @Override public void valueChange( com.vaadin.data.Property.ValueChangeEvent event) { final Item item = getItem(getValue()); @@ -162,6 +163,7 @@ public class ButtonWithShortcutNotRendered extends AbstractTestUI { } } + @Override public void buttonClick(ClickEvent event) { // NOP } diff --git a/uitest/src/com/vaadin/tests/components/calendar/BeanItemContainerTestUI.java b/uitest/src/com/vaadin/tests/components/calendar/BeanItemContainerTestUI.java index 4e0b963534..83fc4a03cb 100644 --- a/uitest/src/com/vaadin/tests/components/calendar/BeanItemContainerTestUI.java +++ b/uitest/src/com/vaadin/tests/components/calendar/BeanItemContainerTestUI.java @@ -85,6 +85,7 @@ public class BeanItemContainerTestUI extends UI { private final Action EDIT = new Action("Edit event"); private final Action REMOVE = new Action("Remove event"); + @Override public void handleAction(Action action, Object sender, Object target) { if (action == ADD) { BasicEvent event = new BasicEvent(); @@ -98,6 +99,7 @@ public class BeanItemContainerTestUI extends UI { } } + @Override public Action[] getActions(Object target, Object sender) { if (target == null) { return new Action[] { ADD }; @@ -153,6 +155,7 @@ public class BeanItemContainerTestUI extends UI { ContainerEventProvider.ENDDATE_PROPERTY))); modal.setContent(formLayout); modal.addCloseListener(new Window.CloseListener() { + @Override public void windowClose(CloseEvent e) { // Commit changes to bean try { diff --git a/uitest/src/com/vaadin/tests/components/calendar/CalendarActionsUI.java b/uitest/src/com/vaadin/tests/components/calendar/CalendarActionsUI.java index f5c2d9da7e..ee898e0790 100644 --- a/uitest/src/com/vaadin/tests/components/calendar/CalendarActionsUI.java +++ b/uitest/src/com/vaadin/tests/components/calendar/CalendarActionsUI.java @@ -57,6 +57,7 @@ public class CalendarActionsUI extends UI { * com.vaadin.event.Action.Handler#handleAction(com.vaadin.event * .Action, java.lang.Object, java.lang.Object) */ + @Override public void handleAction(Action action, Object sender, Object target) { Date date = (Date) target; if (action == NEW_EVENT) { @@ -72,6 +73,7 @@ public class CalendarActionsUI extends UI { * @see com.vaadin.event.Action.Handler#getActions(java.lang.Object, * java.lang.Object) */ + @Override public Action[] getActions(Object target, Object sender) { CalendarDateRange date = (CalendarDateRange) target; @@ -96,6 +98,7 @@ public class CalendarActionsUI extends UI { content.addComponent(new Button("Set week view", new Button.ClickListener() { + @Override public void buttonClick(ClickEvent event) { calendar.setEndDate(new Date(100, 1, 7)); } diff --git a/uitest/src/com/vaadin/tests/components/calendar/CalendarTest.java b/uitest/src/com/vaadin/tests/components/calendar/CalendarTest.java index 530e47f1e0..a1bcca2e4e 100644 --- a/uitest/src/com/vaadin/tests/components/calendar/CalendarTest.java +++ b/uitest/src/com/vaadin/tests/components/calendar/CalendarTest.java @@ -260,9 +260,9 @@ public class CalendarTest extends UI { private void addInitialEvents() { Date originalDate = calendar.getTime(); Date today = getToday(); - + // Add a event that last a whole week - + Date start = resolveFirstDateOfWeek(today, calendar); Date end = resolveLastDateOfWeek(today, calendar); CalendarTestEvent event = getNewEvent("Whole week event", start, end); @@ -388,6 +388,7 @@ public class CalendarTest extends UI { private static final long serialVersionUID = 1L; + @Override public void buttonClick(ClickEvent event) { switchToMonthView(); } @@ -397,6 +398,7 @@ public class CalendarTest extends UI { private static final long serialVersionUID = 1L; + @Override public void buttonClick(ClickEvent event) { // simulate week click WeekClickHandler handler = (WeekClickHandler) calendarComponent @@ -410,6 +412,7 @@ public class CalendarTest extends UI { nextButton = new Button("Next", new Button.ClickListener() { private static final long serialVersionUID = 1L; + @Override public void buttonClick(ClickEvent event) { handleNextButtonClick(); } @@ -418,6 +421,7 @@ public class CalendarTest extends UI { prevButton = new Button("Prev", new Button.ClickListener() { private static final long serialVersionUID = 1L; + @Override public void buttonClick(ClickEvent event) { handlePreviousButtonClick(); } @@ -488,6 +492,7 @@ public class CalendarTest extends UI { private static final long serialVersionUID = -8307244759142541067L; + @Override public void buttonClick(ClickEvent event) { Date start = getToday(); start.setHours(0); @@ -512,6 +517,7 @@ public class CalendarTest extends UI { private static final long serialVersionUID = -7104996493482558021L; + @Override public void valueChange(ValueChangeEvent event) { Object value = event.getProperty().getValue(); if (value instanceof Boolean && Boolean.TRUE.equals(value)) { @@ -675,6 +681,7 @@ public class CalendarTest extends UI { calendarComponent.setHandler(new EventClickHandler() { + @Override public void eventClick(EventClick event) { showEventPopup(event.getCalendarEvent(), false); } @@ -693,6 +700,7 @@ public class CalendarTest extends UI { calendarComponent.setHandler(new RangeSelectHandler() { + @Override public void rangeSelect(RangeSelectEvent event) { handleRangeSelect(event); } @@ -725,6 +733,7 @@ public class CalendarTest extends UI { private static final long serialVersionUID = 1L; + @Override public void valueChange(ValueChangeEvent event) { updateCalendarTimeZone(event.getProperty().getValue()); @@ -752,6 +761,7 @@ public class CalendarTest extends UI { private static final long serialVersionUID = 1L; + @Override public void valueChange(ValueChangeEvent event) { updateCalendarFormat(event.getProperty().getValue()); } @@ -779,6 +789,7 @@ public class CalendarTest extends UI { private static final long serialVersionUID = 1L; + @Override public void valueChange(ValueChangeEvent event) { updateCalendarLocale((Locale) event.getProperty().getValue()); } @@ -933,6 +944,7 @@ public class CalendarTest extends UI { private static final long serialVersionUID = 1L; + @Override public void buttonClick(ClickEvent event) { try { commitCalendarEvent(); @@ -945,6 +957,7 @@ public class CalendarTest extends UI { private static final long serialVersionUID = 1L; + @Override public void buttonClick(ClickEvent event) { discardCalendarEvent(); } @@ -953,6 +966,7 @@ public class CalendarTest extends UI { private static final long serialVersionUID = 1L; + @Override public void buttonClick(ClickEvent event) { deleteCalendarEvent(); } @@ -961,6 +975,7 @@ public class CalendarTest extends UI { private static final long serialVersionUID = 1L; + @Override public void windowClose(Window.CloseEvent e) { discardCalendarEvent(); } diff --git a/uitest/src/com/vaadin/tests/components/calendar/NotificationTestUI.java b/uitest/src/com/vaadin/tests/components/calendar/NotificationTestUI.java index 0bd327da18..6e5718a652 100644 --- a/uitest/src/com/vaadin/tests/components/calendar/NotificationTestUI.java +++ b/uitest/src/com/vaadin/tests/components/calendar/NotificationTestUI.java @@ -50,6 +50,7 @@ public class NotificationTestUI extends UI { events.add(e); } + @Override public List<CalendarEvent> getEvents(Date startDate, Date endDate) { return events; } @@ -64,6 +65,7 @@ public class NotificationTestUI extends UI { setContent(content); final Button btn = new Button("Show working notification", new Button.ClickListener() { + @Override public void buttonClick(ClickEvent event) { Notification .show("This will disappear when you move your mouse!"); @@ -76,6 +78,7 @@ public class NotificationTestUI extends UI { cal.setLocale(Locale.US); cal.setSizeFull(); cal.setHandler(new DateClickHandler() { + @Override public void dateClick(DateClickEvent event) { provider.addEvent(event.getDate()); Notification diff --git a/uitest/src/com/vaadin/tests/components/checkbox/CheckBoxRevertValueChange.java b/uitest/src/com/vaadin/tests/components/checkbox/CheckBoxRevertValueChange.java index 5b086fb935..cc26cf8845 100644 --- a/uitest/src/com/vaadin/tests/components/checkbox/CheckBoxRevertValueChange.java +++ b/uitest/src/com/vaadin/tests/components/checkbox/CheckBoxRevertValueChange.java @@ -29,6 +29,7 @@ public class CheckBoxRevertValueChange extends AbstractTestUIWithLog { final CheckBox alwaysUnchecked = new CheckBox("You may not check me"); alwaysUnchecked .addValueChangeListener(new Property.ValueChangeListener() { + @Override public void valueChange(Property.ValueChangeEvent event) { if (alwaysUnchecked.getValue()) { log("I said no checking!"); @@ -40,6 +41,7 @@ public class CheckBoxRevertValueChange extends AbstractTestUIWithLog { alwaysChecked.setValue(true); alwaysChecked .addValueChangeListener(new Property.ValueChangeListener() { + @Override public void valueChange(Property.ValueChangeEvent event) { if (!alwaysChecked.getValue()) { log("I said no unchecking!"); diff --git a/uitest/src/com/vaadin/tests/components/combobox/ComboBoxDuplicateCaption.java b/uitest/src/com/vaadin/tests/components/combobox/ComboBoxDuplicateCaption.java index 3c1e8a27d6..bd71850a89 100644 --- a/uitest/src/com/vaadin/tests/components/combobox/ComboBoxDuplicateCaption.java +++ b/uitest/src/com/vaadin/tests/components/combobox/ComboBoxDuplicateCaption.java @@ -38,6 +38,7 @@ public class ComboBoxDuplicateCaption extends TestBase { box.setImmediate(true); box.addValueChangeListener(new ValueChangeListener() { + @Override public void valueChange( com.vaadin.data.Property.ValueChangeEvent event) { Person p = (Person) event.getProperty().getValue(); diff --git a/uitest/src/com/vaadin/tests/components/combobox/ComboBoxSQLContainerFilteredValueChange.java b/uitest/src/com/vaadin/tests/components/combobox/ComboBoxSQLContainerFilteredValueChange.java index 23a75ae56e..75010f0ea9 100644 --- a/uitest/src/com/vaadin/tests/components/combobox/ComboBoxSQLContainerFilteredValueChange.java +++ b/uitest/src/com/vaadin/tests/components/combobox/ComboBoxSQLContainerFilteredValueChange.java @@ -53,6 +53,7 @@ public class ComboBoxSQLContainerFilteredValueChange extends TestBase { myCombo.setWidth("100.0%"); myCombo.setHeight("-1px"); myCombo.addListener(new Property.ValueChangeListener() { + @Override public void valueChange(ValueChangeEvent event) { selectedLabel.setValue("Selected: " + event.getProperty().getValue()); @@ -72,6 +73,7 @@ public class ComboBoxSQLContainerFilteredValueChange extends TestBase { /** * (Re)creates the test table + * * @param connectionPool */ private void createTestTable(JDBCConnectionPool connectionPool) { @@ -97,6 +99,7 @@ public class ComboBoxSQLContainerFilteredValueChange extends TestBase { /** * Adds test data to the test table + * * @param connectionPool * @throws SQLException */ @@ -111,7 +114,7 @@ public class ComboBoxSQLContainerFilteredValueChange extends TestBase { statement.executeUpdate("INSERT INTO mytable VALUES(2, 'A1')"); statement.executeUpdate("INSERT INTO mytable VALUES(3, 'B0')"); statement.executeUpdate("INSERT INTO mytable VALUES(4, 'B1')"); - + statement.close(); conn.commit(); } catch (SQLException e) { diff --git a/uitest/src/com/vaadin/tests/components/orderedlayout/VerticalRelativeSizeWithoutExpand.java b/uitest/src/com/vaadin/tests/components/orderedlayout/VerticalRelativeSizeWithoutExpand.java index 86525da3ef..0ac9a008d2 100755 --- a/uitest/src/com/vaadin/tests/components/orderedlayout/VerticalRelativeSizeWithoutExpand.java +++ b/uitest/src/com/vaadin/tests/components/orderedlayout/VerticalRelativeSizeWithoutExpand.java @@ -1,4 +1,5 @@ package com.vaadin.tests.components.orderedlayout; + import com.vaadin.data.util.BeanItemContainer; import com.vaadin.server.VaadinRequest; import com.vaadin.ui.Panel; diff --git a/uitest/src/com/vaadin/tests/components/richtextarea/RichTextAreaEmptyString.java b/uitest/src/com/vaadin/tests/components/richtextarea/RichTextAreaEmptyString.java index 5eddf9dc6d..01dc10220f 100644 --- a/uitest/src/com/vaadin/tests/components/richtextarea/RichTextAreaEmptyString.java +++ b/uitest/src/com/vaadin/tests/components/richtextarea/RichTextAreaEmptyString.java @@ -29,6 +29,7 @@ public class RichTextAreaEmptyString extends TestBase { final Button b = new Button("get area value", new ClickListener() { + @Override public void buttonClick(ClickEvent event) { l.setValue(area.getValue()); } diff --git a/uitest/src/com/vaadin/tests/components/richtextarea/RichTextAreaPreventsTextFieldAccess.java b/uitest/src/com/vaadin/tests/components/richtextarea/RichTextAreaPreventsTextFieldAccess.java index f4ad149dd1..c3433c3054 100644 --- a/uitest/src/com/vaadin/tests/components/richtextarea/RichTextAreaPreventsTextFieldAccess.java +++ b/uitest/src/com/vaadin/tests/components/richtextarea/RichTextAreaPreventsTextFieldAccess.java @@ -50,6 +50,7 @@ public class RichTextAreaPreventsTextFieldAccess extends TestBase { Button addWindowButton = new Button("Open RichTextArea-Dialog"); addWindowButton.addClickListener(new Button.ClickListener() { + @Override public void buttonClick(ClickEvent event) { getMainWindow().addWindow(subWindow); @@ -60,6 +61,7 @@ public class RichTextAreaPreventsTextFieldAccess extends TestBase { Button removeWindowButton = new Button("removeWindowButton"); removeWindowButton.addClickListener(new Button.ClickListener() { + @Override public void buttonClick(ClickEvent event) { getMainWindow().removeWindow(subWindow); @@ -70,6 +72,7 @@ public class RichTextAreaPreventsTextFieldAccess extends TestBase { Button focusButton = new Button("Set focus on TextField"); focusButton.addClickListener(new Button.ClickListener() { + @Override public void buttonClick(ClickEvent event) { testField.focus(); @@ -80,6 +83,7 @@ public class RichTextAreaPreventsTextFieldAccess extends TestBase { Button removeRTA = new Button("Remove RTA"); removeRTA.addClickListener(new Button.ClickListener() { + @Override public void buttonClick(ClickEvent event) { wLayout.removeComponent(rText); diff --git a/uitest/src/com/vaadin/tests/components/select/OptionGroupBaseSelects.java b/uitest/src/com/vaadin/tests/components/select/OptionGroupBaseSelects.java index f2dee69cbf..0df82688d1 100644 --- a/uitest/src/com/vaadin/tests/components/select/OptionGroupBaseSelects.java +++ b/uitest/src/com/vaadin/tests/components/select/OptionGroupBaseSelects.java @@ -29,6 +29,7 @@ public class OptionGroupBaseSelects extends ComponentTestCase<HorizontalLayout> CheckBox cb = new CheckBox("Switch Selects ReadOnly", false); cb.addListener(new ValueChangeListener() { + @Override public void valueChange(ValueChangeEvent event) { for (Iterator<Component> it = layout.getComponentIterator(); it .hasNext();) { @@ -42,6 +43,7 @@ public class OptionGroupBaseSelects extends ComponentTestCase<HorizontalLayout> CheckBox cb2 = new CheckBox("Switch Selects Enabled", true); cb2.addListener(new ValueChangeListener() { + @Override public void valueChange(ValueChangeEvent event) { for (Iterator<Component> it = layout.getComponentIterator(); it .hasNext();) { diff --git a/uitest/src/com/vaadin/tests/components/table/EmptyRowsWhenScrolling.java b/uitest/src/com/vaadin/tests/components/table/EmptyRowsWhenScrolling.java index c1ae9b4118..3bc0d3dd1f 100644 --- a/uitest/src/com/vaadin/tests/components/table/EmptyRowsWhenScrolling.java +++ b/uitest/src/com/vaadin/tests/components/table/EmptyRowsWhenScrolling.java @@ -93,6 +93,7 @@ public class EmptyRowsWhenScrolling extends UI { table.setVisibleColumns(new String[] { "image", "id", "col1", "col2", "col3", "col4" }); table.addGeneratedColumn("image", new ColumnGenerator() { + @Override public Object generateCell(Table source, Object itemId, Object columnId) { int imgNum = new Random().nextInt(5) + 1; @@ -112,6 +113,7 @@ public class EmptyRowsWhenScrolling extends UI { image.setWidth("50px"); image.setHeight("50px"); image.addClickListener(new com.vaadin.event.MouseEvents.ClickListener() { + @Override public void click( com.vaadin.event.MouseEvents.ClickEvent event) { Notification.show("Image clicked!"); @@ -123,6 +125,7 @@ public class EmptyRowsWhenScrolling extends UI { // Refresh table button getBtnRefreshTable().addClickListener(new ClickListener() { + @Override public void buttonClick(ClickEvent event) { table.refreshRowCache(); } diff --git a/uitest/src/com/vaadin/tests/components/table/LargeSelectionCausesNPE.java b/uitest/src/com/vaadin/tests/components/table/LargeSelectionCausesNPE.java index fb782b8ded..b6ee62ea59 100644 --- a/uitest/src/com/vaadin/tests/components/table/LargeSelectionCausesNPE.java +++ b/uitest/src/com/vaadin/tests/components/table/LargeSelectionCausesNPE.java @@ -105,6 +105,7 @@ public class LargeSelectionCausesNPE extends TestBase { } Table.ValueChangeListener valueChangeListener = new Table.ValueChangeListener() { + @Override public void valueChange(ValueChangeEvent event) { // in multiselect mode, a Set of itemIds is returned, // in singleselect mode the itemId is returned directly @@ -119,6 +120,7 @@ public class LargeSelectionCausesNPE extends TestBase { Button.ClickListener clickListener = new Button.ClickListener() { + @Override public void buttonClick(ClickEvent event) { Property nameProperty = table.getContainerProperty(0, NAME); if (("0").equals(nameLabel.getValue())) { @@ -148,6 +150,7 @@ public class LargeSelectionCausesNPE extends TestBase { ColumnGenerator columnGenerator = new ColumnGenerator() { + @Override public Object generateCell(Table source, Object itemId, Object columnId) { Label label = new Label(); diff --git a/uitest/src/com/vaadin/tests/components/table/TableColumnWidthsAndExpandRatios.java b/uitest/src/com/vaadin/tests/components/table/TableColumnWidthsAndExpandRatios.java index 747c99468f..b1ecb3fc10 100644 --- a/uitest/src/com/vaadin/tests/components/table/TableColumnWidthsAndExpandRatios.java +++ b/uitest/src/com/vaadin/tests/components/table/TableColumnWidthsAndExpandRatios.java @@ -38,10 +38,11 @@ public class TableColumnWidthsAndExpandRatios extends TestBase { return new NativeButton("Reset " + property + " width", new Button.ClickListener() { - public void buttonClick(ClickEvent event) { - table.setColumnWidth(property, -1); - } - }); + @Override + public void buttonClick(ClickEvent event) { + table.setColumnWidth(property, -1); + } + }); } @Override diff --git a/uitest/src/com/vaadin/tests/components/table/TableInSubWindowMemoryLeak.java b/uitest/src/com/vaadin/tests/components/table/TableInSubWindowMemoryLeak.java index dcaabf98d6..c0c8876fca 100644 --- a/uitest/src/com/vaadin/tests/components/table/TableInSubWindowMemoryLeak.java +++ b/uitest/src/com/vaadin/tests/components/table/TableInSubWindowMemoryLeak.java @@ -20,6 +20,7 @@ public class TableInSubWindowMemoryLeak extends TestBase { final Button openButton = new Button("open me"); openButton.addClickListener(new ClickListener() { + @Override public void buttonClick(final ClickEvent event) { final Window window = new Window("Simple Window"); window.setModal(true); @@ -29,6 +30,7 @@ public class TableInSubWindowMemoryLeak extends TestBase { window.setContent(table); UI.getCurrent().addWindow(window); window.addCloseListener(new CloseListener() { + @Override public void windowClose(final CloseEvent e) { window.setContent(new Label()); UI.getCurrent().removeWindow(window); @@ -40,6 +42,7 @@ public class TableInSubWindowMemoryLeak extends TestBase { final Button openButton2 = new Button("open me without Table"); openButton2.addClickListener(new ClickListener() { + @Override public void buttonClick(final ClickEvent event) { final Window window = new Window("Simple Window"); window.setModal(true); @@ -47,6 +50,7 @@ public class TableInSubWindowMemoryLeak extends TestBase { window.setWidth("200px"); UI.getCurrent().addWindow(window); window.addCloseListener(new CloseListener() { + @Override public void windowClose(final CloseEvent e) { UI.getCurrent().removeWindow(window); } diff --git a/uitest/src/com/vaadin/tests/components/table/TableRowScrolledBottom.java b/uitest/src/com/vaadin/tests/components/table/TableRowScrolledBottom.java index 9823fc1859..7d48dfa11e 100644 --- a/uitest/src/com/vaadin/tests/components/table/TableRowScrolledBottom.java +++ b/uitest/src/com/vaadin/tests/components/table/TableRowScrolledBottom.java @@ -5,7 +5,6 @@ import com.vaadin.tests.components.TestBase; import com.vaadin.ui.Button; import com.vaadin.ui.Label; import com.vaadin.ui.Table; -import com.vaadin.ui.VerticalLayout; public class TableRowScrolledBottom extends TestBase { diff --git a/uitest/src/com/vaadin/tests/components/table/TableWithBrokenGeneratorAndContainer.java b/uitest/src/com/vaadin/tests/components/table/TableWithBrokenGeneratorAndContainer.java index 9c5ce9dc0c..efa1b1bdab 100644 --- a/uitest/src/com/vaadin/tests/components/table/TableWithBrokenGeneratorAndContainer.java +++ b/uitest/src/com/vaadin/tests/components/table/TableWithBrokenGeneratorAndContainer.java @@ -78,6 +78,7 @@ public class TableWithBrokenGeneratorAndContainer extends TestBase { this.brokenInterval = brokenInterval; } + @Override public Object generateCell(Table source, Object itemId, Object columnId) { if (counter++ % brokenInterval == 0 && Boolean.TRUE.equals(brokenGenerator.getValue())) { @@ -97,6 +98,7 @@ public class TableWithBrokenGeneratorAndContainer extends TestBase { clearTableOnError.setImmediate(true); clearTableOnError.addValueChangeListener(new ValueChangeListener() { + @Override public void valueChange(ValueChangeEvent event) { Boolean value = clearTableOnError.getValue(); setErrorHandler(value != null ? value : false); @@ -110,6 +112,7 @@ public class TableWithBrokenGeneratorAndContainer extends TestBase { Button refreshTableCache = new Button("Refresh table cache", new Button.ClickListener() { + @Override public void buttonClick(ClickEvent event) { table.markAsDirty(); table.refreshRowCache(); diff --git a/uitest/src/com/vaadin/tests/components/table/ValueAfterClearingContainer.java b/uitest/src/com/vaadin/tests/components/table/ValueAfterClearingContainer.java index f378c146ea..b0622e748c 100644 --- a/uitest/src/com/vaadin/tests/components/table/ValueAfterClearingContainer.java +++ b/uitest/src/com/vaadin/tests/components/table/ValueAfterClearingContainer.java @@ -26,6 +26,7 @@ public class ValueAfterClearingContainer extends TestBase { table.setImmediate(true); table.addValueChangeListener(new ValueChangeListener() { + @Override public void valueChange(ValueChangeEvent event) { log.log("Value changed to " + event.getProperty().getValue()); } @@ -38,6 +39,7 @@ public class ValueAfterClearingContainer extends TestBase { multiselect.setId("multiselect"); multiselect.addValueChangeListener(new ValueChangeListener() { + @Override public void valueChange(ValueChangeEvent event) { Boolean value = multiselect.getValue(); table.setMultiSelect(value == null ? false : value); @@ -46,6 +48,7 @@ public class ValueAfterClearingContainer extends TestBase { addComponent(multiselect); Button addItemsButton = new Button("Add table items", new Button.ClickListener() { + @Override public void buttonClick(ClickEvent event) { if (!table.getItemIds().isEmpty()) { Notification @@ -65,6 +68,7 @@ public class ValueAfterClearingContainer extends TestBase { Button showValueButton = new Button("Show value", new Button.ClickListener() { + @Override public void buttonClick(ClickEvent event) { log.log("Table selection: " + table.getValue()); } @@ -74,6 +78,7 @@ public class ValueAfterClearingContainer extends TestBase { Button removeItemsFromTableButton = new Button( "Remove items from table", new Button.ClickListener() { + @Override public void buttonClick(ClickEvent event) { table.removeAllItems(); } @@ -83,6 +88,7 @@ public class ValueAfterClearingContainer extends TestBase { Button removeItemsFromContainerButton = new Button( "Remove items from container", new Button.ClickListener() { + @Override public void buttonClick(ClickEvent event) { table.getContainerDataSource().removeAllItems(); } @@ -92,6 +98,7 @@ public class ValueAfterClearingContainer extends TestBase { Button removeItemsFromContainerAndSanitizeButton = new Button( "Remove items from container and sanitize", new Button.ClickListener() { + @Override public void buttonClick(ClickEvent event) { table.getContainerDataSource().removeAllItems(); table.sanitizeSelection(); @@ -102,6 +109,7 @@ public class ValueAfterClearingContainer extends TestBase { addComponent(removeItemsFromContainerAndSanitizeButton); Button removeSelectedFromTableButton = new Button( "Remove selected item from table", new Button.ClickListener() { + @Override public void buttonClick(ClickEvent event) { Object selection = table.getValue(); if (selection == null) { @@ -117,6 +125,7 @@ public class ValueAfterClearingContainer extends TestBase { Button removeSelectedFromContainer = new Button( "Remove selected item from container", new Button.ClickListener() { + @Override public void buttonClick(ClickEvent event) { Object selection = table.getValue(); if (selection == null) { diff --git a/uitest/src/com/vaadin/tests/components/table/ViewPortCalculation.java b/uitest/src/com/vaadin/tests/components/table/ViewPortCalculation.java index 878dd0d3c4..de32ea1fc0 100644 --- a/uitest/src/com/vaadin/tests/components/table/ViewPortCalculation.java +++ b/uitest/src/com/vaadin/tests/components/table/ViewPortCalculation.java @@ -43,6 +43,7 @@ public class ViewPortCalculation extends TestBase { } table.setCellStyleGenerator(new CellStyleGenerator() { + @Override public String getStyle(Table source, Object itemId, Object propertyId) { if (itemId.equals(lastDoubleClickedItemId)) { @@ -53,6 +54,7 @@ public class ViewPortCalculation extends TestBase { }); table.addItemClickListener(new ItemClickListener() { + @Override public void itemClick(ItemClickEvent event) { if (event.isDoubleClick()) { lastDoubleClickedItemId = event.getItemId(); diff --git a/uitest/src/com/vaadin/tests/components/tabsheet/ExtraScrollbarsInTabSheet.java b/uitest/src/com/vaadin/tests/components/tabsheet/ExtraScrollbarsInTabSheet.java index 2917eccbfb..fffc766e7c 100755 --- a/uitest/src/com/vaadin/tests/components/tabsheet/ExtraScrollbarsInTabSheet.java +++ b/uitest/src/com/vaadin/tests/components/tabsheet/ExtraScrollbarsInTabSheet.java @@ -1,4 +1,5 @@ package com.vaadin.tests.components.tabsheet;
+
import com.vaadin.annotations.Theme;
import com.vaadin.server.VaadinRequest;
import com.vaadin.ui.HorizontalSplitPanel;
diff --git a/uitest/src/com/vaadin/tests/components/tabsheet/HiddenTabSheetBrowserResize.java b/uitest/src/com/vaadin/tests/components/tabsheet/HiddenTabSheetBrowserResize.java index 0fdb579997..eac786d9b3 100644 --- a/uitest/src/com/vaadin/tests/components/tabsheet/HiddenTabSheetBrowserResize.java +++ b/uitest/src/com/vaadin/tests/components/tabsheet/HiddenTabSheetBrowserResize.java @@ -17,6 +17,7 @@ public class HiddenTabSheetBrowserResize extends TestBase { Button toggleButton = new Button("Toggle TabSheet", new Button.ClickListener() { + @Override public void buttonClick(ClickEvent event) { tabSheet.setVisible(!tabSheet.isVisible()); } diff --git a/uitest/src/com/vaadin/tests/components/textarea/ScrollCursor.java b/uitest/src/com/vaadin/tests/components/textarea/ScrollCursor.java index c95731d94f..154a30a64b 100644 --- a/uitest/src/com/vaadin/tests/components/textarea/ScrollCursor.java +++ b/uitest/src/com/vaadin/tests/components/textarea/ScrollCursor.java @@ -27,6 +27,7 @@ public class ScrollCursor extends TestBase { Button button = new Button("Scroll"); button.addListener(new ClickListener() { + @Override public void buttonClick(ClickEvent event) { textArea.setCursorPosition(getPosition()); } @@ -34,6 +35,7 @@ public class ScrollCursor extends TestBase { Button wrap = new Button("Set wrap"); wrap.addListener(new ClickListener() { + @Override public void buttonClick(ClickEvent event) { textArea.setWordwrap(false); } @@ -42,6 +44,7 @@ public class ScrollCursor extends TestBase { Button toBegin = new Button("To begin"); toBegin.addListener(new ClickListener() { + @Override public void buttonClick(ClickEvent event) { position = 3; } @@ -50,6 +53,7 @@ public class ScrollCursor extends TestBase { Button toMiddle = new Button("To middle"); toMiddle.addListener(new ClickListener() { + @Override public void buttonClick(ClickEvent event) { position = 130; } @@ -58,6 +62,7 @@ public class ScrollCursor extends TestBase { Button toEnd = new Button("To end"); toEnd.addListener(new ClickListener() { + @Override public void buttonClick(ClickEvent event) { position = textArea.getValue().toString().length(); } diff --git a/uitest/src/com/vaadin/tests/components/textfield/TextFieldMaxLengthRemovedFromDOM.java b/uitest/src/com/vaadin/tests/components/textfield/TextFieldMaxLengthRemovedFromDOM.java index 28ff20c174..049b08d4e8 100644 --- a/uitest/src/com/vaadin/tests/components/textfield/TextFieldMaxLengthRemovedFromDOM.java +++ b/uitest/src/com/vaadin/tests/components/textfield/TextFieldMaxLengthRemovedFromDOM.java @@ -17,6 +17,7 @@ public class TextFieldMaxLengthRemovedFromDOM extends TestBase { tf.addFocusListener(new FieldEvents.FocusListener() { + @Override public void focus(FocusEvent event) { // Resetting Max length should not remove maxlength attribute tf.setMaxLength(11); diff --git a/uitest/src/com/vaadin/tests/components/treetable/TreeTableCacheOnPartialUpdates.java b/uitest/src/com/vaadin/tests/components/treetable/TreeTableCacheOnPartialUpdates.java index f792a32f8f..85a69702a4 100644 --- a/uitest/src/com/vaadin/tests/components/treetable/TreeTableCacheOnPartialUpdates.java +++ b/uitest/src/com/vaadin/tests/components/treetable/TreeTableCacheOnPartialUpdates.java @@ -90,6 +90,7 @@ public class TreeTableCacheOnPartialUpdates extends TestBase { } public class Col4ColumnGenerator implements ColumnGenerator { + @Override public Component generateCell(final com.vaadin.ui.Table source, final Object itemId, Object columnId) { TestBean tb = (TestBean) itemId; @@ -98,6 +99,7 @@ public class TreeTableCacheOnPartialUpdates extends TestBase { btnCol4.setId("cacheTestButtonToggle-" + tb.getCol1() + "-" + tb.getCol2()); btnCol4.addClickListener(new Button.ClickListener() { + @Override public void buttonClick(ClickEvent event) { treeTable.setCollapsed(itemId, !treeTable.isCollapsed(itemId)); diff --git a/uitest/src/com/vaadin/tests/components/treetable/TreeTableExtraScrollbar.java b/uitest/src/com/vaadin/tests/components/treetable/TreeTableExtraScrollbar.java index 4af0da158d..79c967914f 100644 --- a/uitest/src/com/vaadin/tests/components/treetable/TreeTableExtraScrollbar.java +++ b/uitest/src/com/vaadin/tests/components/treetable/TreeTableExtraScrollbar.java @@ -49,6 +49,7 @@ public class TreeTableExtraScrollbar extends TestBase { button.setId("button"); button.addClickListener(new ClickListener() { + @Override public void buttonClick(ClickEvent event) { table.addItem(new TestObject("name 6-1", "value 6-1")); table.addItem(new TestObject("name 6-2", "value 6-2")); @@ -68,12 +69,14 @@ public class TreeTableExtraScrollbar extends TestBase { } private class EmptyColumnGenerator implements Table.ColumnGenerator { + @Override public Object generateCell(Table table, Object itemId, Object columnId) { return null; } } private class TypeColumnGenerator implements Table.ColumnGenerator { + @Override public Object generateCell(Table table, Object itemId, Object columnId) { if (itemId instanceof TestObject) { return new Label(((TestObject) itemId).getValue()); diff --git a/uitest/src/com/vaadin/tests/components/treetable/TreeTableExtraScrollbarWithChildren.java b/uitest/src/com/vaadin/tests/components/treetable/TreeTableExtraScrollbarWithChildren.java index cad33e242f..0dc98b2c2e 100644 --- a/uitest/src/com/vaadin/tests/components/treetable/TreeTableExtraScrollbarWithChildren.java +++ b/uitest/src/com/vaadin/tests/components/treetable/TreeTableExtraScrollbarWithChildren.java @@ -62,6 +62,7 @@ public class TreeTableExtraScrollbarWithChildren extends TestBase { button.setId("button"); button.addClickListener(new ClickListener() { + @Override public void buttonClick(ClickEvent event) { table.setCollapsed(parent, !table.isCollapsed(parent)); Notification.show("collapsed: " + table.isCollapsed(parent)); @@ -73,6 +74,7 @@ public class TreeTableExtraScrollbarWithChildren extends TestBase { } private class HierarchyColumnGenerator implements Table.ColumnGenerator { + @Override public Object generateCell(Table table, Object itemId, Object columnId) { Label label = new Label("this should be mostly hidden"); label.setSizeUndefined(); @@ -81,6 +83,7 @@ public class TreeTableExtraScrollbarWithChildren extends TestBase { } private class TypeColumnGenerator implements Table.ColumnGenerator { + @Override public Object generateCell(Table table, Object itemId, Object columnId) { if (itemId instanceof TestObject) { return new Label(((TestObject) itemId).getValue()); diff --git a/uitest/src/com/vaadin/tests/components/treetable/TreeTableInternalError.java b/uitest/src/com/vaadin/tests/components/treetable/TreeTableInternalError.java index f6d7f11eb7..1b510f1ac5 100644 --- a/uitest/src/com/vaadin/tests/components/treetable/TreeTableInternalError.java +++ b/uitest/src/com/vaadin/tests/components/treetable/TreeTableInternalError.java @@ -30,6 +30,7 @@ public class TreeTableInternalError extends TestBase { Button button = new Button("Resize") { { addClickListener(new Button.ClickListener() { + @Override public void buttonClick(ClickEvent event) { t.setHeight("300px"); } @@ -64,12 +65,14 @@ public class TreeTableInternalError extends TestBase { } public class ButtonColumnGenerator implements ColumnGenerator { + @Override public Component generateCell(final com.vaadin.ui.Table source, final Object itemId, Object columnId) { String identifier = "Expand/Collapse"; Button btnCol = new NativeButton(identifier); btnCol.setId("cacheTestButtonToggle-" + itemId); btnCol.addClickListener(new Button.ClickListener() { + @Override public void buttonClick(ClickEvent event) { t.setCollapsed(itemId, !t.isCollapsed(itemId)); } diff --git a/uitest/src/com/vaadin/tests/components/uitest/BackButtonTest.java b/uitest/src/com/vaadin/tests/components/uitest/BackButtonTest.java index d5bac0d509..7e7a084eed 100644 --- a/uitest/src/com/vaadin/tests/components/uitest/BackButtonTest.java +++ b/uitest/src/com/vaadin/tests/components/uitest/BackButtonTest.java @@ -57,6 +57,7 @@ public class BackButtonTest extends AbstractTestUI { addComponent(l); Button b = new Button("Go to Page 2", new Button.ClickListener() { + @Override public void buttonClick(ClickEvent event) { l.setCaption("Data from Page 1 : " + value); getPage().setUriFragment("page2"); @@ -85,6 +86,7 @@ public class BackButtonTest extends AbstractTestUI { addComponent(f); f.addValueChangeListener(new ValueChangeListener() { + @Override public void valueChange(ValueChangeEvent event) { value = f.getValue(); p1.l.setCaption("Data from Page 2 : " + value); @@ -92,6 +94,7 @@ public class BackButtonTest extends AbstractTestUI { }); Button b = new Button("Go Back", new Button.ClickListener() { + @Override public void buttonClick(ClickEvent event) { getPage().setUriFragment("page1"); } diff --git a/uitest/src/com/vaadin/tests/components/upload/TestFileUploadSize.java b/uitest/src/com/vaadin/tests/components/upload/TestFileUploadSize.java index 32f5c93bfd..178f8f9393 100644 --- a/uitest/src/com/vaadin/tests/components/upload/TestFileUploadSize.java +++ b/uitest/src/com/vaadin/tests/components/upload/TestFileUploadSize.java @@ -28,6 +28,7 @@ public class TestFileUploadSize extends TestBase implements Receiver { Upload u = new Upload("Upload", new Upload.Receiver() { + @Override public OutputStream receiveUpload(String filename, String mimeType) { return baos; } @@ -35,12 +36,14 @@ public class TestFileUploadSize extends TestBase implements Receiver { u.setId("UPL"); u.addStartedListener(new Upload.StartedListener() { + @Override public void uploadStarted(StartedEvent event) { expectedSize.setValue(String.valueOf(event.getContentLength())); } }); u.addFinishedListener(new Upload.FinishedListener() { + @Override public void uploadFinished(FinishedEvent event) { label.setValue("Upload finished. Name: " + event.getFilename()); receivedSize.setValue(String.valueOf(baos.size())); @@ -62,6 +65,7 @@ public class TestFileUploadSize extends TestBase implements Receiver { addComponent(u); } + @Override public OutputStream receiveUpload(String filename, String MIMEType) { Notification.show("Receiving upload"); return new ByteArrayOutputStream(); diff --git a/uitest/src/com/vaadin/tests/components/window/LegacyWindowOpenTest.java b/uitest/src/com/vaadin/tests/components/window/LegacyWindowOpenTest.java index 175c3f6d8a..ad36e04d88 100644 --- a/uitest/src/com/vaadin/tests/components/window/LegacyWindowOpenTest.java +++ b/uitest/src/com/vaadin/tests/components/window/LegacyWindowOpenTest.java @@ -19,6 +19,7 @@ public class LegacyWindowOpenTest extends TestBase { addComponent(new Button("Window.open _blank always as popup", new Button.ClickListener() { + @Override public void buttonClick(ClickEvent event) { win.open(r, "_blank", true); } @@ -26,6 +27,7 @@ public class LegacyWindowOpenTest extends TestBase { addComponent(new Button("Window.open _blank NOT always as popup", new Button.ClickListener() { + @Override public void buttonClick(ClickEvent event) { win.open(r, "_blank", false); } @@ -33,6 +35,7 @@ public class LegacyWindowOpenTest extends TestBase { addComponent(new Button("Window.open _new always as popup", new Button.ClickListener() { + @Override public void buttonClick(ClickEvent event) { win.open(r, "_new", true); } @@ -40,6 +43,7 @@ public class LegacyWindowOpenTest extends TestBase { addComponent(new Button("Window.open _new NOT always as popup", new Button.ClickListener() { + @Override public void buttonClick(ClickEvent event) { win.open(r, "_new", false); } @@ -47,6 +51,7 @@ public class LegacyWindowOpenTest extends TestBase { addComponent(new Button( "Window execute Javascript window.open(www.google.com, _blank)", new Button.ClickListener() { + @Override public void buttonClick(ClickEvent event) { win.executeJavaScript("window.open(\"http://www.google.com\", \"_blank\");"); } @@ -54,6 +59,7 @@ public class LegacyWindowOpenTest extends TestBase { addComponent(new Button( "Window execute Javascript window.open(www.google.com, _blank, resizable=yes,menubar=yes,toolbar=yes,directories=yes,location=yes,scrollbars=yes,status=yes)", new Button.ClickListener() { + @Override public void buttonClick(ClickEvent event) { win.executeJavaScript("window.open(\"http://www.google.com\", \"_blank\", \"resizable=yes,menubar=yes,toolbar=yes,directories=yes,location=yes,scrollbars=yes,status=yes\");"); } diff --git a/uitest/src/com/vaadin/tests/components/window/PageOpenTest.java b/uitest/src/com/vaadin/tests/components/window/PageOpenTest.java index 2dbc24cb66..a566b09cdc 100644 --- a/uitest/src/com/vaadin/tests/components/window/PageOpenTest.java +++ b/uitest/src/com/vaadin/tests/components/window/PageOpenTest.java @@ -20,6 +20,7 @@ public class PageOpenTest extends AbstractTestUI { addComponent(new Button("Page.open _blank always as popup", new Button.ClickListener() { + @Override public void buttonClick(ClickEvent event) { page.open(url, "_blank", true); } @@ -27,6 +28,7 @@ public class PageOpenTest extends AbstractTestUI { addComponent(new Button("Page.open _blank NOT always as popup", new Button.ClickListener() { + @Override public void buttonClick(ClickEvent event) { page.open(url, "_blank", false); } @@ -34,6 +36,7 @@ public class PageOpenTest extends AbstractTestUI { addComponent(new Button("Page.open _new always as popup", new Button.ClickListener() { + @Override public void buttonClick(ClickEvent event) { page.open(url, "_new", true); } @@ -41,6 +44,7 @@ public class PageOpenTest extends AbstractTestUI { addComponent(new Button("Page.open _new NOT always as popup", new Button.ClickListener() { + @Override public void buttonClick(ClickEvent event) { page.open(url, "_new", false); } @@ -48,6 +52,7 @@ public class PageOpenTest extends AbstractTestUI { addComponent(new Button( "Execute Javascript window.open(www.google.com, _blank)", new Button.ClickListener() { + @Override public void buttonClick(ClickEvent event) { JavaScript .getCurrent() @@ -58,6 +63,7 @@ public class PageOpenTest extends AbstractTestUI { addComponent(new Button( "Execute Javascript window.open(www.google.com, _blank, resizable=yes,menubar=yes,toolbar=yes,directories=yes,location=yes,scrollbars=yes,status=yes)", new Button.ClickListener() { + @Override public void buttonClick(ClickEvent event) { JavaScript .getCurrent() diff --git a/uitest/src/com/vaadin/tests/containers/sqlcontainer/TableQueryWithNonUniqueFirstPrimaryKey.java b/uitest/src/com/vaadin/tests/containers/sqlcontainer/TableQueryWithNonUniqueFirstPrimaryKey.java index fa84c7cbb8..da3476610b 100644 --- a/uitest/src/com/vaadin/tests/containers/sqlcontainer/TableQueryWithNonUniqueFirstPrimaryKey.java +++ b/uitest/src/com/vaadin/tests/containers/sqlcontainer/TableQueryWithNonUniqueFirstPrimaryKey.java @@ -53,6 +53,7 @@ public class TableQueryWithNonUniqueFirstPrimaryKey extends LegacyApplication { myCombo.setWidth("100.0%"); myCombo.setHeight("-1px"); myCombo.addValueChangeListener(new Property.ValueChangeListener() { + @Override public void valueChange(ValueChangeEvent event) { if (myCombo.getValue() != null) { Item item = myCombo.getItem(event.getProperty() diff --git a/uitest/src/com/vaadin/tests/minitutorials/v70/SimpleLoginUI.java b/uitest/src/com/vaadin/tests/minitutorials/v70/SimpleLoginUI.java index 2fbbff10a8..1f94d43abe 100644 --- a/uitest/src/com/vaadin/tests/minitutorials/v70/SimpleLoginUI.java +++ b/uitest/src/com/vaadin/tests/minitutorials/v70/SimpleLoginUI.java @@ -26,16 +26,16 @@ public class SimpleLoginUI extends UI { */ getNavigator().addView(SimpleLoginMainView.NAME, SimpleLoginMainView.class); - + /* * We use a view change handler to ensure the user is always redirected * to the login view if the user is not logged in. */ getNavigator().addViewChangeListener(new ViewChangeListener() { - + @Override public boolean beforeViewChange(ViewChangeEvent event) { - + // Check if a user has logged in boolean isLoggedIn = getSession().getAttribute("user") != null; boolean isLoginView = event.getNewView() instanceof SimpleLoginView; @@ -54,10 +54,10 @@ public class SimpleLoginUI extends UI { return true; } - + @Override public void afterViewChange(ViewChangeEvent event) { - + } }); } diff --git a/uitest/src/com/vaadin/tests/minitutorials/v70/SimpleLoginView.java b/uitest/src/com/vaadin/tests/minitutorials/v70/SimpleLoginView.java index 88a2a8f678..3ff1c2df40 100644 --- a/uitest/src/com/vaadin/tests/minitutorials/v70/SimpleLoginView.java +++ b/uitest/src/com/vaadin/tests/minitutorials/v70/SimpleLoginView.java @@ -33,7 +33,8 @@ public class SimpleLoginView extends CustomComponent implements View, user.setWidth("300px"); user.setRequired(true); user.setInputPrompt("Your username (eg. joe@email.com)"); - user.addValidator(new EmailValidator("Username must be an email address")); + user.addValidator(new EmailValidator( + "Username must be an email address")); user.setInvalidAllowed(false); // Create the password input field @@ -61,7 +62,7 @@ public class SimpleLoginView extends CustomComponent implements View, viewLayout.setStyleName(Reindeer.LAYOUT_BLUE); setCompositionRoot(viewLayout); } - + @Override public void enter(ViewChangeEvent event) { // focus the username field when user arrives to the login view @@ -119,7 +120,7 @@ public class SimpleLoginView extends CustomComponent implements View, boolean isValid = username.equals("test@test.com") && password.equals("passw0rd"); - if(isValid){ + if (isValid) { // Store the current user in the service session getSession().setAttribute("user", username); @@ -134,4 +135,3 @@ public class SimpleLoginView extends CustomComponent implements View, } } } - diff --git a/uitest/src/com/vaadin/tests/minitutorials/v71beta/CSSInjectWithColorpicker.java b/uitest/src/com/vaadin/tests/minitutorials/v71beta/CSSInjectWithColorpicker.java index e3b8f997e0..63e43b29f1 100644 --- a/uitest/src/com/vaadin/tests/minitutorials/v71beta/CSSInjectWithColorpicker.java +++ b/uitest/src/com/vaadin/tests/minitutorials/v71beta/CSSInjectWithColorpicker.java @@ -30,27 +30,26 @@ public class CSSInjectWithColorpicker extends UI { // Create a text editor Component editor = createEditor("Lorem ipsum dolor sit amet, lacus pharetra sed, sit a " - + "tortor. Id aliquam lorem pede, orci ut enim metus, diam nulla mi " - + "suspendisse tempor tortor. Eleifend lorem proin, morbi vel diam ut. " - + "Tempor est tellus vitae, pretium condimentum facilisis sit. Sagittis " - + "quam, ac urna eros est cras id cras, eleifend eu mattis nec." - +"Lorem ipsum dolor sit amet, lacus pharetra sed, sit a " - + "tortor. Id aliquam lorem pede, orci ut enim metus, diam nulla mi " - + "suspendisse tempor tortor. Eleifend lorem proin, morbi vel diam ut. " - + "Tempor est tellus vitae, pretium condimentum facilisis sit. Sagittis " - + "quam, ac urna eros est cras id cras, eleifend eu mattis nec." - + "Lorem ipsum dolor sit amet, lacus pharetra sed, sit a " - + "tortor. Id aliquam lorem pede, orci ut enim metus, diam nulla mi " - + "suspendisse tempor tortor. Eleifend lorem proin, morbi vel diam ut. " - + "Tempor est tellus vitae, pretium condimentum facilisis sit. Sagittis " - + "quam, ac urna eros est cras id cras, eleifend eu mattis nec." - + "Lorem ipsum dolor sit amet, lacus pharetra sed, sit a " - + "tortor. Id aliquam lorem pede, orci ut enim metus, diam nulla mi " - + "suspendisse tempor tortor. Eleifend lorem proin, morbi vel diam ut. " - + "Tempor est tellus vitae, pretium condimentum facilisis sit. Sagittis " - + "quam, ac urna eros est cras id cras, eleifend eu mattis nec."); - - + + "tortor. Id aliquam lorem pede, orci ut enim metus, diam nulla mi " + + "suspendisse tempor tortor. Eleifend lorem proin, morbi vel diam ut. " + + "Tempor est tellus vitae, pretium condimentum facilisis sit. Sagittis " + + "quam, ac urna eros est cras id cras, eleifend eu mattis nec." + + "Lorem ipsum dolor sit amet, lacus pharetra sed, sit a " + + "tortor. Id aliquam lorem pede, orci ut enim metus, diam nulla mi " + + "suspendisse tempor tortor. Eleifend lorem proin, morbi vel diam ut. " + + "Tempor est tellus vitae, pretium condimentum facilisis sit. Sagittis " + + "quam, ac urna eros est cras id cras, eleifend eu mattis nec." + + "Lorem ipsum dolor sit amet, lacus pharetra sed, sit a " + + "tortor. Id aliquam lorem pede, orci ut enim metus, diam nulla mi " + + "suspendisse tempor tortor. Eleifend lorem proin, morbi vel diam ut. " + + "Tempor est tellus vitae, pretium condimentum facilisis sit. Sagittis " + + "quam, ac urna eros est cras id cras, eleifend eu mattis nec." + + "Lorem ipsum dolor sit amet, lacus pharetra sed, sit a " + + "tortor. Id aliquam lorem pede, orci ut enim metus, diam nulla mi " + + "suspendisse tempor tortor. Eleifend lorem proin, morbi vel diam ut. " + + "Tempor est tellus vitae, pretium condimentum facilisis sit. Sagittis " + + "quam, ac urna eros est cras id cras, eleifend eu mattis nec."); + VerticalLayout content = new VerticalLayout(editor); content.setMargin(true); setContent(content); @@ -100,10 +99,11 @@ public class CSSInjectWithColorpicker extends UI { TextArea textLabel = new TextArea(null, text); textLabel.setWidth("100%"); textLabel.setHeight("200px"); - - // IMPORTANT: We are here setting the style name of the label, we are going to use this in our injected styles to target the label + + // IMPORTANT: We are here setting the style name of the label, we are + // going to use this in our injected styles to target the label textLabel.setStyleName("text-label"); - + panelContent.addComponent(textLabel); return editor; @@ -203,8 +203,8 @@ public class CSSInjectWithColorpicker extends UI { */ private Component createFontSizeSelect() { - final ComboBox select = new ComboBox(null, Arrays.asList(8, 9, 10, - 12, 14, 16, 20, 25, 30, 40, 50)); + final ComboBox select = new ComboBox(null, Arrays.asList(8, 9, 10, 12, + 14, 16, 20, 25, 30, 40, 50)); select.setWidth("100px"); select.setValue(12); select.setInputPrompt("Font size"); @@ -213,7 +213,7 @@ public class CSSInjectWithColorpicker extends UI { select.setNullSelectionAllowed(false); select.setNewItemsAllowed(false); select.addValueChangeListener(new ValueChangeListener() { - + @Override public void valueChange(ValueChangeEvent event) { // Get the new font size diff --git a/uitest/src/com/vaadin/tests/minitutorials/v7a1/AutoGeneratingForm.java b/uitest/src/com/vaadin/tests/minitutorials/v7a1/AutoGeneratingForm.java index 5547c1077e..a2723beab3 100644 --- a/uitest/src/com/vaadin/tests/minitutorials/v7a1/AutoGeneratingForm.java +++ b/uitest/src/com/vaadin/tests/minitutorials/v7a1/AutoGeneratingForm.java @@ -46,7 +46,7 @@ public class AutoGeneratingForm extends UI { fieldGroup.setItemDataSource(new BeanItem<Person>(new Person("John", "Doe", 34))); - // Loop through the properties, build fields for them and add the fields + // Loop through the properties, build fields for them and add the fields // to this root for (Object propertyId : fieldGroup.getUnboundPropertyIds()) { layout.addComponent(fieldGroup.buildAndBind(propertyId)); diff --git a/uitest/src/com/vaadin/tests/minitutorials/v7b6/OpeningUIInPopup.java b/uitest/src/com/vaadin/tests/minitutorials/v7b6/OpeningUIInPopup.java index 2152e05f14..da9c73dd94 100644 --- a/uitest/src/com/vaadin/tests/minitutorials/v7b6/OpeningUIInPopup.java +++ b/uitest/src/com/vaadin/tests/minitutorials/v7b6/OpeningUIInPopup.java @@ -27,16 +27,17 @@ public class OpeningUIInPopup extends UI { protected void init(VaadinRequest request) { Button popupButton = new Button("Open popup with MyPopupUI"); - BrowserWindowOpener popupOpener = new BrowserWindowOpener(MyPopupUI.class); + BrowserWindowOpener popupOpener = new BrowserWindowOpener( + MyPopupUI.class); popupOpener.setFeatures("height=300,width=300"); popupOpener.extend(popupButton); - + // Add a parameter popupOpener.setParameter("foo", "bar"); // Set a fragment popupOpener.setUriFragment("myfragment"); - + setContent(popupButton); } diff --git a/uitest/src/com/vaadin/tests/minitutorials/v7b9/CountView.java b/uitest/src/com/vaadin/tests/minitutorials/v7b9/CountView.java index 7aaf810355..59708f2bc7 100644 --- a/uitest/src/com/vaadin/tests/minitutorials/v7b9/CountView.java +++ b/uitest/src/com/vaadin/tests/minitutorials/v7b9/CountView.java @@ -14,6 +14,7 @@ public class CountView extends Panel implements View { setContent(new Label("Created: " + count++)); } + @Override public void enter(ViewChangeEvent event) { } diff --git a/uitest/src/com/vaadin/tests/minitutorials/v7b9/LoginView.java b/uitest/src/com/vaadin/tests/minitutorials/v7b9/LoginView.java index 3aa3e42a58..28f8443440 100644 --- a/uitest/src/com/vaadin/tests/minitutorials/v7b9/LoginView.java +++ b/uitest/src/com/vaadin/tests/minitutorials/v7b9/LoginView.java @@ -28,6 +28,7 @@ public class LoginView extends Panel implements View { layout.addComponent(password); final Button login = new Button("Login", new Button.ClickListener() { + @Override public void buttonClick(ClickEvent event) { Notification.show("Ok, let's pretend you're " + email); diff --git a/uitest/src/com/vaadin/tests/minitutorials/v7b9/MainView.java b/uitest/src/com/vaadin/tests/minitutorials/v7b9/MainView.java index 3a1a685bbe..d37a39345f 100644 --- a/uitest/src/com/vaadin/tests/minitutorials/v7b9/MainView.java +++ b/uitest/src/com/vaadin/tests/minitutorials/v7b9/MainView.java @@ -42,6 +42,7 @@ public class MainView extends Panel implements View { layout.addComponent(lnk); logOut = new Button("Logout", new Button.ClickListener() { + @Override public void buttonClick(ClickEvent event) { ((NavigationtestUI) UI.getCurrent()).setLoggedInUser(null); diff --git a/uitest/src/com/vaadin/tests/minitutorials/v7b9/MainViewEarlierExample.java b/uitest/src/com/vaadin/tests/minitutorials/v7b9/MainViewEarlierExample.java index 0eac6a042e..861fd9f8a4 100644 --- a/uitest/src/com/vaadin/tests/minitutorials/v7b9/MainViewEarlierExample.java +++ b/uitest/src/com/vaadin/tests/minitutorials/v7b9/MainViewEarlierExample.java @@ -41,6 +41,7 @@ public class MainViewEarlierExample extends Panel implements View { // login/logout toggle so we can test this Button logInOut = new Button("Toggle login", new Button.ClickListener() { + @Override public void buttonClick(ClickEvent event) { Object user = ((NavigationtestUI) UI.getCurrent()) .getLoggedInUser(); diff --git a/uitest/src/com/vaadin/tests/minitutorials/v7b9/SettingsView.java b/uitest/src/com/vaadin/tests/minitutorials/v7b9/SettingsView.java index 61492adc39..74c4e68b93 100644 --- a/uitest/src/com/vaadin/tests/minitutorials/v7b9/SettingsView.java +++ b/uitest/src/com/vaadin/tests/minitutorials/v7b9/SettingsView.java @@ -43,6 +43,7 @@ public class SettingsView extends Panel implements View { date.setBuffered(true); // show buttons when date is changed date.addValueChangeListener(new ValueChangeListener() { + @Override public void valueChange(ValueChangeEvent event) { hideOrShowButtons(); pendingViewAndParameters = null; @@ -51,6 +52,7 @@ public class SettingsView extends Panel implements View { // commit the TextField changes when "Save" is clicked apply = new Button("Apply", new Button.ClickListener() { + @Override public void buttonClick(ClickEvent event) { date.commit(); hideOrShowButtons(); @@ -61,6 +63,7 @@ public class SettingsView extends Panel implements View { // Discard the TextField changes when "Cancel" is clicked cancel = new Button("Cancel", new Button.ClickListener() { + @Override public void buttonClick(ClickEvent event) { date.discard(); hideOrShowButtons(); @@ -72,6 +75,7 @@ public class SettingsView extends Panel implements View { // attach a listener so that we'll get asked isViewChangeAllowed? navigator.addViewChangeListener(new ViewChangeListener() { + @Override public boolean beforeViewChange(ViewChangeEvent event) { if (event.getOldView() == SettingsView.this && date.isModified()) { @@ -93,6 +97,7 @@ public class SettingsView extends Panel implements View { } } + @Override public void afterViewChange(ViewChangeEvent event) { pendingViewAndParameters = null; } |