geoportal-data-entry-app/src/main/java/org/gcube/portlets/user/geoportaldataentry/client/events/ShowItemEvent.java

69 lines
1.3 KiB
Java

package org.gcube.portlets.user.geoportaldataentry.client.events;
import java.util.List;
import com.google.gwt.event.shared.GwtEvent;
/**
* The Class ShowItemEvent.
*
* @author Francesco Mangiacrapa at ISTI-CNR francesco.mangiacrapa@isti.cnr.it
*
* Jun 22, 2021
* @param <T> the generic type
*/
public class ShowItemEvent<T> extends GwtEvent<ShowItemEventHandler> {
public static Type<ShowItemEventHandler> TYPE = new Type<ShowItemEventHandler>();
private List<T> selectItems;
/**
* Instantiates a new click item event.
*
* @param selectItems the select items
*/
public ShowItemEvent(List<T> selectItems) {
this.selectItems = selectItems;
}
/**
* Gets the associated type.
*
* @return the associated type
*/
/*
* (non-Javadoc)
*
* @see com.google.gwt.event.shared.GwtEvent#getAssociatedType()
*/
@Override
public Type<ShowItemEventHandler> getAssociatedType() {
return TYPE;
}
/**
* Dispatch.
*
* @param handler the handler
*/
/*
* (non-Javadoc)
*
* @see
* com.google.gwt.event.shared.GwtEvent#dispatch(com.google.gwt.event.shared.
* EventHandler)
*/
@Override
protected void dispatch(ShowItemEventHandler handler) {
handler.onShowItemClicked(this);
}
/**
* Gets the select items.
*
* @return the select items
*/
public List<T> getSelectItems() {
return selectItems;
}
}