|
|
@@ -401,6 +401,13 @@ public class Grid<T> extends AbstractListing<T> implements HasComponents, |
|
|
|
/** |
|
|
|
* ContextClickEvent for the Grid Component. |
|
|
|
* |
|
|
|
* <p> |
|
|
|
* Usage: |
|
|
|
* <pre> |
|
|
|
* grid.addContextClickListener(event -> Notification.show( |
|
|
|
* ((GridContextClickEvent<Person>)event).getItem() + " Clicked") |
|
|
|
* ); |
|
|
|
* </pre> |
|
|
|
* @param <T> |
|
|
|
* the grid bean type |
|
|
|
*/ |
|
|
@@ -3376,6 +3383,7 @@ public class Grid<T> extends AbstractListing<T> implements HasComponents, |
|
|
|
* @param listener |
|
|
|
* the item click listener, not null |
|
|
|
* @return a registration for the listener |
|
|
|
* @see #addContextClickListener |
|
|
|
*/ |
|
|
|
public Registration addItemClickListener( |
|
|
|
ItemClickListener<? super T> listener) { |
|
|
@@ -3383,6 +3391,24 @@ public class Grid<T> extends AbstractListing<T> implements HasComponents, |
|
|
|
listener, ITEM_CLICK_METHOD); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* Adds a context click listener that gets notified when a context click |
|
|
|
* happens. |
|
|
|
* |
|
|
|
* @param listener |
|
|
|
* the context click listener to add, not null |
|
|
|
* actual event provided to the listener is {@link GridContextClickEvent} |
|
|
|
* @return a registration object for removing the listener |
|
|
|
* |
|
|
|
* @since 8.1 |
|
|
|
* @see #addItemClickListener |
|
|
|
* @see Registration |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
public Registration addContextClickListener(ContextClickEvent.ContextClickListener listener) { |
|
|
|
return super.addContextClickListener(listener); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* Registers a new column visibility change listener. |
|
|
|
* |