diff options
author | Teemu Suo-Anttila <teemusa@vaadin.com> | 2014-12-12 15:30:24 +0200 |
---|---|---|
committer | Teemu Suo-Anttila <teemusa@vaadin.com> | 2014-12-12 16:59:15 +0200 |
commit | a539b4cd7becbd1aa370f9502e4f85912d7c2844 (patch) | |
tree | b1a5a28bd747db47ce68732689082052ba1c6ae9 /server/src/com/vaadin/event | |
parent | c9fe985fc34788d197417715d8d439c2ce0bc26b (diff) | |
download | vaadin-framework-a539b4cd7becbd1aa370f9502e4f85912d7c2844.tar.gz vaadin-framework-a539b4cd7becbd1aa370f9502e4f85912d7c2844.zip |
Rename SelectionChangeEvent and SortOrderChangeEvent (#13334)
Also renames related listeners and notifiers.
Change-Id: I96bfdae8173a1c691623938cc7dbcddee7198e46
Diffstat (limited to 'server/src/com/vaadin/event')
-rw-r--r-- | server/src/com/vaadin/event/SelectionEvent.java (renamed from server/src/com/vaadin/event/SelectionChangeEvent.java) | 28 | ||||
-rw-r--r-- | server/src/com/vaadin/event/SortEvent.java (renamed from server/src/com/vaadin/event/SortOrderChangeEvent.java) | 25 |
2 files changed, 23 insertions, 30 deletions
diff --git a/server/src/com/vaadin/event/SelectionChangeEvent.java b/server/src/com/vaadin/event/SelectionEvent.java index adc7b13d49..f852ea0949 100644 --- a/server/src/com/vaadin/event/SelectionChangeEvent.java +++ b/server/src/com/vaadin/event/SelectionEvent.java @@ -30,12 +30,12 @@ import com.google.gwt.thirdparty.guava.common.collect.Sets; * @since * @author Vaadin Ltd */ -public class SelectionChangeEvent extends EventObject { +public class SelectionEvent extends EventObject { private LinkedHashSet<Object> oldSelection; private LinkedHashSet<Object> newSelection; - public SelectionChangeEvent(Object source, Collection<Object> oldSelection, + public SelectionEvent(Object source, Collection<Object> oldSelection, Collection<Object> newSelection) { super(source); this.oldSelection = new LinkedHashSet<Object>(oldSelection); @@ -67,37 +67,31 @@ public class SelectionChangeEvent extends EventObject { } /** - * The listener interface for receiving {@link SelectionChangeEvent - * SelectionChangeEvents}. - * - * @since - * @author Vaadin Ltd + * The listener interface for receiving {@link SelectionEvent + * SelectionEvents}. */ - public interface SelectionChangeListener extends Serializable { + public interface SelectionListener extends Serializable { /** * Notifies the listener that the selection state has changed. * * @param event * the selection change event */ - void selectionChange(SelectionChangeEvent event); + void select(SelectionEvent event); } /** * The interface for adding and removing listeners for - * {@link SelectionChangeEvent SelectionChangeEvents}. - * - * @since - * @author Vaadin Ltd + * {@link SelectionEvent SelectionEvents}. */ - public interface SelectionChangeNotifier extends Serializable { + public interface SelectionNotifier extends Serializable { /** - * Registers a new selection change listener + * Registers a new selection listener * * @param listener * the listener to register */ - void addSelectionChangeListener(SelectionChangeListener listener); + void addSelectionListener(SelectionListener listener); /** * Removes a previously registered selection change listener @@ -105,6 +99,6 @@ public class SelectionChangeEvent extends EventObject { * @param listener * the listener to remove */ - void removeSelectionChangeListener(SelectionChangeListener listener); + void removeSelectionListener(SelectionListener listener); } } diff --git a/server/src/com/vaadin/event/SortOrderChangeEvent.java b/server/src/com/vaadin/event/SortEvent.java index fdf604a034..968d2f6d83 100644 --- a/server/src/com/vaadin/event/SortOrderChangeEvent.java +++ b/server/src/com/vaadin/event/SortEvent.java @@ -23,14 +23,14 @@ import com.vaadin.ui.Component; /** * Event describing a change in sorting of a {@link Container}. Fired by - * {@link SortOrderChangeNotifier SortOrderChangeNotifiers}. + * {@link SortNotifier SortNotifiers}. * - * @see SortOrderChangeListener + * @see SortListener * * @since * @author Vaadin Ltd */ -public class SortOrderChangeEvent extends Component.Event { +public class SortEvent extends Component.Event { private final List<SortOrder> sortOrder; private final boolean userOriginated; @@ -46,7 +46,7 @@ public class SortOrderChangeEvent extends Component.Event { * <code>true</code> if event is a result of user interaction, * <code>false</code> if from API call */ - public SortOrderChangeEvent(Component source, List<SortOrder> sortOrder, + public SortEvent(Component source, List<SortOrder> sortOrder, boolean userOriginated) { super(source); this.sortOrder = sortOrder; @@ -74,21 +74,21 @@ public class SortOrderChangeEvent extends Component.Event { /** * Listener for sort order change events. */ - public interface SortOrderChangeListener extends Serializable { + public interface SortListener extends Serializable { /** * Called when the sort order has changed. * * @param event * the sort order change event */ - public void sortOrderChange(SortOrderChangeEvent event); + public void sort(SortEvent event); } /** - * The interface for adding and removing listeners for - * {@link SortOrderChangeEvent SortOrderChangeEvents}. + * The interface for adding and removing listeners for {@link SortEvent + * SortEvents}. */ - public interface SortOrderChangeNotifier extends Serializable { + public interface SortNotifier extends Serializable { /** * Adds a sort order change listener that gets notified when the sort * order changes. @@ -96,16 +96,15 @@ public class SortOrderChangeEvent extends Component.Event { * @param listener * the sort order change listener to add */ - public void addSortOrderChangeListener(SortOrderChangeListener listener); + public void addSortListener(SortListener listener); /** * Removes a sort order change listener previously added using - * {@link #addSortOrderChangeListener(SortOrderChangeListener)}. + * {@link #addSortListener(SortListener)}. * * @param listener * the sort order change listener to remove */ - public void removeSortOrderChangeListener( - SortOrderChangeListener listener); + public void removeSortistener(SortListener listener); } } |