85 lines
1.7 KiB
Java
85 lines
1.7 KiB
Java
package org.gcube.portlets.user.geoportaldataviewer.client.events;
|
|
|
|
import org.gcube.portlets.user.geoportaldataviewer.shared.gis.GeoQuery;
|
|
|
|
import com.google.gwt.event.shared.GwtEvent;
|
|
|
|
import ol.Coordinate;
|
|
|
|
/**
|
|
* The Class QueryDataEvent.
|
|
*
|
|
* @author Francesco Mangiacrapa at ISTI-CNR (francesco.mangiacrapa@isti.cnr.it)
|
|
*
|
|
* Oct 29, 2020
|
|
*/
|
|
public class QueryDataEvent extends GwtEvent<QueryDataEventHandler> {
|
|
public static Type<QueryDataEventHandler> TYPE = new Type<QueryDataEventHandler>();
|
|
private GeoQuery select;
|
|
private Coordinate oLCoordinate;
|
|
private Long recordId;
|
|
|
|
/**
|
|
* Instantiates a new table row selected event.
|
|
* @param coordinate
|
|
*/
|
|
public QueryDataEvent(GeoQuery select, Coordinate coordinate, Long recordId) {
|
|
this.select = select;
|
|
this.oLCoordinate = coordinate;
|
|
this.recordId = recordId;
|
|
}
|
|
|
|
/**
|
|
* Gets the associated type.
|
|
*
|
|
* @return the associated type
|
|
*/
|
|
@Override
|
|
public Type<QueryDataEventHandler> getAssociatedType() {
|
|
return TYPE;
|
|
}
|
|
|
|
|
|
/**
|
|
* Gets the record id.
|
|
*
|
|
* @return the record id
|
|
*/
|
|
public Long getRecordId() {
|
|
return recordId;
|
|
}
|
|
|
|
/**
|
|
* Dispatch.
|
|
*
|
|
* @param handler the handler
|
|
*/
|
|
@Override
|
|
protected void dispatch(QueryDataEventHandler handler) {
|
|
handler.onQueryInteraction(this);
|
|
|
|
}
|
|
|
|
public GeoQuery getGeoQuery() {
|
|
return select;
|
|
}
|
|
|
|
public Coordinate getoLCoordinate() {
|
|
return oLCoordinate;
|
|
}
|
|
|
|
@Override
|
|
public String toString() {
|
|
StringBuilder builder = new StringBuilder();
|
|
builder.append("QueryDataEvent [select=");
|
|
builder.append(select);
|
|
builder.append(", oLCoordinate=");
|
|
builder.append(oLCoordinate);
|
|
builder.append(", recordId=");
|
|
builder.append(recordId);
|
|
builder.append("]");
|
|
return builder.toString();
|
|
}
|
|
|
|
|
|
} |