geoportal-data-viewer-app/src/main/java/org/gcube/portlets/user/geoportaldataviewer/client/events/ShowPopupOnCentroiEvent.java

68 lines
1.5 KiB
Java
Raw Normal View History

2021-12-10 16:19:33 +01:00
package org.gcube.portlets.user.geoportaldataviewer.client.events;
2022-10-24 12:23:52 +02:00
import org.gcube.application.geoportalcommon.shared.geoportal.DocumentDV;
2021-12-10 16:19:33 +01:00
import com.google.gwt.event.shared.GwtEvent;
/**
* The Class ShowDetailsEvent.
*
* @author Francesco Mangiacrapa at ISTI-CNR francesco.mangiacrapa@isti.cnr.it
*
2022-10-24 12:23:52 +02:00
* Jul 30, 2021
2021-12-10 16:19:33 +01:00
*/
public class ShowPopupOnCentroiEvent extends GwtEvent<ShowPopupOnCentroiEventHandler> {
public static Type<ShowPopupOnCentroiEventHandler> TYPE = new Type<ShowPopupOnCentroiEventHandler>();
2022-10-24 12:23:52 +02:00
private DocumentDV document;
2022-10-25 11:35:03 +02:00
private Double centroidLong;
private Double centroidLat;
2021-12-10 16:19:33 +01:00
2022-10-24 12:23:52 +02:00
/**
* Instantiates a new show details event.
*
* @param geonaItemType the geona item type
* @param geonaMongoID the geona mongo ID
* @param itemName the item name
* @param featureRow the feature row
*/
2022-10-25 11:35:03 +02:00
public ShowPopupOnCentroiEvent(DocumentDV document, Double centroidLong, Double centroidLat) {
2022-10-24 12:23:52 +02:00
this.document = document;
2022-10-25 11:35:03 +02:00
this.centroidLong = centroidLong;
this.centroidLat = centroidLat;
2021-12-10 16:19:33 +01:00
2022-10-24 12:23:52 +02:00
}
2021-12-10 16:19:33 +01:00
/**
* Gets the associated type.
*
* @return the associated type
*/
@Override
public Type<ShowPopupOnCentroiEventHandler> getAssociatedType() {
return TYPE;
}
/**
* Dispatch.
*
* @param handler the handler
*/
@Override
protected void dispatch(ShowPopupOnCentroiEventHandler handler) {
handler.onShowPopup(this);
}
2022-10-24 12:23:52 +02:00
public DocumentDV getDocument() {
return document;
2021-12-10 16:19:33 +01:00
}
2022-10-25 11:35:03 +02:00
public Double getCentroidLat() {
return centroidLat;
}
public Double getCentroidLong() {
return centroidLong;
}
2021-12-10 16:19:33 +01:00
}