summaryrefslogtreecommitdiffstats
path: root/client
diff options
context:
space:
mode:
authorLeif Åstrand <leif@vaadin.com>2013-04-05 16:53:19 +0300
committerVaadin Code Review <review@vaadin.com>2013-04-05 14:01:47 +0000
commitc926a09f54cd08856c8cd7a15fd00cf0b62b63b5 (patch)
treed316521846d1ad38efed6f99ae0b218d7dacf22c /client
parentfc2e1dfa9e39944c1008d0572ba7cb7c639109bb (diff)
downloadvaadin-framework-c926a09f54cd08856c8cd7a15fd00cf0b62b63b5.tar.gz
vaadin-framework-c926a09f54cd08856c8cd7a15fd00cf0b62b63b5.zip
Global code reformat
Change-Id: I4b3c74ede518aa2712038d1451974a93cdecabc2
Diffstat (limited to 'client')
-rw-r--r--client/src/com/vaadin/client/ComponentLocator.java6
-rw-r--r--client/src/com/vaadin/client/ConnectorHierarchyChangeEvent.java10
-rw-r--r--client/src/com/vaadin/client/HasComponentsConnector.java1
-rw-r--r--client/src/com/vaadin/client/Util.java1
-rw-r--r--client/src/com/vaadin/client/debug/internal/HierarchySection.java1
-rw-r--r--client/src/com/vaadin/client/debug/internal/NetworkSection.java1
-rw-r--r--client/src/com/vaadin/client/extensions/javascriptmanager/JavaScriptManagerConnector.java2
-rw-r--r--client/src/com/vaadin/client/ui/AbstractComponentConnector.java2
-rw-r--r--client/src/com/vaadin/client/ui/AbstractConnector.java1
-rw-r--r--client/src/com/vaadin/client/ui/AbstractHasComponentsConnector.java2
-rw-r--r--client/src/com/vaadin/client/ui/VAbsoluteLayout.java8
-rw-r--r--client/src/com/vaadin/client/ui/VCalendar.java2
-rw-r--r--client/src/com/vaadin/client/ui/VColorPickerArea.java1
-rw-r--r--client/src/com/vaadin/client/ui/VOptionGroupBase.java2
-rw-r--r--client/src/com/vaadin/client/ui/VScrollTable.java8
-rw-r--r--client/src/com/vaadin/client/ui/absolutelayout/AbsoluteLayoutConnector.java3
-rw-r--r--client/src/com/vaadin/client/ui/calendar/CalendarConnector.java18
-rw-r--r--client/src/com/vaadin/client/ui/calendar/schedule/DateCell.java46
-rw-r--r--client/src/com/vaadin/client/ui/calendar/schedule/DateCellContainer.java9
-rw-r--r--client/src/com/vaadin/client/ui/calendar/schedule/DateCellDayEvent.java116
-rw-r--r--client/src/com/vaadin/client/ui/calendar/schedule/DateCellGroup.java1
-rw-r--r--client/src/com/vaadin/client/ui/calendar/schedule/DayToolbar.java2
-rw-r--r--client/src/com/vaadin/client/ui/calendar/schedule/FocusableComplexPanel.java5
-rw-r--r--client/src/com/vaadin/client/ui/calendar/schedule/FocusableGrid.java5
-rw-r--r--client/src/com/vaadin/client/ui/calendar/schedule/FocusableHTML.java5
-rw-r--r--client/src/com/vaadin/client/ui/calendar/schedule/MonthGrid.java1
-rw-r--r--client/src/com/vaadin/client/ui/calendar/schedule/SimpleDayCell.java5
-rw-r--r--client/src/com/vaadin/client/ui/calendar/schedule/SimpleWeekToolbar.java1
-rw-r--r--client/src/com/vaadin/client/ui/calendar/schedule/WeekGrid.java1
-rw-r--r--client/src/com/vaadin/client/ui/calendar/schedule/WeekGridMinuteTimeRange.java11
-rw-r--r--client/src/com/vaadin/client/ui/calendar/schedule/WeeklyLongEvents.java3
-rw-r--r--client/src/com/vaadin/client/ui/calendar/schedule/dd/CalendarDropHandler.java1
-rw-r--r--client/src/com/vaadin/client/ui/calendar/schedule/dd/CalendarMonthDropHandler.java1
-rw-r--r--client/src/com/vaadin/client/ui/calendar/schedule/dd/CalendarWeekDropHandler.java1
-rw-r--r--client/src/com/vaadin/client/ui/ui/UIConnector.java4
35 files changed, 159 insertions, 128 deletions
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