You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

ColumnReorderEvent.java 1.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. /*
  2. * Copyright 2000-2016 Vaadin Ltd.
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License"); you may not
  5. * use this file except in compliance with the License. You may obtain a copy of
  6. * the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
  12. * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
  13. * License for the specific language governing permissions and limitations under
  14. * the License.
  15. */
  16. package com.vaadin.client.widget.grid.events;
  17. import com.google.gwt.event.shared.GwtEvent;
  18. /**
  19. * An event for notifying that the columns in the Grid have been reordered.
  20. *
  21. * @param <T>
  22. * The row type of the grid. The row type is the POJO type from where
  23. * the data is retrieved into the column cells.
  24. * @since 7.5.0
  25. * @author Vaadin Ltd
  26. */
  27. public class ColumnReorderEvent<T> extends GwtEvent<ColumnReorderHandler<T>> {
  28. /**
  29. * Handler type.
  30. */
  31. private final static Type<ColumnReorderHandler<?>> TYPE = new Type<>();
  32. public static final Type<ColumnReorderHandler<?>> getType() {
  33. return TYPE;
  34. }
  35. @SuppressWarnings({ "rawtypes", "unchecked" })
  36. @Override
  37. public Type<ColumnReorderHandler<T>> getAssociatedType() {
  38. return (Type) TYPE;
  39. }
  40. @Override
  41. protected void dispatch(ColumnReorderHandler<T> handler) {
  42. handler.onColumnReorder(this);
  43. }
  44. }