diff options
author | Teemu Suo-Anttila <teemusa@vaadin.com> | 2014-12-05 12:58:30 +0200 |
---|---|---|
committer | Henrik Paul <henrik@vaadin.com> | 2014-12-08 09:28:47 +0000 |
commit | aaba0aca69d0093f30d6fa04f2695d8272b7314a (patch) | |
tree | d7b339b65469024627c6565448d071db02f79f15 | |
parent | 9f24790d3607510b30abba08a3b29f8144332ac5 (diff) | |
download | vaadin-framework-aaba0aca69d0093f30d6fa04f2695d8272b7314a.tar.gz vaadin-framework-aaba0aca69d0093f30d6fa04f2695d8272b7314a.zip |
Rename SortEventHandler to better match GWT conventions (#13334)
Change-Id: Ice2452ab2f1c48c4bcac2bc84dc25135ed458bbf
-rw-r--r-- | client/src/com/vaadin/client/ui/grid/Grid.java | 4 | ||||
-rw-r--r-- | client/src/com/vaadin/client/ui/grid/GridConnector.java | 4 | ||||
-rw-r--r-- | client/src/com/vaadin/client/ui/grid/datasources/ListSorter.java | 4 | ||||
-rw-r--r-- | client/src/com/vaadin/client/ui/grid/sort/SortEvent.java | 12 | ||||
-rw-r--r-- | client/src/com/vaadin/client/ui/grid/sort/SortHandler.java (renamed from client/src/com/vaadin/client/ui/grid/sort/SortEventHandler.java) | 2 | ||||
-rw-r--r-- | uitest/src/com/vaadin/tests/widgetset/client/grid/GridClientColumnRendererConnector.java | 4 |
6 files changed, 15 insertions, 15 deletions
diff --git a/client/src/com/vaadin/client/ui/grid/Grid.java b/client/src/com/vaadin/client/ui/grid/Grid.java index 32de9cccc8..fe14ddef30 100644 --- a/client/src/com/vaadin/client/ui/grid/Grid.java +++ b/client/src/com/vaadin/client/ui/grid/Grid.java @@ -78,7 +78,7 @@ import com.vaadin.client.ui.grid.selection.SelectionModelNone; import com.vaadin.client.ui.grid.selection.SelectionModelSingle; import com.vaadin.client.ui.grid.sort.Sort; import com.vaadin.client.ui.grid.sort.SortEvent; -import com.vaadin.client.ui.grid.sort.SortEventHandler; +import com.vaadin.client.ui.grid.sort.SortHandler; import com.vaadin.client.ui.grid.sort.SortOrder; import com.vaadin.shared.ui.grid.GridConstants; import com.vaadin.shared.ui.grid.GridStaticCellType; @@ -2930,7 +2930,7 @@ public class Grid<T> extends ResizeComposite implements * a sort event handler * @return the registration for the event */ - public HandlerRegistration addSortHandler(SortEventHandler<T> handler) { + public HandlerRegistration addSortHandler(SortHandler<T> handler) { return addHandler(handler, SortEvent.getType()); } diff --git a/client/src/com/vaadin/client/ui/grid/GridConnector.java b/client/src/com/vaadin/client/ui/grid/GridConnector.java index 6aa32abef4..ae78860d79 100644 --- a/client/src/com/vaadin/client/ui/grid/GridConnector.java +++ b/client/src/com/vaadin/client/ui/grid/GridConnector.java @@ -51,7 +51,7 @@ import com.vaadin.client.ui.grid.selection.SelectionModelMulti; import com.vaadin.client.ui.grid.selection.SelectionModelNone; import com.vaadin.client.ui.grid.selection.SelectionModelSingle; import com.vaadin.client.ui.grid.sort.SortEvent; -import com.vaadin.client.ui.grid.sort.SortEventHandler; +import com.vaadin.client.ui.grid.sort.SortHandler; import com.vaadin.client.ui.grid.sort.SortOrder; import com.vaadin.shared.ui.Connect; import com.vaadin.shared.ui.grid.EditorRowClientRpc; @@ -372,7 +372,7 @@ public class GridConnector extends AbstractHasComponentsConnector implements getWidget().addSelectionChangeHandler(internalSelectionChangeHandler); - getWidget().addSortHandler(new SortEventHandler<JSONObject>() { + getWidget().addSortHandler(new SortHandler<JSONObject>() { @Override public void sort(SortEvent<JSONObject> event) { List<SortOrder> order = event.getOrder(); diff --git a/client/src/com/vaadin/client/ui/grid/datasources/ListSorter.java b/client/src/com/vaadin/client/ui/grid/datasources/ListSorter.java index 9e643825e9..374a12396d 100644 --- a/client/src/com/vaadin/client/ui/grid/datasources/ListSorter.java +++ b/client/src/com/vaadin/client/ui/grid/datasources/ListSorter.java @@ -25,7 +25,7 @@ import com.vaadin.client.data.DataSource; import com.vaadin.client.ui.grid.Grid; import com.vaadin.client.ui.grid.GridColumn; import com.vaadin.client.ui.grid.sort.SortEvent; -import com.vaadin.client.ui.grid.sort.SortEventHandler; +import com.vaadin.client.ui.grid.sort.SortHandler; import com.vaadin.client.ui.grid.sort.SortOrder; import com.vaadin.shared.ui.grid.SortDirection; @@ -54,7 +54,7 @@ public class ListSorter<T> { comparators = new HashMap<GridColumn<?, T>, Comparator<?>>(); sortHandlerRegistration = grid - .addSortHandler(new SortEventHandler<T>() { + .addSortHandler(new SortHandler<T>() { @Override public void sort(SortEvent<T> event) { ListSorter.this.sort(event.getOrder()); diff --git a/client/src/com/vaadin/client/ui/grid/sort/SortEvent.java b/client/src/com/vaadin/client/ui/grid/sort/SortEvent.java index b0e1d27539..44f1510f6f 100644 --- a/client/src/com/vaadin/client/ui/grid/sort/SortEvent.java +++ b/client/src/com/vaadin/client/ui/grid/sort/SortEvent.java @@ -29,9 +29,9 @@ import com.vaadin.shared.ui.grid.SortEventOriginator; * @since * @author Vaadin Ltd */ -public class SortEvent<T> extends GwtEvent<SortEventHandler<?>> { +public class SortEvent<T> extends GwtEvent<SortHandler<?>> { - private static final Type<SortEventHandler<?>> TYPE = new Type<SortEventHandler<?>>(); + private static final Type<SortHandler<?>> TYPE = new Type<SortHandler<?>>(); private final Grid<T> grid; private final List<SortOrder> order; @@ -56,7 +56,7 @@ public class SortEvent<T> extends GwtEvent<SortEventHandler<?>> { } @Override - public Type<SortEventHandler<?>> getAssociatedType() { + public Type<SortHandler<?>> getAssociatedType() { return TYPE; } @@ -66,7 +66,7 @@ public class SortEvent<T> extends GwtEvent<SortEventHandler<?>> { * * @return a type object, uniquely describing this event type. */ - public static Type<SortEventHandler<?>> getType() { + public static Type<SortHandler<?>> getType() { return TYPE; } @@ -121,8 +121,8 @@ public class SortEvent<T> extends GwtEvent<SortEventHandler<?>> { @SuppressWarnings("unchecked") @Override - protected void dispatch(SortEventHandler<?> handler) { - ((SortEventHandler<T>) handler).sort(this); + protected void dispatch(SortHandler<?> handler) { + ((SortHandler<T>) handler).sort(this); } } diff --git a/client/src/com/vaadin/client/ui/grid/sort/SortEventHandler.java b/client/src/com/vaadin/client/ui/grid/sort/SortHandler.java index 57e7fc2ead..d9b72e3343 100644 --- a/client/src/com/vaadin/client/ui/grid/sort/SortEventHandler.java +++ b/client/src/com/vaadin/client/ui/grid/sort/SortHandler.java @@ -24,7 +24,7 @@ import com.google.gwt.event.shared.EventHandler; * @since * @author Vaadin Ltd */ -public interface SortEventHandler<T> extends EventHandler { +public interface SortHandler<T> extends EventHandler { /** * Handle sorting of the Grid. This method is called when a re-sorting of diff --git a/uitest/src/com/vaadin/tests/widgetset/client/grid/GridClientColumnRendererConnector.java b/uitest/src/com/vaadin/tests/widgetset/client/grid/GridClientColumnRendererConnector.java index 5d99d65d43..bde16b817e 100644 --- a/uitest/src/com/vaadin/tests/widgetset/client/grid/GridClientColumnRendererConnector.java +++ b/uitest/src/com/vaadin/tests/widgetset/client/grid/GridClientColumnRendererConnector.java @@ -46,7 +46,7 @@ import com.vaadin.client.ui.grid.renderers.TextRenderer; import com.vaadin.client.ui.grid.renderers.WidgetRenderer; import com.vaadin.client.ui.grid.sort.Sort; import com.vaadin.client.ui.grid.sort.SortEvent; -import com.vaadin.client.ui.grid.sort.SortEventHandler; +import com.vaadin.client.ui.grid.sort.SortHandler; import com.vaadin.client.ui.grid.sort.SortOrder; import com.vaadin.shared.ui.Connect; import com.vaadin.tests.widgetset.server.grid.GridClientColumnRenderers; @@ -153,7 +153,7 @@ public class GridClientColumnRendererConnector extends grid.getHeader().getDefaultRow().getCell(c).setText("Column 2"); // Add method for testing sort event firing - grid.addSortHandler(new SortEventHandler<String>() { + grid.addSortHandler(new SortHandler<String>() { @Override public void sort(SortEvent<String> event) { Element console = Document.get().getElementById( |