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 | |
parent | fc2e1dfa9e39944c1008d0572ba7cb7c639109bb (diff) | |
download | vaadin-framework-c926a09f54cd08856c8cd7a15fd00cf0b62b63b5.tar.gz vaadin-framework-c926a09f54cd08856c8cd7a15fd00cf0b62b63b5.zip |
Global code reformat
Change-Id: I4b3c74ede518aa2712038d1451974a93cdecabc2
118 files changed, 436 insertions, 217 deletions
diff --git a/client-compiler/src/com/vaadin/server/themeutils/SASSAddonImportFileCreator.java b/client-compiler/src/com/vaadin/server/themeutils/SASSAddonImportFileCreator.java index 1fa259c06b..98ce639d16 100644 --- a/client-compiler/src/com/vaadin/server/themeutils/SASSAddonImportFileCreator.java +++ b/client-compiler/src/com/vaadin/server/themeutils/SASSAddonImportFileCreator.java @@ -43,7 +43,6 @@ public class SASSAddonImportFileCreator { private static final String ADDON_IMPORTS_FILE_TEXT = "This file is managed by the Eclipse plug-in and " + "will be overwritten from time to time. Do not manually edit this file."; - /** * @@ -78,7 +77,8 @@ public class SASSAddonImportFileCreator { addonImports.createNewFile(); } - LocationInfo info = ClassPathExplorer.getAvailableWidgetSetsAndStylesheets(); + LocationInfo info = ClassPathExplorer + .getAvailableWidgetSetsAndStylesheets(); try { PrintStream printStream = new PrintStream(new FileOutputStream( @@ -113,8 +113,7 @@ public class SASSAddonImportFileCreator { // Convention is to name the mixing after the stylesheet. Strip // .scss from filename String mixin = file.substring(file.lastIndexOf("/") + 1, - file.length() - - ".scss".length()); + file.length() - ".scss".length()); stream.print("@include " + mixin + ";"); } diff --git a/client-compiler/src/com/vaadin/server/widgetsetutils/ClassPathExplorer.java b/client-compiler/src/com/vaadin/server/widgetsetutils/ClassPathExplorer.java index 018e19049b..5bc5c0d0ab 100644 --- a/client-compiler/src/com/vaadin/server/widgetsetutils/ClassPathExplorer.java +++ b/client-compiler/src/com/vaadin/server/widgetsetutils/ClassPathExplorer.java @@ -84,7 +84,7 @@ public class ClassPathExplorer { public LocationInfo(Map<String, URL> widgetsets, Map<String, URL> themes) { this.widgetsets = widgetsets; - this.addonStyles = themes; + addonStyles = themes; } public Map<String, URL> getWidgetsets() { @@ -186,8 +186,9 @@ public class ClassPathExplorer { * separators) to a URL (see {@link #classpathLocations}) - new * entries are added to this map */ - private static void searchForWidgetSetsAndAddonStyles(String locationString, - Map<String, URL> widgetsets, Map<String, URL> addonStyles) { + private static void searchForWidgetSetsAndAddonStyles( + String locationString, Map<String, URL> widgetsets, + Map<String, URL> addonStyles) { URL location = classpathLocations.get(locationString); File directory = new File(location.getFile()); diff --git a/client/src/com/vaadin/client/ComponentLocator.java b/client/src/com/vaadin/client/ComponentLocator.java index 543877448a..551f7bafcb 100644 --- a/client/src/com/vaadin/client/ComponentLocator.java +++ b/client/src/com/vaadin/client/ComponentLocator.java @@ -566,8 +566,7 @@ public class ComponentLocator { // ChildComponentContainer and VOrderedLayout$Slot have been // replaced with Slot if (w instanceof VAbstractOrderedLayout - && ("ChildComponentContainer" - .equals(widgetClassName) || "VOrderedLayout$Slot" + && ("ChildComponentContainer".equals(widgetClassName) || "VOrderedLayout$Slot" .equals(widgetClassName))) { widgetClassName = "Slot"; } @@ -592,8 +591,7 @@ public class ComponentLocator { * ChildComponentContainer) */ if ((w instanceof VGridLayout) - && "ChildComponentContainer" - .equals(widgetClassName) + && "ChildComponentContainer".equals(widgetClassName) && i + 1 < parts.length) { HasWidgets layout = (HasWidgets) w; diff --git a/client/src/com/vaadin/client/ConnectorHierarchyChangeEvent.java b/client/src/com/vaadin/client/ConnectorHierarchyChangeEvent.java index 56ae7c44ac..2896386933 100644 --- a/client/src/com/vaadin/client/ConnectorHierarchyChangeEvent.java +++ b/client/src/com/vaadin/client/ConnectorHierarchyChangeEvent.java @@ -67,19 +67,17 @@ public class ConnectorHierarchyChangeEvent extends } /** - * Returns the {@link HasComponentsConnector} for which this event - * occurred. + * Returns the {@link HasComponentsConnector} for which this event occurred. * - * @return The {@link HasComponentsConnector} whose child collection - * has changed. Never returns null. + * @return The {@link HasComponentsConnector} whose child collection has + * changed. Never returns null. */ public HasComponentsConnector getParent() { return parent; } /** - * Sets the {@link HasComponentsConnector} for which this event - * occurred. + * Sets the {@link HasComponentsConnector} for which this event occurred. * * @param The * {@link HasComponentsConnector} whose child collection has diff --git a/client/src/com/vaadin/client/HasComponentsConnector.java b/client/src/com/vaadin/client/HasComponentsConnector.java index 0a1a7be97b..ebc6dbcd2a 100644 --- a/client/src/com/vaadin/client/HasComponentsConnector.java +++ b/client/src/com/vaadin/client/HasComponentsConnector.java @@ -21,6 +21,7 @@ import java.util.List; import com.google.gwt.event.shared.HandlerRegistration; import com.google.gwt.user.client.ui.HasWidgets; import com.vaadin.client.ConnectorHierarchyChangeEvent.ConnectorHierarchyChangeHandler; +import com.vaadin.ui.HasComponents; /** * An interface used by client-side connectors whose widget is a component diff --git a/client/src/com/vaadin/client/Util.java b/client/src/com/vaadin/client/Util.java index 049a689cb6..9810156bcc 100644 --- a/client/src/com/vaadin/client/Util.java +++ b/client/src/com/vaadin/client/Util.java @@ -1347,5 +1347,4 @@ public class Util { } } - } diff --git a/client/src/com/vaadin/client/debug/internal/HierarchySection.java b/client/src/com/vaadin/client/debug/internal/HierarchySection.java index 3c2b7251f3..776ba9326d 100644 --- a/client/src/com/vaadin/client/debug/internal/HierarchySection.java +++ b/client/src/com/vaadin/client/debug/internal/HierarchySection.java @@ -246,6 +246,7 @@ class HierarchySection implements Section { } } + @Override public void meta(ApplicationConnection ac, ValueMap meta) { content.clear(); JsArray<ValueMap> valueMapArray = meta diff --git a/client/src/com/vaadin/client/debug/internal/NetworkSection.java b/client/src/com/vaadin/client/debug/internal/NetworkSection.java index ff6466651b..ebdeff810f 100644 --- a/client/src/com/vaadin/client/debug/internal/NetworkSection.java +++ b/client/src/com/vaadin/client/debug/internal/NetworkSection.java @@ -77,6 +77,7 @@ public class NetworkSection implements Section { // NOP } + @Override public void uidl(ApplicationConnection ac, ValueMap uidl) { int sinceStart = VDebugWindow.getMillisSinceStart(); int sinceReset = VDebugWindow.getMillisSinceReset(); diff --git a/client/src/com/vaadin/client/extensions/javascriptmanager/JavaScriptManagerConnector.java b/client/src/com/vaadin/client/extensions/javascriptmanager/JavaScriptManagerConnector.java index ce79b4c64c..8e6ad25407 100644 --- a/client/src/com/vaadin/client/extensions/javascriptmanager/JavaScriptManagerConnector.java +++ b/client/src/com/vaadin/client/extensions/javascriptmanager/JavaScriptManagerConnector.java @@ -23,8 +23,8 @@ import com.google.gwt.core.client.JavaScriptObject; import com.google.gwt.core.client.JsArray; import com.google.gwt.json.client.JSONArray; import com.vaadin.client.ServerConnector; -import com.vaadin.client.communication.StateChangeEvent; import com.vaadin.client.communication.JavaScriptMethodInvocation; +import com.vaadin.client.communication.StateChangeEvent; import com.vaadin.client.extensions.AbstractExtensionConnector; import com.vaadin.shared.extension.javascriptmanager.ExecuteJavaScriptRpc; import com.vaadin.shared.extension.javascriptmanager.JavaScriptManagerState; diff --git a/client/src/com/vaadin/client/ui/AbstractComponentConnector.java b/client/src/com/vaadin/client/ui/AbstractComponentConnector.java index dcb159985c..5475c128c1 100644 --- a/client/src/com/vaadin/client/ui/AbstractComponentConnector.java +++ b/client/src/com/vaadin/client/ui/AbstractComponentConnector.java @@ -36,8 +36,6 @@ import com.vaadin.client.metadata.NoDataException; import com.vaadin.client.metadata.Type; import com.vaadin.client.metadata.TypeData; import com.vaadin.client.metadata.TypeDataStore; -import com.vaadin.client.ui.AbstractFieldConnector; -import com.vaadin.client.ui.ManagedLayout; import com.vaadin.client.ui.datefield.PopupDateFieldConnector; import com.vaadin.client.ui.ui.UIConnector; import com.vaadin.shared.AbstractComponentState; diff --git a/client/src/com/vaadin/client/ui/AbstractConnector.java b/client/src/com/vaadin/client/ui/AbstractConnector.java index 2c76aa93fe..6855c5cd2d 100644 --- a/client/src/com/vaadin/client/ui/AbstractConnector.java +++ b/client/src/com/vaadin/client/ui/AbstractConnector.java @@ -439,6 +439,7 @@ public abstract class AbstractConnector implements ServerConnector, * * @see com.vaadin.client.ServerConnector#hasEventListener(java.lang.String) */ + @Override public boolean hasEventListener(String eventIdentifier) { Set<String> reg = getState().registeredEventListeners; return (reg != null && reg.contains(eventIdentifier)); diff --git a/client/src/com/vaadin/client/ui/AbstractHasComponentsConnector.java b/client/src/com/vaadin/client/ui/AbstractHasComponentsConnector.java index 4a6aefd082..d833f076e4 100644 --- a/client/src/com/vaadin/client/ui/AbstractHasComponentsConnector.java +++ b/client/src/com/vaadin/client/ui/AbstractHasComponentsConnector.java @@ -20,9 +20,9 @@ import java.util.List; import com.google.gwt.event.shared.HandlerRegistration; import com.vaadin.client.ComponentConnector; -import com.vaadin.client.HasComponentsConnector; import com.vaadin.client.ConnectorHierarchyChangeEvent; import com.vaadin.client.ConnectorHierarchyChangeEvent.ConnectorHierarchyChangeHandler; +import com.vaadin.client.HasComponentsConnector; public abstract class AbstractHasComponentsConnector extends AbstractComponentConnector implements HasComponentsConnector, diff --git a/client/src/com/vaadin/client/ui/VAbsoluteLayout.java b/client/src/com/vaadin/client/ui/VAbsoluteLayout.java index ee5d1f039a..dc080bcf7d 100644 --- a/client/src/com/vaadin/client/ui/VAbsoluteLayout.java +++ b/client/src/com/vaadin/client/ui/VAbsoluteLayout.java @@ -322,7 +322,7 @@ public class VAbsoluteLayout extends ComplexPanel { } } } - + /** * Cleanup old wrappers which have been left empty by other inner layouts * moving the widget from the wrapper into their own hierarchy. This usually @@ -330,7 +330,7 @@ public class VAbsoluteLayout extends ComplexPanel { * automatically detaches the widget from the parent, in this case the * wrapper, and re-attaches it somewhere else. This has to be done in the * layout phase since the order of the hierarchy events are not defined. - */ + */ public void cleanupWrappers() { for (Widget widget : getChildren()) { if (widget instanceof AbsoluteWrapper) { @@ -339,9 +339,9 @@ public class VAbsoluteLayout extends ComplexPanel { wrapper.destroy(); super.remove(wrapper); continue; - } + } } - } + } } /** diff --git a/client/src/com/vaadin/client/ui/VCalendar.java b/client/src/com/vaadin/client/ui/VCalendar.java index e66a2d7552..c5c12f2d72 100644 --- a/client/src/com/vaadin/client/ui/VCalendar.java +++ b/client/src/com/vaadin/client/ui/VCalendar.java @@ -590,6 +590,7 @@ public class VCalendar extends Composite { cell.setMonthGrid(monthGrid); cell.setDate(d); cell.addDomHandler(new ContextMenuHandler() { + @Override public void onContextMenu(ContextMenuEvent event) { if (mouseEventListener != null) { event.preventDefault(); @@ -827,6 +828,7 @@ public class VCalendar extends Composite { public static Comparator<CalendarEvent> getEventComparator() { return new Comparator<CalendarEvent>() { + @Override public int compare(CalendarEvent o1, CalendarEvent o2) { if (o1.isAllDay() != o2.isAllDay()) { if (o2.isAllDay()) { diff --git a/client/src/com/vaadin/client/ui/VColorPickerArea.java b/client/src/com/vaadin/client/ui/VColorPickerArea.java index bdae65438f..81f2c8fcc7 100644 --- a/client/src/com/vaadin/client/ui/VColorPickerArea.java +++ b/client/src/com/vaadin/client/ui/VColorPickerArea.java @@ -67,6 +67,7 @@ public class VColorPickerArea extends Widget implements ClickHandler, HasHTML, * @param handler * @return HandlerRegistration used to remove the handler */ + @Override public HandlerRegistration addClickHandler(ClickHandler handler) { return addDomHandler(handler, ClickEvent.getType()); } diff --git a/client/src/com/vaadin/client/ui/VOptionGroupBase.java b/client/src/com/vaadin/client/ui/VOptionGroupBase.java index 4d60b2eba8..cc691130ad 100644 --- a/client/src/com/vaadin/client/ui/VOptionGroupBase.java +++ b/client/src/com/vaadin/client/ui/VOptionGroupBase.java @@ -118,6 +118,7 @@ public abstract class VOptionGroupBase extends Composite implements Field, return multiselect; } + @Override public boolean isEnabled() { return enabled; } @@ -190,6 +191,7 @@ public abstract class VOptionGroupBase extends Composite implements Field, } } + @Override public void setEnabled(boolean enabled) { if (this.enabled != enabled) { this.enabled = enabled; diff --git a/client/src/com/vaadin/client/ui/VScrollTable.java b/client/src/com/vaadin/client/ui/VScrollTable.java index 4d61fba429..d9dd542b15 100644 --- a/client/src/com/vaadin/client/ui/VScrollTable.java +++ b/client/src/com/vaadin/client/ui/VScrollTable.java @@ -1113,10 +1113,10 @@ public class VScrollTable extends FlowPanel implements HasWidgets, if (firstvisible != lastRequestedFirstvisible && scrollBody != null) { // received 'surprising' firstvisible from server: scroll there firstRowInViewPort = firstvisible; - + /* - * Schedule the scrolling to be executed last so no updates to the rows - * affect scrolling measurements. + * Schedule the scrolling to be executed last so no updates to the + * rows affect scrolling measurements. */ Scheduler.get().scheduleFinally(lazyScroller); } @@ -3056,7 +3056,7 @@ public class VScrollTable extends FlowPanel implements HasWidgets, .hasNext(); columnIndex++) { if (it.next() == this) { break; - } + } } } final int cw = scrollBody.getColWidth(columnIndex); diff --git a/client/src/com/vaadin/client/ui/absolutelayout/AbsoluteLayoutConnector.java b/client/src/com/vaadin/client/ui/absolutelayout/AbsoluteLayoutConnector.java index cba9cc2fa1..da79639dcd 100644 --- a/client/src/com/vaadin/client/ui/absolutelayout/AbsoluteLayoutConnector.java +++ b/client/src/com/vaadin/client/ui/absolutelayout/AbsoluteLayoutConnector.java @@ -100,8 +100,7 @@ public class AbsoluteLayoutConnector extends /* * (non-Javadoc) * - * @see - * com.vaadin.client.HasComponentsConnector#updateCaption(com.vaadin + * @see com.vaadin.client.HasComponentsConnector#updateCaption(com.vaadin * .client.ComponentConnector) */ @Override diff --git a/client/src/com/vaadin/client/ui/calendar/CalendarConnector.java b/client/src/com/vaadin/client/ui/calendar/CalendarConnector.java index 120a65d842..c36521b3ac 100644 --- a/client/src/com/vaadin/client/ui/calendar/CalendarConnector.java +++ b/client/src/com/vaadin/client/ui/calendar/CalendarConnector.java @@ -54,8 +54,8 @@ import com.vaadin.client.ui.calendar.schedule.CalendarDay; import com.vaadin.client.ui.calendar.schedule.CalendarEvent; import com.vaadin.client.ui.calendar.schedule.DateCell; import com.vaadin.client.ui.calendar.schedule.DateCell.DateCellSlot; -import com.vaadin.client.ui.calendar.schedule.DateUtil; import com.vaadin.client.ui.calendar.schedule.DateCellDayEvent; +import com.vaadin.client.ui.calendar.schedule.DateUtil; import com.vaadin.client.ui.calendar.schedule.HasTooltipKey; import com.vaadin.client.ui.calendar.schedule.SimpleDayCell; import com.vaadin.client.ui.calendar.schedule.dd.CalendarDropHandler; @@ -131,6 +131,7 @@ public class CalendarConnector extends AbstractComponentConnector implements */ protected void registerListeners() { getWidget().setListener(new DateClickListener() { + @Override public void dateClick(String date) { if (!getWidget().isDisabledOrReadOnly() && hasEventListener(CalendarEventId.DATECLICK)) { @@ -139,6 +140,7 @@ public class CalendarConnector extends AbstractComponentConnector implements } }); getWidget().setListener(new ForwardListener() { + @Override public void forward() { if (hasEventListener(CalendarEventId.FORWARD)) { rpc.forward(); @@ -146,6 +148,7 @@ public class CalendarConnector extends AbstractComponentConnector implements } }); getWidget().setListener(new BackwardListener() { + @Override public void backward() { if (hasEventListener(CalendarEventId.BACKWARD)) { rpc.backward(); @@ -153,6 +156,7 @@ public class CalendarConnector extends AbstractComponentConnector implements } }); getWidget().setListener(new RangeSelectListener() { + @Override public void rangeSelected(String value) { if (hasEventListener(CalendarEventId.RANGESELECT)) { rpc.rangeSelect(value); @@ -160,6 +164,7 @@ public class CalendarConnector extends AbstractComponentConnector implements } }); getWidget().setListener(new WeekClickListener() { + @Override public void weekClick(String event) { if (!getWidget().isDisabledOrReadOnly() && hasEventListener(CalendarEventId.WEEKCLICK)) { @@ -168,6 +173,7 @@ public class CalendarConnector extends AbstractComponentConnector implements } }); getWidget().setListener(new EventMovedListener() { + @Override public void eventMoved(CalendarEvent event) { if (hasEventListener(CalendarEventId.EVENTMOVE)) { StringBuilder sb = new StringBuilder(); @@ -180,6 +186,7 @@ public class CalendarConnector extends AbstractComponentConnector implements } }); getWidget().setListener(new EventResizeListener() { + @Override public void eventResized(CalendarEvent event) { if (hasEventListener(CalendarEventId.EVENTRESIZE)) { StringBuilder buffer = new StringBuilder(); @@ -205,12 +212,14 @@ public class CalendarConnector extends AbstractComponentConnector implements } }); getWidget().setListener(new VCalendar.ScrollListener() { + @Override public void scroll(int scrollPosition) { // This call is @Delayed (== non-immediate) rpc.scroll(scrollPosition); } }); getWidget().setListener(new EventClickListener() { + @Override public void eventClick(CalendarEvent event) { if (hasEventListener(CalendarEventId.EVENTCLICK)) { rpc.eventClick(event.getIndex()); @@ -218,6 +227,7 @@ public class CalendarConnector extends AbstractComponentConnector implements } }); getWidget().setListener(new MouseEventListener() { + @Override public void contextMenu(ContextMenuEvent event, final Widget widget) { final NativeEvent ne = event.getNativeEvent(); int left = ne.getClientX(); @@ -225,14 +235,17 @@ public class CalendarConnector extends AbstractComponentConnector implements top += Window.getScrollTop(); left += Window.getScrollLeft(); getClient().getContextMenu().showAt(new ActionOwner() { + @Override public String getPaintableId() { return CalendarConnector.this.getPaintableId(); } + @Override public ApplicationConnection getClient() { return CalendarConnector.this.getClient(); } + @Override @SuppressWarnings("deprecation") public Action[] getActions() { if (widget instanceof SimpleDayCell) { @@ -423,6 +436,7 @@ public class CalendarConnector extends AbstractComponentConnector implements * @see * com.vaadin.terminal.gwt.client.ui.dd.VHasDropHandler#getDropHandler() */ + @Override public CalendarDropHandler getDropHandler() { return dropHandler; } @@ -548,6 +562,7 @@ public class CalendarConnector extends AbstractComponentConnector implements * Returns ALL currently registered events. Use {@link #getActions(Date)} to * get the actions for a specific date */ + @Override public Action[] getActions() { List<Action> actions = new ArrayList<Action>(); for (int i = 0; i < actionKeys.size(); i++) { @@ -573,6 +588,7 @@ public class CalendarConnector extends AbstractComponentConnector implements * * @see com.vaadin.terminal.gwt.client.ui.ActionOwner#getPaintableId() */ + @Override public String getPaintableId() { return getConnectorId(); } diff --git a/client/src/com/vaadin/client/ui/calendar/schedule/DateCell.java b/client/src/com/vaadin/client/ui/calendar/schedule/DateCell.java index 05e2a808fe..516447153e 100644 --- a/client/src/com/vaadin/client/ui/calendar/schedule/DateCell.java +++ b/client/src/com/vaadin/client/ui/calendar/schedule/DateCell.java @@ -122,8 +122,8 @@ public class DateCell extends FocusableComplexPanel implements long start = getDate().getTime() + firstHour * 3600000; long end = start + slotTime; for (int i = 0; i < numberOfSlots; i++) { - DateCellSlot slot = new DateCellSlot(this, new Date( - start), new Date(end)); + DateCellSlot slot = new DateCellSlot(this, new Date(start), + new Date(end)); if (i % 2 == 0) { slot.setStyleName("v-datecellslot-even"); } else { @@ -177,8 +177,7 @@ public class DateCell extends FocusableComplexPanel implements } } - throw new IllegalArgumentException( - "Element not found in this DateCell"); + throw new IllegalArgumentException("Element not found in this DateCell"); } public DateCellSlot getSlot(int index) { @@ -271,8 +270,7 @@ public class DateCell extends FocusableComplexPanel implements private void recalculateEventPositions() { for (int i = 0; i < getWidgetCount(); i++) { DateCellDayEvent dayEvent = (DateCellDayEvent) getWidget(i); - updatePositionFor(dayEvent, getDate(), - dayEvent.getCalendarEvent()); + updatePositionFor(dayEvent, getDate(), dayEvent.getCalendarEvent()); } } @@ -325,8 +323,8 @@ public class DateCell extends FocusableComplexPanel implements startingSlotHeight = height / numberOfSlots; for (int i = 0; i < slotElements.length; i++) { - slotElements[i].getStyle().setHeight(slotElementHeights[i], - Unit.PX); + slotElements[i].getStyle() + .setHeight(slotElementHeights[i], Unit.PX); } Iterator<Widget> it = iterator(); @@ -412,8 +410,8 @@ public class DateCell extends FocusableComplexPanel implements DateCellDayEvent d = (DateCellDayEvent) getWidget(eventIndex); WeekGridMinuteTimeRange nextRange = new WeekGridMinuteTimeRange(d - .getCalendarEvent().getStartTime(), d - .getCalendarEvent().getEndTime()); + .getCalendarEvent().getStartTime(), d.getCalendarEvent() + .getEndTime()); if (WeekGridMinuteTimeRange.doesOverlap(dateRange, nextRange)) { skipIndex = col; @@ -459,9 +457,9 @@ public class DateCell extends FocusableComplexPanel implements int count = getWidgetCount(); DateCellDayEvent target = (DateCellDayEvent) getWidget(targetIndex); - WeekGridMinuteTimeRange targetRange = new WeekGridMinuteTimeRange(target - .getCalendarEvent().getStartTime(), target - .getCalendarEvent().getEndTime()); + WeekGridMinuteTimeRange targetRange = new WeekGridMinuteTimeRange( + target.getCalendarEvent().getStartTime(), target + .getCalendarEvent().getEndTime()); Date groupStart = targetRange.getStart(); Date groupEnd = targetRange.getEnd(); @@ -472,8 +470,8 @@ public class DateCell extends FocusableComplexPanel implements DateCellDayEvent d = (DateCellDayEvent) getWidget(i); WeekGridMinuteTimeRange nextRange = new WeekGridMinuteTimeRange(d - .getCalendarEvent().getStartTime(), d - .getCalendarEvent().getEndTime()); + .getCalendarEvent().getStartTime(), d.getCalendarEvent() + .getEndTime()); if (WeekGridMinuteTimeRange.doesOverlap(targetRange, nextRange)) { g.add(i); @@ -497,7 +495,8 @@ public class DateCell extends FocusableComplexPanel implements public void addEvent(Date targetDay, CalendarEvent calendarEvent) { Element main = getElement(); - DateCellDayEvent dayEvent = new DateCellDayEvent(this, weekgrid, calendarEvent); + DateCellDayEvent dayEvent = new DateCellDayEvent(this, weekgrid, + calendarEvent); dayEvent.setSlotHeightInPX(getSlotHeight()); dayEvent.setDisabled(isDisabled()); @@ -562,8 +561,8 @@ public class DateCell extends FocusableComplexPanel implements } index++; } - this.insert(dayEvent, (com.google.gwt.user.client.Element) main, - index, true); + this.insert(dayEvent, (com.google.gwt.user.client.Element) main, index, + true); } public void removeEvent(DateCellDayEvent dayEvent) { @@ -584,10 +583,10 @@ public class DateCell extends FocusableComplexPanel implements int eventStartHours = eventStart.getHours(); int eventEndHours = eventEnd.getHours(); - return (eventStartHours <= lastHour) - && (eventEndHours >= firstHour); + return (eventStartHours <= lastHour) && (eventEndHours >= firstHour); } + @Override public void onKeyDown(KeyDownEvent event) { int keycode = event.getNativeEvent().getKeyCode(); if (keycode == KeyCodes.KEY_ESCAPE && eventRangeStart > -1) { @@ -595,6 +594,7 @@ public class DateCell extends FocusableComplexPanel implements } } + @Override public void onMouseDown(MouseDownEvent event) { if (event.getNativeButton() == NativeEvent.BUTTON_LEFT) { Element e = Element.as(event.getNativeEvent().getEventTarget()); @@ -610,6 +610,7 @@ public class DateCell extends FocusableComplexPanel implements } } + @Override @SuppressWarnings("deprecation") public void onMouseUp(MouseUpEvent event) { if (event.getNativeButton() != NativeEvent.BUTTON_LEFT) { @@ -676,6 +677,7 @@ public class DateCell extends FocusableComplexPanel implements } } + @Override public void onMouseMove(MouseMoveEvent event) { if (event.getNativeButton() != NativeEvent.BUTTON_LEFT) { return; @@ -782,8 +784,7 @@ public class DateCell extends FocusableComplexPanel implements return today != null; } - public void addEmphasisStyle( - com.google.gwt.user.client.Element elementOver) { + public void addEmphasisStyle(com.google.gwt.user.client.Element elementOver) { String originalStylename = getStyleName(elementOver); setStyleName(elementOver, originalStylename + DRAGEMPHASISSTYLE); } @@ -797,6 +798,7 @@ public class DateCell extends FocusableComplexPanel implements - DRAGEMPHASISSTYLE.length())); } + @Override public void onContextMenu(ContextMenuEvent event) { if (weekgrid.getCalendar().getMouseEventListener() != null) { event.preventDefault(); diff --git a/client/src/com/vaadin/client/ui/calendar/schedule/DateCellContainer.java b/client/src/com/vaadin/client/ui/calendar/schedule/DateCellContainer.java index f1b45c83c5..04e6bb7df6 100644 --- a/client/src/com/vaadin/client/ui/calendar/schedule/DateCellContainer.java +++ b/client/src/com/vaadin/client/ui/calendar/schedule/DateCellContainer.java @@ -31,8 +31,8 @@ import com.vaadin.client.ui.VCalendar; * * since 7.1 */ -public class DateCellContainer extends FlowPanel implements - MouseDownHandler, MouseUpHandler { +public class DateCellContainer extends FlowPanel implements MouseDownHandler, + MouseUpHandler { private Date date; @@ -67,7 +67,8 @@ public class DateCellContainer extends FlowPanel implements public boolean hasEvent(int slotIndex) { return hasDateCell(slotIndex) - && ((WeeklyLongEventsDateCell) getChildren().get(slotIndex)).getEvent() != null; + && ((WeeklyLongEventsDateCell) getChildren().get(slotIndex)) + .getEvent() != null; } public boolean hasDateCell(int slotIndex) { @@ -94,12 +95,14 @@ public class DateCellContainer extends FlowPanel implements add(dateCell); } + @Override public void onMouseDown(MouseDownEvent event) { clickTargetWidget = (Widget) event.getSource(); event.stopPropagation(); } + @Override public void onMouseUp(MouseUpEvent event) { if (event.getSource() == clickTargetWidget && clickTargetWidget instanceof WeeklyLongEventsDateCell diff --git a/client/src/com/vaadin/client/ui/calendar/schedule/DateCellDayEvent.java b/client/src/com/vaadin/client/ui/calendar/schedule/DateCellDayEvent.java index 039a00e25a..c56566bf25 100644 --- a/client/src/com/vaadin/client/ui/calendar/schedule/DateCellDayEvent.java +++ b/client/src/com/vaadin/client/ui/calendar/schedule/DateCellDayEvent.java @@ -51,8 +51,8 @@ import com.vaadin.shared.ui.calendar.DateConstants; * @since 7.1 */ public class DateCellDayEvent extends FocusableHTML implements - MouseDownHandler, MouseUpHandler, MouseMoveHandler, - KeyDownHandler, ContextMenuHandler, HasTooltipKey { + MouseDownHandler, MouseUpHandler, MouseMoveHandler, KeyDownHandler, + ContextMenuHandler, HasTooltipKey { private final DateCell dateCell; private Element caption = null; @@ -79,7 +79,8 @@ public class DateCellDayEvent extends FocusableHTML implements private final List<HandlerRegistration> handlers; private boolean mouseMoveCanceled; - public DateCellDayEvent(DateCell dateCell, WeekGrid parent, CalendarEvent event) { + public DateCellDayEvent(DateCell dateCell, WeekGrid parent, + CalendarEvent event) { super(); this.dateCell = dateCell; @@ -110,8 +111,7 @@ public class DateCellDayEvent extends FocusableHTML implements bottomResizeBar = DOM.createDiv(); topResizeBar.addClassName("v-calendar-event-resizetop"); - bottomResizeBar - .addClassName("v-calendar-event-resizebottom"); + bottomResizeBar.addClassName("v-calendar-event-resizebottom"); getElement().appendChild(topResizeBar); getElement().appendChild(bottomResizeBar); @@ -142,8 +142,7 @@ public class DateCellDayEvent extends FocusableHTML implements this.slotHeight = slotHeight; } - public void updatePosition(long startFromMinutes, - long durationInMinutes) { + public void updatePosition(long startFromMinutes, long durationInMinutes) { if (startFromMinutes < 0) { startFromMinutes = 0; } @@ -183,8 +182,7 @@ public class DateCellDayEvent extends FocusableHTML implements /** * @param bigMode - * If false, event is so small that caption must be in - * time-row + * If false, event is so small that caption must be in time-row */ private void updateCaptions(boolean bigMode) { String separator = bigMode ? "<br />" : ": "; @@ -194,6 +192,7 @@ public class DateCellDayEvent extends FocusableHTML implements eventContent.setInnerHTML(""); } + @Override public void onKeyDown(KeyDownEvent event) { int keycode = event.getNativeEvent().getKeyCode(); if (keycode == KeyCodes.KEY_ESCAPE && mouseMoveStarted) { @@ -201,38 +200,31 @@ public class DateCellDayEvent extends FocusableHTML implements } } + @Override public void onMouseDown(MouseDownEvent event) { startX = event.getClientX(); startY = event.getClientY(); - if (isDisabled() - || event.getNativeButton() != NativeEvent.BUTTON_LEFT) { + if (isDisabled() || event.getNativeButton() != NativeEvent.BUTTON_LEFT) { return; } - clickTarget = Element.as(event.getNativeEvent() - .getEventTarget()); + clickTarget = Element.as(event.getNativeEvent().getEventTarget()); mouseMoveCanceled = false; - if (weekGrid.getCalendar().isEventMoveAllowed() - || clickTargetsResize()) { + if (weekGrid.getCalendar().isEventMoveAllowed() || clickTargetsResize()) { moveRegistration = addMouseMoveHandler(this); setFocus(true); try { - startYrelative = (int) ((double) event - .getRelativeY(caption) % slotHeight); - startXrelative = (event.getRelativeX(weekGrid - .getElement()) - weekGrid.timebar - .getOffsetWidth()) - % getDateCellWidth(); + startYrelative = (int) ((double) event.getRelativeY(caption) % slotHeight); + startXrelative = (event.getRelativeX(weekGrid.getElement()) - weekGrid.timebar + .getOffsetWidth()) % getDateCellWidth(); } catch (Exception e) { - GWT.log("Exception calculating relative start position", - e); + GWT.log("Exception calculating relative start position", e); } mouseMoveStarted = false; Style s = getElement().getStyle(); s.setZIndex(1000); - startDatetimeFrom = (Date) calendarEvent.getStartTime() - .clone(); + startDatetimeFrom = (Date) calendarEvent.getStartTime().clone(); startDatetimeTo = (Date) calendarEvent.getEndTime().clone(); Event.setCapture(getElement()); } @@ -243,13 +235,14 @@ public class DateCellDayEvent extends FocusableHTML implements } /* - * We need to stop the event propagation or else the WeekGrid - * range select will kick in + * We need to stop the event propagation or else the WeekGrid range + * select will kick in */ event.stopPropagation(); event.preventDefault(); } + @Override public void onMouseUp(MouseUpEvent event) { if (mouseMoveCanceled) { return; @@ -274,8 +267,7 @@ public class DateCellDayEvent extends FocusableHTML implements // check if mouse has moved over threshold of 3 pixels boolean mouseMoved = (xDiff < -3 || xDiff > 3 || yDiff < -3 || yDiff > 3); - if (!weekGrid.getCalendar().isDisabledOrReadOnly() - && mouseMoved) { + if (!weekGrid.getCalendar().isDisabledOrReadOnly() && mouseMoved) { // Event Move: // - calendar must be enabled // - calendar must not be in read-only mode @@ -283,8 +275,7 @@ public class DateCellDayEvent extends FocusableHTML implements } else if (!weekGrid.getCalendar().isDisabled()) { // Event Click: // - calendar must be enabled (read-only is allowed) - EventTarget et = event.getNativeEvent() - .getEventTarget(); + EventTarget et = event.getNativeEvent().getEventTarget(); Element e = Element.as(et); if (e == caption || e == eventContent || e.getParentElement() == caption) { @@ -304,6 +295,7 @@ public class DateCellDayEvent extends FocusableHTML implements } } + @Override @SuppressWarnings("deprecation") public void onMouseMove(MouseMoveEvent event) { if (startY < 0 && startX < 0) { @@ -330,8 +322,7 @@ public class DateCellDayEvent extends FocusableHTML implements mouseMoveStarted = true; } - HorizontalPanel parent = (HorizontalPanel) getParent() - .getParent(); + HorizontalPanel parent = (HorizontalPanel) getParent().getParent(); int relativeX = event.getRelativeX(parent.getElement()) - weekGrid.timebar.getOffsetWidth(); int halfHourDiff = 0; @@ -362,10 +353,9 @@ public class DateCellDayEvent extends FocusableHTML implements int dayOffsetPx = calculateDateCellOffsetPx(dayOffset) + weekGrid.timebar.getOffsetWidth(); - GWT.log("DateCellWidth: " + dateCellWidth + " dayDiff: " - + dayDiff + " dayOffset: " + dayOffset - + " dayOffsetPx: " + dayOffsetPx + " startXrelative: " - + startXrelative + " moveX: " + moveX); + GWT.log("DateCellWidth: " + dateCellWidth + " dayDiff: " + dayDiff + + " dayOffset: " + dayOffset + " dayOffsetPx: " + dayOffsetPx + + " startXrelative: " + startXrelative + " moveX: " + moveX); if (relativeX < 0 || relativeX >= getDatesWidth()) { return; @@ -391,11 +381,10 @@ public class DateCellDayEvent extends FocusableHTML implements calendarEvent.setEnd(new Date(to.getTime())); // Set new position for the event - long startFromMinutes = (from.getHours() * 60) - + from.getMinutes(); + long startFromMinutes = (from.getHours() * 60) + from.getMinutes(); long range = calendarEvent.getRangeInMinutes(); - startFromMinutes = calculateStartFromMinute( - startFromMinutes, from, to, dayOffsetPx); + startFromMinutes = calculateStartFromMinute(startFromMinutes, from, + to, dayOffsetPx); if (startFromMinutes < 0) { range += startFromMinutes; } @@ -404,8 +393,7 @@ public class DateCellDayEvent extends FocusableHTML implements s.setLeft(dayOffsetPx, Unit.PX); if (weekGrid.getDateCellWidths() != null) { - s.setWidth(weekGrid.getDateCellWidths()[dayOffset], - Unit.PX); + s.setWidth(weekGrid.getDateCellWidths()[dayOffset], Unit.PX); } else { setWidth(moveWidth); } @@ -415,10 +403,8 @@ public class DateCellDayEvent extends FocusableHTML implements long newStartTime = oldStartTime + ((long) halfHourInMilliSeconds * halfHourDiff); - if (!isTimeRangeTooSmall(newStartTime, - startDatetimeTo.getTime())) { - newStartTime = startDatetimeTo.getTime() - - getMinTimeRange(); + if (!isTimeRangeTooSmall(newStartTime, startDatetimeTo.getTime())) { + newStartTime = startDatetimeTo.getTime() - getMinTimeRange(); } from.setTime(newStartTime); @@ -427,8 +413,7 @@ public class DateCellDayEvent extends FocusableHTML implements calendarEvent.setStart(new Date(from.getTime())); // Set new position for the event - long startFromMinutes = (from.getHours() * 60) - + from.getMinutes(); + long startFromMinutes = (from.getHours() * 60) + from.getMinutes(); long range = calendarEvent.getRangeInMinutes(); updatePosition(startFromMinutes, range); @@ -438,10 +423,8 @@ public class DateCellDayEvent extends FocusableHTML implements long newEndTime = oldEndTime + ((long) halfHourInMilliSeconds * halfHourDiff); - if (!isTimeRangeTooSmall(startDatetimeFrom.getTime(), - newEndTime)) { - newEndTime = startDatetimeFrom.getTime() - + getMinTimeRange(); + if (!isTimeRangeTooSmall(startDatetimeFrom.getTime(), newEndTime)) { + newEndTime = startDatetimeFrom.getTime() + getMinTimeRange(); } to.setTime(newEndTime); @@ -453,8 +436,8 @@ public class DateCellDayEvent extends FocusableHTML implements long startFromMinutes = (startDatetimeFrom.getHours() * 60) + startDatetimeFrom.getMinutes(); long range = calendarEvent.getRangeInMinutes(); - startFromMinutes = calculateStartFromMinute( - startFromMinutes, from, to, dayOffsetPx); + startFromMinutes = calculateStartFromMinute(startFromMinutes, from, + to, dayOffsetPx); if (startFromMinutes < 0) { range += startFromMinutes; } @@ -509,14 +492,12 @@ public class DateCellDayEvent extends FocusableHTML implements // date methods are not deprecated in GWT @SuppressWarnings("deprecation") - private long calculateStartFromMinute(long startFromMinutes, - Date from, Date to, int dayOffset) { - boolean eventStartAtDifferentDay = from.getDate() != to - .getDate(); + private long calculateStartFromMinute(long startFromMinutes, Date from, + Date to, int dayOffset) { + boolean eventStartAtDifferentDay = from.getDate() != to.getDate(); if (eventStartAtDifferentDay) { - long minutesOnPrevDay = (getTargetDateByCurrentPosition( - dayOffset).getTime() - from.getTime()) - / DateConstants.MINUTEINMILLIS; + long minutesOnPrevDay = (getTargetDateByCurrentPosition(dayOffset) + .getTime() - from.getTime()) / DateConstants.MINUTEINMILLIS; startFromMinutes = -1 * minutesOnPrevDay; } @@ -554,8 +535,7 @@ public class DateCellDayEvent extends FocusableHTML implements } /** - * @return the minimum amount of ms that an event must last when - * resized + * @return the minimum amount of ms that an event must last when resized */ private long getMinTimeRange() { return DateConstants.MINUTEINMILLIS * 30; @@ -573,8 +553,7 @@ public class DateCellDayEvent extends FocusableHTML implements buffer.append(","); buffer.append(DateUtil.formatClientSideDate(event.getStart())); buffer.append("-"); - buffer.append(DateUtil.formatClientSideTime(event - .getStartTime())); + buffer.append(DateUtil.formatClientSideTime(event.getStartTime())); buffer.append(","); buffer.append(DateUtil.formatClientSideDate(event.getEnd())); buffer.append("-"); @@ -643,11 +622,12 @@ public class DateCellDayEvent extends FocusableHTML implements return disabled; } + @Override public void onContextMenu(ContextMenuEvent event) { - if (this.dateCell.weekgrid.getCalendar().getMouseEventListener() != null) { + if (dateCell.weekgrid.getCalendar().getMouseEventListener() != null) { event.preventDefault(); event.stopPropagation(); - this.dateCell.weekgrid.getCalendar().getMouseEventListener() + dateCell.weekgrid.getCalendar().getMouseEventListener() .contextMenu(event, this); } } diff --git a/client/src/com/vaadin/client/ui/calendar/schedule/DateCellGroup.java b/client/src/com/vaadin/client/ui/calendar/schedule/DateCellGroup.java index d2add53389..79276eab7b 100644 --- a/client/src/com/vaadin/client/ui/calendar/schedule/DateCellGroup.java +++ b/client/src/com/vaadin/client/ui/calendar/schedule/DateCellGroup.java @@ -19,7 +19,6 @@ import java.util.ArrayList; import java.util.Date; import java.util.List; - /** * Internally used by the calendar * diff --git a/client/src/com/vaadin/client/ui/calendar/schedule/DayToolbar.java b/client/src/com/vaadin/client/ui/calendar/schedule/DayToolbar.java index bb0155d892..6233e8111e 100644 --- a/client/src/com/vaadin/client/ui/calendar/schedule/DayToolbar.java +++ b/client/src/com/vaadin/client/ui/calendar/schedule/DayToolbar.java @@ -109,6 +109,7 @@ public class DayToolbar extends HorizontalPanel implements ClickHandler { } l.addClickHandler(new ClickHandler() { + @Override public void onClick(ClickEvent event) { if (calendar.getDateClickListener() != null) { calendar.getDateClickListener().dateClick(date); @@ -133,6 +134,7 @@ public class DayToolbar extends HorizontalPanel implements ClickHandler { add(nextLabel); } + @Override public void onClick(ClickEvent event) { if (!calendar.isDisabledOrReadOnly()) { if (event.getSource() == nextLabel) { diff --git a/client/src/com/vaadin/client/ui/calendar/schedule/FocusableComplexPanel.java b/client/src/com/vaadin/client/ui/calendar/schedule/FocusableComplexPanel.java index 62332385d2..6b42caec10 100644 --- a/client/src/com/vaadin/client/ui/calendar/schedule/FocusableComplexPanel.java +++ b/client/src/com/vaadin/client/ui/calendar/schedule/FocusableComplexPanel.java @@ -56,6 +56,7 @@ public class FocusableComplexPanel extends ComplexPanel implements * com.google.gwt.event.dom.client.HasFocusHandlers#addFocusHandler(com. * google.gwt.event.dom.client.FocusHandler) */ + @Override public HandlerRegistration addFocusHandler(FocusHandler handler) { return addDomHandler(handler, FocusEvent.getType()); } @@ -67,6 +68,7 @@ public class FocusableComplexPanel extends ComplexPanel implements * com.google.gwt.event.dom.client.HasBlurHandlers#addBlurHandler(com.google * .gwt.event.dom.client.BlurHandler) */ + @Override public HandlerRegistration addBlurHandler(BlurHandler handler) { return addDomHandler(handler, BlurEvent.getType()); } @@ -78,6 +80,7 @@ public class FocusableComplexPanel extends ComplexPanel implements * com.google.gwt.event.dom.client.HasKeyDownHandlers#addKeyDownHandler( * com.google.gwt.event.dom.client.KeyDownHandler) */ + @Override public HandlerRegistration addKeyDownHandler(KeyDownHandler handler) { return addDomHandler(handler, KeyDownEvent.getType()); } @@ -89,6 +92,7 @@ public class FocusableComplexPanel extends ComplexPanel implements * com.google.gwt.event.dom.client.HasKeyPressHandlers#addKeyPressHandler * (com.google.gwt.event.dom.client.KeyPressHandler) */ + @Override public HandlerRegistration addKeyPressHandler(KeyPressHandler handler) { return addDomHandler(handler, KeyPressEvent.getType()); } @@ -111,6 +115,7 @@ public class FocusableComplexPanel extends ComplexPanel implements /** * Focus the panel */ + @Override public void focus() { setFocus(true); } diff --git a/client/src/com/vaadin/client/ui/calendar/schedule/FocusableGrid.java b/client/src/com/vaadin/client/ui/calendar/schedule/FocusableGrid.java index d3177362bf..b40f1c3652 100644 --- a/client/src/com/vaadin/client/ui/calendar/schedule/FocusableGrid.java +++ b/client/src/com/vaadin/client/ui/calendar/schedule/FocusableGrid.java @@ -68,6 +68,7 @@ public class FocusableGrid extends Grid implements HasFocusHandlers, * com.google.gwt.event.dom.client.HasFocusHandlers#addFocusHandler(com. * google.gwt.event.dom.client.FocusHandler) */ + @Override public HandlerRegistration addFocusHandler(FocusHandler handler) { return addDomHandler(handler, FocusEvent.getType()); } @@ -79,6 +80,7 @@ public class FocusableGrid extends Grid implements HasFocusHandlers, * com.google.gwt.event.dom.client.HasBlurHandlers#addBlurHandler(com.google * .gwt.event.dom.client.BlurHandler) */ + @Override public HandlerRegistration addBlurHandler(BlurHandler handler) { return addDomHandler(handler, BlurEvent.getType()); } @@ -90,6 +92,7 @@ public class FocusableGrid extends Grid implements HasFocusHandlers, * com.google.gwt.event.dom.client.HasKeyDownHandlers#addKeyDownHandler( * com.google.gwt.event.dom.client.KeyDownHandler) */ + @Override public HandlerRegistration addKeyDownHandler(KeyDownHandler handler) { return addDomHandler(handler, KeyDownEvent.getType()); } @@ -101,6 +104,7 @@ public class FocusableGrid extends Grid implements HasFocusHandlers, * com.google.gwt.event.dom.client.HasKeyPressHandlers#addKeyPressHandler * (com.google.gwt.event.dom.client.KeyPressHandler) */ + @Override public HandlerRegistration addKeyPressHandler(KeyPressHandler handler) { return addDomHandler(handler, KeyPressEvent.getType()); } @@ -123,6 +127,7 @@ public class FocusableGrid extends Grid implements HasFocusHandlers, /** * Focus the panel */ + @Override public void focus() { setFocus(true); } diff --git a/client/src/com/vaadin/client/ui/calendar/schedule/FocusableHTML.java b/client/src/com/vaadin/client/ui/calendar/schedule/FocusableHTML.java index c3fe1958f0..31d810608a 100644 --- a/client/src/com/vaadin/client/ui/calendar/schedule/FocusableHTML.java +++ b/client/src/com/vaadin/client/ui/calendar/schedule/FocusableHTML.java @@ -58,6 +58,7 @@ public class FocusableHTML extends HTML implements HasFocusHandlers, * com.google.gwt.event.dom.client.HasFocusHandlers#addFocusHandler(com. * google.gwt.event.dom.client.FocusHandler) */ + @Override public HandlerRegistration addFocusHandler(FocusHandler handler) { return addDomHandler(handler, FocusEvent.getType()); } @@ -69,6 +70,7 @@ public class FocusableHTML extends HTML implements HasFocusHandlers, * com.google.gwt.event.dom.client.HasBlurHandlers#addBlurHandler(com.google * .gwt.event.dom.client.BlurHandler) */ + @Override public HandlerRegistration addBlurHandler(BlurHandler handler) { return addDomHandler(handler, BlurEvent.getType()); } @@ -80,6 +82,7 @@ public class FocusableHTML extends HTML implements HasFocusHandlers, * com.google.gwt.event.dom.client.HasKeyDownHandlers#addKeyDownHandler( * com.google.gwt.event.dom.client.KeyDownHandler) */ + @Override public HandlerRegistration addKeyDownHandler(KeyDownHandler handler) { return addDomHandler(handler, KeyDownEvent.getType()); } @@ -91,6 +94,7 @@ public class FocusableHTML extends HTML implements HasFocusHandlers, * com.google.gwt.event.dom.client.HasKeyPressHandlers#addKeyPressHandler * (com.google.gwt.event.dom.client.KeyPressHandler) */ + @Override public HandlerRegistration addKeyPressHandler(KeyPressHandler handler) { return addDomHandler(handler, KeyPressEvent.getType()); } @@ -113,6 +117,7 @@ public class FocusableHTML extends HTML implements HasFocusHandlers, /** * Focus the panel */ + @Override public void focus() { setFocus(true); } diff --git a/client/src/com/vaadin/client/ui/calendar/schedule/MonthGrid.java b/client/src/com/vaadin/client/ui/calendar/schedule/MonthGrid.java index f5afd12e42..df9bc42d2a 100644 --- a/client/src/com/vaadin/client/ui/calendar/schedule/MonthGrid.java +++ b/client/src/com/vaadin/client/ui/calendar/schedule/MonthGrid.java @@ -191,6 +191,7 @@ public class MonthGrid extends FocusableGrid implements KeyDownHandler { return enabled; } + @Override public void onKeyDown(KeyDownEvent event) { int keycode = event.getNativeKeyCode(); if (KeyCodes.KEY_ESCAPE == keycode && selectionStart != null) { diff --git a/client/src/com/vaadin/client/ui/calendar/schedule/SimpleDayCell.java b/client/src/com/vaadin/client/ui/calendar/schedule/SimpleDayCell.java index 8d1ca0fcda..a2bd008d01 100644 --- a/client/src/com/vaadin/client/ui/calendar/schedule/SimpleDayCell.java +++ b/client/src/com/vaadin/client/ui/calendar/schedule/SimpleDayCell.java @@ -361,6 +361,7 @@ public class SimpleDayCell extends FocusableFlowPanel implements super.onDetach(); } + @Override public void onMouseUp(MouseUpEvent event) { if (event.getNativeButton() != NativeEvent.BUTTON_LEFT) { return; @@ -415,6 +416,7 @@ public class SimpleDayCell extends FocusableFlowPanel implements clickedWidget = null; } + @Override public void onMouseDown(MouseDownEvent event) { if (calendar.isDisabled() || event.getNativeButton() != NativeEvent.BUTTON_LEFT) { @@ -456,11 +458,13 @@ public class SimpleDayCell extends FocusableFlowPanel implements event.preventDefault(); } + @Override public void onMouseOver(MouseOverEvent event) { event.preventDefault(); getMonthGrid().setSelectionEnd(this); } + @Override public void onMouseMove(MouseMoveEvent event) { if (clickedWidget instanceof MonthEventLabel && !monthEventMouseDown || (startY < 0 && startX < 0)) { @@ -566,6 +570,7 @@ public class SimpleDayCell extends FocusableFlowPanel implements Event.setCapture(getElement()); keyDownHandler = addKeyDownHandler(new KeyDownHandler() { + @Override public void onKeyDown(KeyDownEvent event) { if (event.getNativeKeyCode() == KeyCodes.KEY_ESCAPE) { cancelEventDrag(w); diff --git a/client/src/com/vaadin/client/ui/calendar/schedule/SimpleWeekToolbar.java b/client/src/com/vaadin/client/ui/calendar/schedule/SimpleWeekToolbar.java index f86ba03053..59902811cd 100644 --- a/client/src/com/vaadin/client/ui/calendar/schedule/SimpleWeekToolbar.java +++ b/client/src/com/vaadin/client/ui/calendar/schedule/SimpleWeekToolbar.java @@ -98,6 +98,7 @@ public class SimpleWeekToolbar extends FlexTable implements ClickHandler { } } + @Override public void onClick(ClickEvent event) { WeekLabel wl = (WeekLabel) event.getSource(); if (calendar.getWeekClickListener() != null) { diff --git a/client/src/com/vaadin/client/ui/calendar/schedule/WeekGrid.java b/client/src/com/vaadin/client/ui/calendar/schedule/WeekGrid.java index c5646f97ae..450ea29549 100644 --- a/client/src/com/vaadin/client/ui/calendar/schedule/WeekGrid.java +++ b/client/src/com/vaadin/client/ui/calendar/schedule/WeekGrid.java @@ -83,6 +83,7 @@ public class WeekGrid extends SimplePanel { scrollPanel.setWidget(content); scrollPanel.addScrollHandler(new ScrollHandler() { + @Override public void onScroll(ScrollEvent event) { if (calendar.getScrollListener() != null) { calendar.getScrollListener().scroll( diff --git a/client/src/com/vaadin/client/ui/calendar/schedule/WeekGridMinuteTimeRange.java b/client/src/com/vaadin/client/ui/calendar/schedule/WeekGridMinuteTimeRange.java index 27ace91c4e..e634735be7 100644 --- a/client/src/com/vaadin/client/ui/calendar/schedule/WeekGridMinuteTimeRange.java +++ b/client/src/com/vaadin/client/ui/calendar/schedule/WeekGridMinuteTimeRange.java @@ -27,16 +27,16 @@ public class WeekGridMinuteTimeRange { private final Date end; /** - * Creates a Date time range between start and end date. Drops seconds - * from the range. + * Creates a Date time range between start and end date. Drops seconds from + * the range. * * @param start * Start time of the range * @param end * End time of the range * @param clearSeconds - * Boolean Indicates, if seconds should be dropped from the - * range start and end + * Boolean Indicates, if seconds should be dropped from the range + * start and end */ public WeekGridMinuteTimeRange(Date start, Date end) { this.start = new Date(start.getTime()); @@ -53,7 +53,8 @@ public class WeekGridMinuteTimeRange { return end; } - public static boolean doesOverlap(WeekGridMinuteTimeRange a, WeekGridMinuteTimeRange b) { + public static boolean doesOverlap(WeekGridMinuteTimeRange a, + WeekGridMinuteTimeRange b) { boolean overlaps = a.getStart().compareTo(b.getEnd()) < 0 && a.getEnd().compareTo(b.getStart()) > 0; return overlaps; diff --git a/client/src/com/vaadin/client/ui/calendar/schedule/WeeklyLongEvents.java b/client/src/com/vaadin/client/ui/calendar/schedule/WeeklyLongEvents.java index e3b7d5d7fe..f7c5c0dac4 100644 --- a/client/src/com/vaadin/client/ui/calendar/schedule/WeeklyLongEvents.java +++ b/client/src/com/vaadin/client/ui/calendar/schedule/WeeklyLongEvents.java @@ -78,7 +78,8 @@ public class WeeklyLongEvents extends HorizontalPanel implements HasTooltipKey { Date dcDate = dc.getDate(); int comp = dcDate.compareTo(from); int comp2 = dcDate.compareTo(to); - WeeklyLongEventsDateCell eventLabel = dc.getDateCell(calendarEvent.getSlotIndex()); + WeeklyLongEventsDateCell eventLabel = dc.getDateCell(calendarEvent + .getSlotIndex()); eventLabel.setStylePrimaryName("v-calendar-event"); if (comp >= 0 && comp2 <= 0) { eventLabel.setEvent(calendarEvent); diff --git a/client/src/com/vaadin/client/ui/calendar/schedule/dd/CalendarDropHandler.java b/client/src/com/vaadin/client/ui/calendar/schedule/dd/CalendarDropHandler.java index 03db4d091e..aab9ca9c38 100644 --- a/client/src/com/vaadin/client/ui/calendar/schedule/dd/CalendarDropHandler.java +++ b/client/src/com/vaadin/client/ui/calendar/schedule/dd/CalendarDropHandler.java @@ -57,6 +57,7 @@ public abstract class CalendarDropHandler extends VAbstractDropHandler { * com.vaadin.terminal.gwt.client.ui.dd.VDropHandler#getApplicationConnection * () */ + @Override public ApplicationConnection getApplicationConnection() { return calendarConnector.getClient(); } diff --git a/client/src/com/vaadin/client/ui/calendar/schedule/dd/CalendarMonthDropHandler.java b/client/src/com/vaadin/client/ui/calendar/schedule/dd/CalendarMonthDropHandler.java index 6e57fb6fef..913477ee14 100644 --- a/client/src/com/vaadin/client/ui/calendar/schedule/dd/CalendarMonthDropHandler.java +++ b/client/src/com/vaadin/client/ui/calendar/schedule/dd/CalendarMonthDropHandler.java @@ -81,6 +81,7 @@ public class CalendarMonthDropHandler extends CalendarDropHandler { public void dragOver(final VDragEvent drag) { if (isLocationValid(drag.getElementOver())) { validate(new VAcceptCallback() { + @Override public void accepted(VDragEvent event) { dragAccepted(drag); } diff --git a/client/src/com/vaadin/client/ui/calendar/schedule/dd/CalendarWeekDropHandler.java b/client/src/com/vaadin/client/ui/calendar/schedule/dd/CalendarWeekDropHandler.java index fa7aaa428b..0ea683dc3c 100644 --- a/client/src/com/vaadin/client/ui/calendar/schedule/dd/CalendarWeekDropHandler.java +++ b/client/src/com/vaadin/client/ui/calendar/schedule/dd/CalendarWeekDropHandler.java @@ -80,6 +80,7 @@ public class CalendarWeekDropHandler extends CalendarDropHandler { public void dragOver(final VDragEvent drag) { if (isLocationValid(drag.getElementOver())) { validate(new VAcceptCallback() { + @Override public void accepted(VDragEvent event) { dragAccepted(drag); } diff --git a/client/src/com/vaadin/client/ui/ui/UIConnector.java b/client/src/com/vaadin/client/ui/ui/UIConnector.java index 69296b537c..0843b3069d 100644 --- a/client/src/com/vaadin/client/ui/ui/UIConnector.java +++ b/client/src/com/vaadin/client/ui/ui/UIConnector.java @@ -338,8 +338,8 @@ public class UIConnector extends AbstractSingleComponentContainerConnector } /** - * Reads CSS strings and resources injected by {@link Styles#inject} - * from the UIDL stream. + * Reads CSS strings and resources injected by {@link Styles#inject} from + * the UIDL stream. * * @param uidl * The uidl which contains "css-resource" and "css-string" tags diff --git a/server/src/com/vaadin/data/fieldgroup/FieldGroup.java b/server/src/com/vaadin/data/fieldgroup/FieldGroup.java index 6c515dbdee..981aea387d 100644 --- a/server/src/com/vaadin/data/fieldgroup/FieldGroup.java +++ b/server/src/com/vaadin/data/fieldgroup/FieldGroup.java @@ -919,7 +919,8 @@ public class FieldGroup implements Serializable { for (Object itemPropertyId : dataSource.getItemPropertyIds()) { if (itemPropertyId instanceof String) { String itemPropertyName = (String) itemPropertyId; - if (minifiedFieldName.equals(minifyFieldName(itemPropertyName))) { + if (minifiedFieldName + .equals(minifyFieldName(itemPropertyName))) { return itemPropertyName; } } diff --git a/server/src/com/vaadin/server/BrowserWindowOpener.java b/server/src/com/vaadin/server/BrowserWindowOpener.java index 8e049ca454..a6e420f89c 100644 --- a/server/src/com/vaadin/server/BrowserWindowOpener.java +++ b/server/src/com/vaadin/server/BrowserWindowOpener.java @@ -38,7 +38,8 @@ public class BrowserWindowOpener extends AbstractExtension { private final String path; private final Class<? extends UI> uiClass; - public BrowserWindowOpenerUIProvider(Class<? extends UI> uiClass, String path) { + public BrowserWindowOpenerUIProvider(Class<? extends UI> uiClass, + String path) { this.path = ensureInitialSlash(path); this.uiClass = uiClass; } diff --git a/server/src/com/vaadin/server/communication/AbstractStreamingEvent.java b/server/src/com/vaadin/server/communication/AbstractStreamingEvent.java index 054bc14f2d..b97a60fd56 100644 --- a/server/src/com/vaadin/server/communication/AbstractStreamingEvent.java +++ b/server/src/com/vaadin/server/communication/AbstractStreamingEvent.java @@ -15,7 +15,6 @@ */ package com.vaadin.server.communication; -import com.vaadin.server.StreamVariable; import com.vaadin.server.StreamVariable.StreamingEvent; /** diff --git a/server/src/com/vaadin/server/communication/ConnectorHierarchyWriter.java b/server/src/com/vaadin/server/communication/ConnectorHierarchyWriter.java index 963886edbb..467bddbdce 100644 --- a/server/src/com/vaadin/server/communication/ConnectorHierarchyWriter.java +++ b/server/src/com/vaadin/server/communication/ConnectorHierarchyWriter.java @@ -26,8 +26,8 @@ import org.json.JSONException; import org.json.JSONObject; import com.vaadin.server.AbstractClientConnector; -import com.vaadin.server.LegacyCommunicationManager; import com.vaadin.server.ClientConnector; +import com.vaadin.server.LegacyCommunicationManager; import com.vaadin.server.PaintException; import com.vaadin.ui.UI; diff --git a/server/src/com/vaadin/server/communication/PortletListenerNotifier.java b/server/src/com/vaadin/server/communication/PortletListenerNotifier.java index c64819ca44..5c03a6f4dc 100644 --- a/server/src/com/vaadin/server/communication/PortletListenerNotifier.java +++ b/server/src/com/vaadin/server/communication/PortletListenerNotifier.java @@ -29,8 +29,8 @@ import javax.portlet.RenderResponse; import javax.portlet.ResourceRequest; import javax.portlet.ResourceResponse; -import com.vaadin.server.SynchronizedRequestHandler; import com.vaadin.server.ServletPortletHelper; +import com.vaadin.server.SynchronizedRequestHandler; import com.vaadin.server.VaadinPortletRequest; import com.vaadin.server.VaadinPortletResponse; import com.vaadin.server.VaadinPortletSession; diff --git a/server/src/com/vaadin/server/communication/ResourceWriter.java b/server/src/com/vaadin/server/communication/ResourceWriter.java index 86f8dd3b36..080027943f 100644 --- a/server/src/com/vaadin/server/communication/ResourceWriter.java +++ b/server/src/com/vaadin/server/communication/ResourceWriter.java @@ -25,8 +25,8 @@ import java.util.Iterator; import java.util.logging.Level; import java.util.logging.Logger; -import com.vaadin.server.LegacyCommunicationManager; import com.vaadin.server.JsonPaintTarget; +import com.vaadin.server.LegacyCommunicationManager; import com.vaadin.ui.CustomLayout; import com.vaadin.ui.UI; diff --git a/server/src/com/vaadin/server/communication/StreamingEndEventImpl.java b/server/src/com/vaadin/server/communication/StreamingEndEventImpl.java index e241bbbfaf..f8cfb160be 100644 --- a/server/src/com/vaadin/server/communication/StreamingEndEventImpl.java +++ b/server/src/com/vaadin/server/communication/StreamingEndEventImpl.java @@ -15,7 +15,6 @@ */ package com.vaadin.server.communication; -import com.vaadin.server.StreamVariable; import com.vaadin.server.StreamVariable.StreamingEndEvent; @SuppressWarnings("serial") diff --git a/server/src/com/vaadin/server/communication/StreamingErrorEventImpl.java b/server/src/com/vaadin/server/communication/StreamingErrorEventImpl.java index 1ee74c68b6..9d9a19e4fe 100644 --- a/server/src/com/vaadin/server/communication/StreamingErrorEventImpl.java +++ b/server/src/com/vaadin/server/communication/StreamingErrorEventImpl.java @@ -15,7 +15,6 @@ */ package com.vaadin.server.communication; -import com.vaadin.server.StreamVariable; import com.vaadin.server.StreamVariable.StreamingErrorEvent; @SuppressWarnings("serial") diff --git a/server/src/com/vaadin/server/communication/StreamingProgressEventImpl.java b/server/src/com/vaadin/server/communication/StreamingProgressEventImpl.java index c07e37e196..69f3bfb29c 100644 --- a/server/src/com/vaadin/server/communication/StreamingProgressEventImpl.java +++ b/server/src/com/vaadin/server/communication/StreamingProgressEventImpl.java @@ -15,7 +15,6 @@ */ package com.vaadin.server.communication; -import com.vaadin.server.StreamVariable; import com.vaadin.server.StreamVariable.StreamingProgressEvent; @SuppressWarnings("serial") diff --git a/server/src/com/vaadin/server/communication/StreamingStartEventImpl.java b/server/src/com/vaadin/server/communication/StreamingStartEventImpl.java index a7f13be499..bd16f08801 100644 --- a/server/src/com/vaadin/server/communication/StreamingStartEventImpl.java +++ b/server/src/com/vaadin/server/communication/StreamingStartEventImpl.java @@ -15,7 +15,6 @@ */ package com.vaadin.server.communication; -import com.vaadin.server.StreamVariable; import com.vaadin.server.StreamVariable.StreamingStartEvent; @SuppressWarnings("serial") diff --git a/server/src/com/vaadin/ui/AbstractColorPicker.java b/server/src/com/vaadin/ui/AbstractColorPicker.java index d7037e366d..c3bdd49155 100644 --- a/server/src/com/vaadin/ui/AbstractColorPicker.java +++ b/server/src/com/vaadin/ui/AbstractColorPicker.java @@ -405,6 +405,7 @@ public abstract class AbstractColorPicker extends AbstractComponent implements window.setImmediate(true); window.addCloseListener(this); window.addColorChangeListener(new ColorChangeListener() { + @Override public void colorChanged(ColorChangeEvent event) { AbstractColorPicker.this.colorChanged(event); } diff --git a/server/src/com/vaadin/ui/AbstractOrderedLayout.java b/server/src/com/vaadin/ui/AbstractOrderedLayout.java index b06b2e0871..c9eb756daa 100644 --- a/server/src/com/vaadin/ui/AbstractOrderedLayout.java +++ b/server/src/com/vaadin/ui/AbstractOrderedLayout.java @@ -439,6 +439,7 @@ public abstract class AbstractOrderedLayout extends AbstractLayout implements * com.vaadin.ui.Layout.AlignmentHandler#setDefaultComponentAlignment(com * .vaadin.ui.Alignment) */ + @Override public void setDefaultComponentAlignment(Alignment defaultAlignment) { defaultComponentAlignment = defaultAlignment; } diff --git a/server/src/com/vaadin/ui/Calendar.java b/server/src/com/vaadin/ui/Calendar.java index 4bf2885a8c..38fa355dd8 100644 --- a/server/src/com/vaadin/ui/Calendar.java +++ b/server/src/com/vaadin/ui/Calendar.java @@ -1206,14 +1206,16 @@ public class Calendar extends AbstractComponent implements // remove old listener if (getEventProvider() instanceof EventSetChangeNotifier) { - ((EventSetChangeNotifier) getEventProvider()).removeEventSetChangeListener(this); + ((EventSetChangeNotifier) getEventProvider()) + .removeEventSetChangeListener(this); } this.calendarEventProvider = calendarEventProvider; // add new listener if (calendarEventProvider instanceof EventSetChangeNotifier) { - ((EventSetChangeNotifier) calendarEventProvider).addEventSetChangeListener(this); + ((EventSetChangeNotifier) calendarEventProvider) + .addEventSetChangeListener(this); } } @@ -1232,6 +1234,7 @@ public class Calendar extends AbstractComponent implements * com.vaadin.addon.calendar.ui.CalendarEvents.EventChangeListener#eventChange * (com.vaadin.addon.calendar.ui.CalendarEvents.EventChange) */ + @Override public void eventSetChange(EventSetChangeEvent changeEvent) { // sanity check if (calendarEventProvider == changeEvent.getProvider()) { @@ -1276,6 +1279,7 @@ public class Calendar extends AbstractComponent implements * #addListener * (com.vaadin.addon.calendar.ui.CalendarComponentEvents.ForwardHandler) */ + @Override public void setHandler(ForwardHandler listener) { setHandler(ForwardEvent.EVENT_ID, ForwardEvent.class, listener, ForwardHandler.forwardMethod); @@ -1289,6 +1293,7 @@ public class Calendar extends AbstractComponent implements * #addListener * (com.vaadin.addon.calendar.ui.CalendarComponentEvents.BackwardHandler) */ + @Override public void setHandler(BackwardHandler listener) { setHandler(BackwardEvent.EVENT_ID, BackwardEvent.class, listener, BackwardHandler.backwardMethod); @@ -1302,6 +1307,7 @@ public class Calendar extends AbstractComponent implements * #addListener * (com.vaadin.addon.calendar.ui.CalendarComponentEvents.DateClickHandler) */ + @Override public void setHandler(DateClickHandler listener) { setHandler(DateClickEvent.EVENT_ID, DateClickEvent.class, listener, DateClickHandler.dateClickMethod); @@ -1315,6 +1321,7 @@ public class Calendar extends AbstractComponent implements * #addListener * (com.vaadin.addon.calendar.ui.CalendarComponentEvents.EventClickHandler) */ + @Override public void setHandler(EventClickHandler listener) { setHandler(EventClick.EVENT_ID, EventClick.class, listener, EventClickHandler.eventClickMethod); @@ -1328,6 +1335,7 @@ public class Calendar extends AbstractComponent implements * #addListener * (com.vaadin.addon.calendar.ui.CalendarComponentEvents.WeekClickHandler) */ + @Override public void setHandler(WeekClickHandler listener) { setHandler(WeekClick.EVENT_ID, WeekClick.class, listener, WeekClickHandler.weekClickMethod); @@ -1342,6 +1350,7 @@ public class Calendar extends AbstractComponent implements * (com.vaadin.addon.calendar.ui.CalendarComponentEvents.EventResizeHandler * ) */ + @Override public void setHandler(EventResizeHandler listener) { setHandler(EventResize.EVENT_ID, EventResize.class, listener, EventResizeHandler.eventResizeMethod); @@ -1356,6 +1365,7 @@ public class Calendar extends AbstractComponent implements * (com.vaadin.addon.calendar.ui.CalendarComponentEvents.RangeSelectHandler * ) */ + @Override public void setHandler(RangeSelectHandler listener) { setHandler(RangeSelectEvent.EVENT_ID, RangeSelectEvent.class, listener, RangeSelectHandler.rangeSelectMethod); @@ -1370,6 +1380,7 @@ public class Calendar extends AbstractComponent implements * #addListener * (com.vaadin.addon.calendar.ui.CalendarComponentEvents.EventMoveHandler) */ + @Override public void setHandler(EventMoveHandler listener) { setHandler(MoveEvent.EVENT_ID, MoveEvent.class, listener, EventMoveHandler.eventMoveMethod); @@ -1382,6 +1393,7 @@ public class Calendar extends AbstractComponent implements * com.vaadin.addon.calendar.ui.CalendarComponentEvents.CalendarEventNotifier * #getHandler(java.lang.String) */ + @Override public EventListener getHandler(String eventId) { return handlers.get(eventId); } @@ -1389,6 +1401,7 @@ public class Calendar extends AbstractComponent implements /** * Get the currently active drop handler */ + @Override public DropHandler getDropHandler() { return dropHandler; } @@ -1410,6 +1423,7 @@ public class Calendar extends AbstractComponent implements * @see * com.vaadin.event.dd.DropTarget#translateDropTargetDetails(java.util.Map) */ + @Override public TargetDetails translateDropTargetDetails( Map<String, Object> clientVariables) { Map<String, Object> serverVariables = new HashMap<String, Object>(1); @@ -1458,12 +1472,14 @@ public class Calendar extends AbstractComponent implements public void setContainerDataSource(Container.Indexed container) { ContainerEventProvider provider = new ContainerEventProvider(container); provider.addEventSetChangeListener(new CalendarEventProvider.EventSetChangeListener() { + @Override public void eventSetChange(EventSetChangeEvent changeEvent) { // Repaint if events change markAsDirty(); } }); provider.addEventChangeListener(new EventChangeListener() { + @Override public void eventChange(EventChangeEvent changeEvent) { // Repaint if event changes markAsDirty(); @@ -1506,12 +1522,14 @@ public class Calendar extends AbstractComponent implements provider.setEndDateProperty(endDateProperty); provider.setStyleNameProperty(styleNameProperty); provider.addEventSetChangeListener(new CalendarEventProvider.EventSetChangeListener() { + @Override public void eventSetChange(EventSetChangeEvent changeEvent) { // Repaint if events change markAsDirty(); } }); provider.addEventChangeListener(new EventChangeListener() { + @Override public void eventChange(EventChangeEvent changeEvent) { // Repaint if event changes markAsDirty(); @@ -1527,6 +1545,7 @@ public class Calendar extends AbstractComponent implements * com.vaadin.addon.calendar.event.CalendarEventProvider#getEvents(java. * util.Date, java.util.Date) */ + @Override public List<CalendarEvent> getEvents(Date startDate, Date endDate) { return getEventProvider().getEvents(startDate, endDate); } @@ -1538,6 +1557,7 @@ public class Calendar extends AbstractComponent implements * com.vaadin.addon.calendar.event.CalendarEditableEventProvider#addEvent * (com.vaadin.addon.calendar.event.CalendarEvent) */ + @Override public void addEvent(CalendarEvent event) { if (getEventProvider() instanceof CalendarEditableEventProvider) { CalendarEditableEventProvider provider = (CalendarEditableEventProvider) getEventProvider(); @@ -1556,6 +1576,7 @@ public class Calendar extends AbstractComponent implements * com.vaadin.addon.calendar.event.CalendarEditableEventProvider#removeEvent * (com.vaadin.addon.calendar.event.CalendarEvent) */ + @Override public void removeEvent(CalendarEvent event) { if (getEventProvider() instanceof CalendarEditableEventProvider) { CalendarEditableEventProvider provider = (CalendarEditableEventProvider) getEventProvider(); @@ -1599,6 +1620,7 @@ public class Calendar extends AbstractComponent implements * </ul> * </p> */ + @Override public void addActionHandler(Handler actionHandler) { if (actionHandler != null) { if (actionHandlers == null) { @@ -1635,6 +1657,7 @@ public class Calendar extends AbstractComponent implements * com.vaadin.event.Action.Container#removeActionHandler(com.vaadin.event * .Action.Handler) */ + @Override public void removeActionHandler(Handler actionHandler) { if (actionHandlers != null && actionHandlers.contains(actionHandler)) { actionHandlers.remove(actionHandler); diff --git a/server/src/com/vaadin/ui/GridLayout.java b/server/src/com/vaadin/ui/GridLayout.java index 60664c8937..53a25c1c83 100644 --- a/server/src/com/vaadin/ui/GridLayout.java +++ b/server/src/com/vaadin/ui/GridLayout.java @@ -1245,6 +1245,7 @@ public class GridLayout extends AbstractLayout implements * com.vaadin.ui.Layout.AlignmentHandler#setDefaultComponentAlignment(com * .vaadin.ui.Alignment) */ + @Override public void setDefaultComponentAlignment(Alignment defaultAlignment) { defaultComponentAlignment = defaultAlignment; } diff --git a/server/src/com/vaadin/ui/Window.java b/server/src/com/vaadin/ui/Window.java index 0c1509663a..479992d084 100644 --- a/server/src/com/vaadin/ui/Window.java +++ b/server/src/com/vaadin/ui/Window.java @@ -489,7 +489,8 @@ public class Window extends Panel implements FocusNotifier, BlurNotifier, * @param listener * the DisplayStateChangeListener to add. */ - public void addDisplayStateChangeListener(DisplayStateChangeListener listener) { + public void addDisplayStateChangeListener( + DisplayStateChangeListener listener) { addListener(DisplayStateChangeEvent.class, listener, DisplayStateChangeListener.displayStateChangeMethod); } @@ -500,7 +501,8 @@ public class Window extends Panel implements FocusNotifier, BlurNotifier, * @param listener * the DisplayStateChangeListener to remove. */ - public void removeDisplayStateChangeListener(DisplayStateChangeListener listener) { + public void removeDisplayStateChangeListener( + DisplayStateChangeListener listener) { removeListener(DisplayStateChangeEvent.class, listener, DisplayStateChangeListener.displayStateChangeMethod); } diff --git a/server/src/com/vaadin/ui/components/calendar/ContainerEventProvider.java b/server/src/com/vaadin/ui/components/calendar/ContainerEventProvider.java index b01140eb88..37ea255d27 100644 --- a/server/src/com/vaadin/ui/components/calendar/ContainerEventProvider.java +++ b/server/src/com/vaadin/ui/components/calendar/ContainerEventProvider.java @@ -239,6 +239,7 @@ public class ContainerEventProvider implements CalendarEditableEventProvider, * com.vaadin.addon.calendar.event.CalendarEventProvider#getEvents(java. * util.Date, java.util.Date) */ + @Override public List<CalendarEvent> getEvents(Date startDate, Date endDate) { eventCache.clear(); @@ -315,6 +316,7 @@ public class ContainerEventProvider implements CalendarEditableEventProvider, * #addListener(com.vaadin.addon.calendar.event.CalendarEventProvider. * EventSetChangeListener) */ + @Override public void addEventSetChangeListener(EventSetChangeListener listener) { if (!eventSetChangeListeners.contains(listener)) { eventSetChangeListeners.add(listener); @@ -329,6 +331,7 @@ public class ContainerEventProvider implements CalendarEditableEventProvider, * #removeListener(com.vaadin.addon.calendar.event.CalendarEventProvider. * EventSetChangeListener) */ + @Override public void removeEventSetChangeListener(EventSetChangeListener listener) { eventSetChangeListeners.remove(listener); } @@ -340,6 +343,7 @@ public class ContainerEventProvider implements CalendarEditableEventProvider, * com.vaadin.addon.calendar.event.CalendarEvent.EventChangeNotifier#addListener * (com.vaadin.addon.calendar.event.CalendarEvent.EventChangeListener) */ + @Override public void addEventChangeListener(EventChangeListener listener) { if (eventChangeListeners.contains(listener)) { eventChangeListeners.add(listener); @@ -353,6 +357,7 @@ public class ContainerEventProvider implements CalendarEditableEventProvider, * removeListener * (com.vaadin.addon.calendar.event.CalendarEvent.EventChangeListener) */ + @Override public void removeEventChangeListener(EventChangeListener listener) { eventChangeListeners.remove(listener); } @@ -434,6 +439,7 @@ public class ContainerEventProvider implements CalendarEditableEventProvider, * com.vaadin.data.Container.ItemSetChangeListener#containerItemSetChange * (com.vaadin.data.Container.ItemSetChangeEvent) */ + @Override public void containerItemSetChange(ItemSetChangeEvent event) { if (event.getContainer() == container) { // Trigger an eventset change event when the itemset changes @@ -450,6 +456,7 @@ public class ContainerEventProvider implements CalendarEditableEventProvider, * com.vaadin.data.Property.ValueChangeListener#valueChange(com.vaadin.data * .Property.ValueChangeEvent) */ + @Override public void valueChange(ValueChangeEvent event) { /* * TODO Need to figure out how to get the item which triggered the the @@ -466,6 +473,7 @@ public class ContainerEventProvider implements CalendarEditableEventProvider, * #eventMove * (com.vaadin.addon.calendar.ui.CalendarComponentEvents.MoveEvent) */ + @Override public void eventMove(MoveEvent event) { CalendarEvent ce = event.getCalendarEvent(); if (eventCache.contains(ce)) { @@ -496,6 +504,7 @@ public class ContainerEventProvider implements CalendarEditableEventProvider, * #eventResize * (com.vaadin.addon.calendar.ui.CalendarComponentEvents.EventResize) */ + @Override public void eventResize(EventResize event) { CalendarEvent ce = event.getCalendarEvent(); if (eventCache.contains(ce)) { @@ -531,6 +540,7 @@ public class ContainerEventProvider implements CalendarEditableEventProvider, * com.vaadin.addon.calendar.event.CalendarEditableEventProvider#addEvent * (com.vaadin.addon.calendar.event.CalendarEvent) */ + @Override public void addEvent(CalendarEvent event) { Item item; try { @@ -560,6 +570,7 @@ public class ContainerEventProvider implements CalendarEditableEventProvider, * com.vaadin.addon.calendar.event.CalendarEditableEventProvider#removeEvent * (com.vaadin.addon.calendar.event.CalendarEvent) */ + @Override public void removeEvent(CalendarEvent event) { container.removeItem(event); } diff --git a/server/src/com/vaadin/ui/components/calendar/event/BasicEvent.java b/server/src/com/vaadin/ui/components/calendar/event/BasicEvent.java index ab342dfabf..3f14145f0c 100644 --- a/server/src/com/vaadin/ui/components/calendar/event/BasicEvent.java +++ b/server/src/com/vaadin/ui/components/calendar/event/BasicEvent.java @@ -91,6 +91,7 @@ public class BasicEvent implements EditableCalendarEvent, EventChangeNotifier { * * @see com.vaadin.addon.calendar.event.CalendarEvent#getCaption() */ + @Override public String getCaption() { return caption; } @@ -100,6 +101,7 @@ public class BasicEvent implements EditableCalendarEvent, EventChangeNotifier { * * @see com.vaadin.addon.calendar.event.CalendarEvent#getDescription() */ + @Override public String getDescription() { return description; } @@ -109,6 +111,7 @@ public class BasicEvent implements EditableCalendarEvent, EventChangeNotifier { * * @see com.vaadin.addon.calendar.event.CalendarEvent#getEnd() */ + @Override public Date getEnd() { return end; } @@ -118,6 +121,7 @@ public class BasicEvent implements EditableCalendarEvent, EventChangeNotifier { * * @see com.vaadin.addon.calendar.event.CalendarEvent#getStart() */ + @Override public Date getStart() { return start; } @@ -127,6 +131,7 @@ public class BasicEvent implements EditableCalendarEvent, EventChangeNotifier { * * @see com.vaadin.addon.calendar.event.CalendarEvent#getStyleName() */ + @Override public String getStyleName() { return styleName; } @@ -136,6 +141,7 @@ public class BasicEvent implements EditableCalendarEvent, EventChangeNotifier { * * @see com.vaadin.addon.calendar.event.CalendarEvent#isAllDay() */ + @Override public boolean isAllDay() { return isAllDay; } @@ -147,6 +153,7 @@ public class BasicEvent implements EditableCalendarEvent, EventChangeNotifier { * com.vaadin.addon.calendar.event.CalendarEventEditor#setCaption(java.lang * .String) */ + @Override public void setCaption(String caption) { this.caption = caption; fireEventChange(); @@ -159,6 +166,7 @@ public class BasicEvent implements EditableCalendarEvent, EventChangeNotifier { * com.vaadin.addon.calendar.event.CalendarEventEditor#setDescription(java * .lang.String) */ + @Override public void setDescription(String description) { this.description = description; fireEventChange(); @@ -171,6 +179,7 @@ public class BasicEvent implements EditableCalendarEvent, EventChangeNotifier { * com.vaadin.addon.calendar.event.CalendarEventEditor#setEnd(java.util. * Date) */ + @Override public void setEnd(Date end) { this.end = end; fireEventChange(); @@ -183,6 +192,7 @@ public class BasicEvent implements EditableCalendarEvent, EventChangeNotifier { * com.vaadin.addon.calendar.event.CalendarEventEditor#setStart(java.util * .Date) */ + @Override public void setStart(Date start) { this.start = start; fireEventChange(); @@ -195,6 +205,7 @@ public class BasicEvent implements EditableCalendarEvent, EventChangeNotifier { * com.vaadin.addon.calendar.event.CalendarEventEditor#setStyleName(java * .lang.String) */ + @Override public void setStyleName(String styleName) { this.styleName = styleName; fireEventChange(); @@ -206,6 +217,7 @@ public class BasicEvent implements EditableCalendarEvent, EventChangeNotifier { * @see * com.vaadin.addon.calendar.event.CalendarEventEditor#setAllDay(boolean) */ + @Override public void setAllDay(boolean isAllDay) { this.isAllDay = isAllDay; fireEventChange(); @@ -220,6 +232,7 @@ public class BasicEvent implements EditableCalendarEvent, EventChangeNotifier { * (com.vaadin.addon.calendar.ui.CalendarComponentEvents.EventChangeListener * ) */ + @Override public void addEventChangeListener(EventChangeListener listener) { listeners.add(listener); } @@ -233,6 +246,7 @@ public class BasicEvent implements EditableCalendarEvent, EventChangeNotifier { * (com.vaadin.addon.calendar.ui.CalendarComponentEvents.EventChangeListener * ) */ + @Override public void removeEventChangeListener(EventChangeListener listener) { listeners.remove(listener); } diff --git a/server/src/com/vaadin/ui/components/calendar/event/BasicEventProvider.java b/server/src/com/vaadin/ui/components/calendar/event/BasicEventProvider.java index 0314652245..b2b74a5e52 100644 --- a/server/src/com/vaadin/ui/components/calendar/event/BasicEventProvider.java +++ b/server/src/com/vaadin/ui/components/calendar/event/BasicEventProvider.java @@ -56,6 +56,7 @@ public class BasicEventProvider implements CalendarEditableEventProvider, * com.vaadin.addon.calendar.event.CalendarEventProvider#getEvents(java. * util.Date, java.util.Date) */ + @Override public List<CalendarEvent> getEvents(Date startDate, Date endDate) { ArrayList<CalendarEvent> activeEvents = new ArrayList<CalendarEvent>(); @@ -98,6 +99,7 @@ public class BasicEventProvider implements CalendarEditableEventProvider, * (com.vaadin.addon.calendar.ui.CalendarComponentEvents.EventSetChangeListener * ) */ + @Override public void addEventSetChangeListener(EventSetChangeListener listener) { listeners.add(listener); @@ -112,6 +114,7 @@ public class BasicEventProvider implements CalendarEditableEventProvider, * (com.vaadin.addon.calendar.ui.CalendarComponentEvents.EventSetChangeListener * ) */ + @Override public void removeEventSetChangeListener(EventSetChangeListener listener) { listeners.remove(listener); } @@ -136,6 +139,7 @@ public class BasicEventProvider implements CalendarEditableEventProvider, * #eventChange * (com.vaadin.addon.calendar.ui.CalendarComponentEvents.EventSetChange) */ + @Override public void eventChange(EventChangeEvent changeEvent) { // naive implementation fireEventSetChange(); @@ -148,6 +152,7 @@ public class BasicEventProvider implements CalendarEditableEventProvider, * com.vaadin.addon.calendar.event.CalendarEditableEventProvider#addEvent * (com.vaadin.addon.calendar.event.CalendarEvent) */ + @Override public void addEvent(CalendarEvent event) { eventList.add(event); if (event instanceof BasicEvent) { @@ -163,6 +168,7 @@ public class BasicEventProvider implements CalendarEditableEventProvider, * com.vaadin.addon.calendar.event.CalendarEditableEventProvider#removeEvent * (com.vaadin.addon.calendar.event.CalendarEvent) */ + @Override public void removeEvent(CalendarEvent event) { eventList.remove(event); if (event instanceof BasicEvent) { diff --git a/server/src/com/vaadin/ui/components/calendar/handler/BasicBackwardHandler.java b/server/src/com/vaadin/ui/components/calendar/handler/BasicBackwardHandler.java index fc2bfd6df4..65e9c94dec 100644 --- a/server/src/com/vaadin/ui/components/calendar/handler/BasicBackwardHandler.java +++ b/server/src/com/vaadin/ui/components/calendar/handler/BasicBackwardHandler.java @@ -39,6 +39,7 @@ public class BasicBackwardHandler implements BackwardHandler { * backward * (com.vaadin.addon.calendar.ui.CalendarComponentEvents.BackwardEvent) */ + @Override public void backward(BackwardEvent event) { Date start = event.getComponent().getStartDate(); Date end = event.getComponent().getEndDate(); diff --git a/server/src/com/vaadin/ui/components/calendar/handler/BasicDateClickHandler.java b/server/src/com/vaadin/ui/components/calendar/handler/BasicDateClickHandler.java index c91a238b86..ac2470e008 100644 --- a/server/src/com/vaadin/ui/components/calendar/handler/BasicDateClickHandler.java +++ b/server/src/com/vaadin/ui/components/calendar/handler/BasicDateClickHandler.java @@ -39,6 +39,7 @@ public class BasicDateClickHandler implements DateClickHandler { * #dateClick * (com.vaadin.addon.calendar.ui.CalendarComponentEvents.DateClickEvent) */ + @Override public void dateClick(DateClickEvent event) { Date clickedDate = event.getDate(); diff --git a/server/src/com/vaadin/ui/components/calendar/handler/BasicEventMoveHandler.java b/server/src/com/vaadin/ui/components/calendar/handler/BasicEventMoveHandler.java index 139837f339..ae4c5fcc12 100644 --- a/server/src/com/vaadin/ui/components/calendar/handler/BasicEventMoveHandler.java +++ b/server/src/com/vaadin/ui/components/calendar/handler/BasicEventMoveHandler.java @@ -39,6 +39,7 @@ public class BasicEventMoveHandler implements EventMoveHandler { * #eventMove * (com.vaadin.addon.calendar.ui.CalendarComponentEvents.MoveEvent) */ + @Override public void eventMove(MoveEvent event) { CalendarEvent calendarEvent = event.getCalendarEvent(); diff --git a/server/src/com/vaadin/ui/components/calendar/handler/BasicEventResizeHandler.java b/server/src/com/vaadin/ui/components/calendar/handler/BasicEventResizeHandler.java index c052d0d77b..ee7fc27360 100644 --- a/server/src/com/vaadin/ui/components/calendar/handler/BasicEventResizeHandler.java +++ b/server/src/com/vaadin/ui/components/calendar/handler/BasicEventResizeHandler.java @@ -39,6 +39,7 @@ public class BasicEventResizeHandler implements EventResizeHandler { * #eventResize * (com.vaadin.addon.calendar.ui.CalendarComponentEvents.EventResize) */ + @Override public void eventResize(EventResize event) { CalendarEvent calendarEvent = event.getCalendarEvent(); diff --git a/server/src/com/vaadin/ui/components/calendar/handler/BasicForwardHandler.java b/server/src/com/vaadin/ui/components/calendar/handler/BasicForwardHandler.java index a5307ffd5c..e36c9e5756 100644 --- a/server/src/com/vaadin/ui/components/calendar/handler/BasicForwardHandler.java +++ b/server/src/com/vaadin/ui/components/calendar/handler/BasicForwardHandler.java @@ -38,6 +38,7 @@ public class BasicForwardHandler implements ForwardHandler { * com.vaadin.addon.calendar.ui.CalendarComponentEvents.ForwardHandler#forward * (com.vaadin.addon.calendar.ui.CalendarComponentEvents.ForwardEvent) */ + @Override public void forward(ForwardEvent event) { Date start = event.getComponent().getStartDate(); Date end = event.getComponent().getEndDate(); diff --git a/server/src/com/vaadin/ui/components/calendar/handler/BasicWeekClickHandler.java b/server/src/com/vaadin/ui/components/calendar/handler/BasicWeekClickHandler.java index 49efe49e48..846fd7dd53 100644 --- a/server/src/com/vaadin/ui/components/calendar/handler/BasicWeekClickHandler.java +++ b/server/src/com/vaadin/ui/components/calendar/handler/BasicWeekClickHandler.java @@ -40,6 +40,7 @@ public class BasicWeekClickHandler implements WeekClickHandler { * #weekClick * (com.vaadin.addon.calendar.ui.CalendarComponentEvents.WeekClick) */ + @Override public void weekClick(WeekClick event) { int week = event.getWeek(); int year = event.getYear(); diff --git a/server/src/com/vaadin/ui/components/colorpicker/ColorPickerGrid.java b/server/src/com/vaadin/ui/components/colorpicker/ColorPickerGrid.java index 9e9855afdd..9123245033 100644 --- a/server/src/com/vaadin/ui/components/colorpicker/ColorPickerGrid.java +++ b/server/src/com/vaadin/ui/components/colorpicker/ColorPickerGrid.java @@ -187,6 +187,7 @@ public class ColorPickerGrid extends AbstractComponent implements ColorSelector * @param listener * The color change listener */ + @Override public void addColorChangeListener(ColorChangeListener listener) { addListener(ColorChangeEvent.class, listener, COLOR_CHANGE_METHOD); } @@ -202,6 +203,7 @@ public class ColorPickerGrid extends AbstractComponent implements ColorSelector * @param listener * The listener */ + @Override public void removeColorChangeListener(ColorChangeListener listener) { removeListener(ColorChangeEvent.class, listener); } diff --git a/server/src/com/vaadin/ui/components/colorpicker/ColorPickerHistory.java b/server/src/com/vaadin/ui/components/colorpicker/ColorPickerHistory.java index e6edbcf40e..2902585f56 100644 --- a/server/src/com/vaadin/ui/components/colorpicker/ColorPickerHistory.java +++ b/server/src/com/vaadin/ui/components/colorpicker/ColorPickerHistory.java @@ -194,6 +194,7 @@ public class ColorPickerHistory extends CustomComponent implements * @param listener * The listener */ + @Override public void addColorChangeListener(ColorChangeListener listener) { addListener(ColorChangeEvent.class, listener, COLOR_CHANGE_METHOD); } @@ -204,6 +205,7 @@ public class ColorPickerHistory extends CustomComponent implements * @param listener * The listener */ + @Override public void removeColorChangeListener(ColorChangeListener listener) { removeListener(ColorChangeEvent.class, listener); } diff --git a/server/src/com/vaadin/ui/components/colorpicker/ColorPickerPopup.java b/server/src/com/vaadin/ui/components/colorpicker/ColorPickerPopup.java index c06ae9f6ff..fee52d1a24 100644 --- a/server/src/com/vaadin/ui/components/colorpicker/ColorPickerPopup.java +++ b/server/src/com/vaadin/ui/components/colorpicker/ColorPickerPopup.java @@ -283,6 +283,7 @@ public class ColorPickerPopup extends Window implements ClickListener, } redSlider.addValueChangeListener(new ValueChangeListener() { + @Override public void valueChange(ValueChangeEvent event) { double red = (Double) event.getProperty().getValue(); if (!updatingColors) { @@ -303,6 +304,7 @@ public class ColorPickerPopup extends Window implements ClickListener, } greenSlider.addValueChangeListener(new ValueChangeListener() { + @Override public void valueChange(ValueChangeEvent event) { double green = (Double) event.getProperty().getValue(); if (!updatingColors) { @@ -322,6 +324,7 @@ public class ColorPickerPopup extends Window implements ClickListener, } blueSlider.addValueChangeListener(new ValueChangeListener() { + @Override public void valueChange(ValueChangeEvent event) { double blue = (Double) event.getProperty().getValue(); if (!updatingColors) { @@ -380,6 +383,7 @@ public class ColorPickerPopup extends Window implements ClickListener, hueSlider.setWidth("220px"); hueSlider.setImmediate(true); hueSlider.addValueChangeListener(new ValueChangeListener() { + @Override public void valueChange(ValueChangeEvent event) { if (!updatingColors) { float hue = (Float.parseFloat(event.getProperty() @@ -417,6 +421,7 @@ public class ColorPickerPopup extends Window implements ClickListener, saturationSlider.setWidth("220px"); saturationSlider.setImmediate(true); saturationSlider.addValueChangeListener(new ValueChangeListener() { + @Override public void valueChange(ValueChangeEvent event) { if (!updatingColors) { float hue = (Float.parseFloat(hueSlider.getValue() @@ -444,6 +449,7 @@ public class ColorPickerPopup extends Window implements ClickListener, valueSlider.setWidth("220px"); valueSlider.setImmediate(true); valueSlider.addValueChangeListener(new ValueChangeListener() { + @Override public void valueChange(ValueChangeEvent event) { if (!updatingColors) { float hue = (Float.parseFloat(hueSlider.getValue() @@ -754,6 +760,7 @@ public class ColorPickerPopup extends Window implements ClickListener, /** HSV color converter */ Coordinates2Color HSVConverter = new Coordinates2Color() { + @Override public int[] calculate(Color color) { float[] hsv = color.getHSV(); @@ -769,6 +776,7 @@ public class ColorPickerPopup extends Window implements ClickListener, return new int[] { x, y }; } + @Override public Color calculate(int x, int y) { float saturation = 1f - (y / 220.0f); float value = (x / 220.0f); diff --git a/server/tests/src/com/vaadin/data/util/AbstractContainerTest.java b/server/tests/src/com/vaadin/data/util/AbstractContainerTest.java index 3d9909c42c..64db805623 100644 --- a/server/tests/src/com/vaadin/data/util/AbstractContainerTest.java +++ b/server/tests/src/com/vaadin/data/util/AbstractContainerTest.java @@ -324,7 +324,6 @@ public abstract class AbstractContainerTest extends TestCase { "com.vaadin.terminal.gwt.client.Focusable", "com.vaadin.data.Buffered", isFilteredOutItemNull(), 20); - // Filter by "contains da" (reversed as ad here) container.removeAllContainerFilters(); diff --git a/server/tests/src/com/vaadin/data/util/ReflectToolsGetSuperField.java b/server/tests/src/com/vaadin/data/util/ReflectToolsGetSuperField.java index efba6085ac..dc828689a8 100644 --- a/server/tests/src/com/vaadin/data/util/ReflectToolsGetSuperField.java +++ b/server/tests/src/com/vaadin/data/util/ReflectToolsGetSuperField.java @@ -19,15 +19,16 @@ public class ReflectToolsGetSuperField { class MySubClass extends MyClass { // no fields here } - + PropertysetItem item = new PropertysetItem(); - item.addItemProperty("testProperty", new ObjectProperty<String>("Value of testProperty")); - + item.addItemProperty("testProperty", new ObjectProperty<String>( + "Value of testProperty")); + MySubClass form = new MySubClass(); - + FieldGroup binder = new FieldGroup(item); binder.bindMemberFields(form); - + assertTrue("Value of testProperty".equals(form.test.getValue())); } diff --git a/server/tests/src/com/vaadin/tests/data/validator/TestStringLengthValidator.java b/server/tests/src/com/vaadin/tests/data/validator/TestStringLengthValidator.java index 032b8b6d14..6b4b2b0d51 100644 --- a/server/tests/src/com/vaadin/tests/data/validator/TestStringLengthValidator.java +++ b/server/tests/src/com/vaadin/tests/data/validator/TestStringLengthValidator.java @@ -45,7 +45,7 @@ public class TestStringLengthValidator extends TestCase { validatorMinValue .isValid("This is a really long string to test that no upper bound exists")); } - + public void testNoLowerBound() { assertTrue("Didn't accept short string", validatorMaxValue.isValid("")); assertTrue("Didn't accept short string", validatorMaxValue.isValid("1")); diff --git a/server/tests/src/com/vaadin/tests/server/component/abstractfield/RemoveListenersOnDetach.java b/server/tests/src/com/vaadin/tests/server/component/abstractfield/RemoveListenersOnDetach.java index 6dfd50c44c..731387d203 100644 --- a/server/tests/src/com/vaadin/tests/server/component/abstractfield/RemoveListenersOnDetach.java +++ b/server/tests/src/com/vaadin/tests/server/component/abstractfield/RemoveListenersOnDetach.java @@ -19,7 +19,8 @@ public class RemoveListenersOnDetach { int numReadOnlyChanges = 0; AbstractField field = new AbstractField() { - final private VaadinSession application = new AlwaysLockedVaadinSession(null); + final private VaadinSession application = new AlwaysLockedVaadinSession( + null); private UI uI = new UI() { @Override diff --git a/server/tests/src/com/vaadin/tests/server/component/fieldgroup/CaseInsensitiveBinding.java b/server/tests/src/com/vaadin/tests/server/component/fieldgroup/CaseInsensitiveBinding.java index 3f4368c295..e571576990 100644 --- a/server/tests/src/com/vaadin/tests/server/component/fieldgroup/CaseInsensitiveBinding.java +++ b/server/tests/src/com/vaadin/tests/server/component/fieldgroup/CaseInsensitiveBinding.java @@ -68,7 +68,8 @@ public class CaseInsensitiveBinding { TextField firstName = new TextField("First name"); public MyForm() { - // should bind to the firstName property, not first_name property + // should bind to the firstName property, not first_name + // property addComponent(firstName); } } diff --git a/server/tests/src/com/vaadin/tests/server/component/tree/TreeTest.java b/server/tests/src/com/vaadin/tests/server/component/tree/TreeTest.java index a0d57c4d59..3c9fc4c0cd 100644 --- a/server/tests/src/com/vaadin/tests/server/component/tree/TreeTest.java +++ b/server/tests/src/com/vaadin/tests/server/component/tree/TreeTest.java @@ -88,8 +88,7 @@ public class TreeTest { tree.expandItem("parent"); tree.expandItem("child"); - Field expandedField = tree.getClass() - .getDeclaredField("expanded"); + Field expandedField = tree.getClass().getDeclaredField("expanded"); Field expandedItemIdField = tree.getClass().getDeclaredField( "expandedItemId"); diff --git a/server/tests/src/com/vaadin/util/ReflectToolsGetFieldValueByType.java b/server/tests/src/com/vaadin/util/ReflectToolsGetFieldValueByType.java index 718a76804f..540ffb852d 100644 --- a/server/tests/src/com/vaadin/util/ReflectToolsGetFieldValueByType.java +++ b/server/tests/src/com/vaadin/util/ReflectToolsGetFieldValueByType.java @@ -54,8 +54,8 @@ public class ReflectToolsGetFieldValueByType { memberField = myInstance.getClass().getField("field"); // Should throw an IllegalArgument exception as the mySubClass class // doesn't have an Integer field. - ReflectTools.getJavaFieldValue(myInstance, - memberField, Integer.class); + ReflectTools.getJavaFieldValue(myInstance, memberField, + Integer.class); fail("Previous method call should have thrown an exception"); } catch (Exception e) { } diff --git a/server/tests/src/com/vaadin/util/ReflectToolsGetPrimitiveFieldValue.java b/server/tests/src/com/vaadin/util/ReflectToolsGetPrimitiveFieldValue.java index df192c51f2..1e1fafe31c 100644 --- a/server/tests/src/com/vaadin/util/ReflectToolsGetPrimitiveFieldValue.java +++ b/server/tests/src/com/vaadin/util/ReflectToolsGetPrimitiveFieldValue.java @@ -17,8 +17,8 @@ public class ReflectToolsGetPrimitiveFieldValue { Object fieldValue = new Boolean(false); try { memberField = myInstance.getClass().getField("field"); - fieldValue = ReflectTools.getJavaFieldValue(myInstance, - memberField); + fieldValue = ReflectTools + .getJavaFieldValue(myInstance, memberField); } catch (Exception e) { } assertFalse(fieldValue instanceof Boolean); diff --git a/theme-compiler/src/com/vaadin/sass/SassCompiler.java b/theme-compiler/src/com/vaadin/sass/SassCompiler.java index 48b2d24c46..6a83425ca1 100644 --- a/theme-compiler/src/com/vaadin/sass/SassCompiler.java +++ b/theme-compiler/src/com/vaadin/sass/SassCompiler.java @@ -17,7 +17,6 @@ package com.vaadin.sass; import java.io.File; -import java.io.FileNotFoundException; import java.io.FileWriter; import java.io.IOException; @@ -49,12 +48,12 @@ public class SassCompiler { // ScssStylesheet.setStylesheetResolvers(new VaadinResolver()); ScssStylesheet scss = ScssStylesheet.get(input); - if(scss == null){ + if (scss == null) { System.err.println("The scss file " + input + " could not be found."); return; } - + scss.compile(); if (output == null) { System.out.println(scss.toString()); diff --git a/theme-compiler/tests/src/com/vaadin/sass/testcases/scss/AbstractDirectoryScanningSassTests.java b/theme-compiler/tests/src/com/vaadin/sass/testcases/scss/AbstractDirectoryScanningSassTests.java index 47657f805c..d60756a2c9 100644 --- a/theme-compiler/tests/src/com/vaadin/sass/testcases/scss/AbstractDirectoryScanningSassTests.java +++ b/theme-compiler/tests/src/com/vaadin/sass/testcases/scss/AbstractDirectoryScanningSassTests.java @@ -33,7 +33,7 @@ import org.junit.Assert; import com.vaadin.sass.internal.ScssStylesheet; import com.vaadin.sass.testcases.scss.SassTestRunner.FactoryTest; -public abstract class AbstractDirectoryScanningSassTests { +public abstract class AbstractDirectoryScanningSassTests { public static Collection<String> getScssResourceNames(URL directoryUrl) throws URISyntaxException { 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; } |