summaryrefslogtreecommitdiffstats
path: root/server/src/com/vaadin/ui/components
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 /server/src/com/vaadin/ui/components
parentfc2e1dfa9e39944c1008d0572ba7cb7c639109bb (diff)
downloadvaadin-framework-c926a09f54cd08856c8cd7a15fd00cf0b62b63b5.tar.gz
vaadin-framework-c926a09f54cd08856c8cd7a15fd00cf0b62b63b5.zip
Global code reformat
Change-Id: I4b3c74ede518aa2712038d1451974a93cdecabc2
Diffstat (limited to 'server/src/com/vaadin/ui/components')
-rw-r--r--server/src/com/vaadin/ui/components/calendar/ContainerEventProvider.java11
-rw-r--r--server/src/com/vaadin/ui/components/calendar/event/BasicEvent.java14
-rw-r--r--server/src/com/vaadin/ui/components/calendar/event/BasicEventProvider.java6
-rw-r--r--server/src/com/vaadin/ui/components/calendar/handler/BasicBackwardHandler.java1
-rw-r--r--server/src/com/vaadin/ui/components/calendar/handler/BasicDateClickHandler.java1
-rw-r--r--server/src/com/vaadin/ui/components/calendar/handler/BasicEventMoveHandler.java1
-rw-r--r--server/src/com/vaadin/ui/components/calendar/handler/BasicEventResizeHandler.java1
-rw-r--r--server/src/com/vaadin/ui/components/calendar/handler/BasicForwardHandler.java1
-rw-r--r--server/src/com/vaadin/ui/components/calendar/handler/BasicWeekClickHandler.java1
-rw-r--r--server/src/com/vaadin/ui/components/colorpicker/ColorPickerGrid.java2
-rw-r--r--server/src/com/vaadin/ui/components/colorpicker/ColorPickerHistory.java2
-rw-r--r--server/src/com/vaadin/ui/components/colorpicker/ColorPickerPopup.java8
12 files changed, 49 insertions, 0 deletions
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);