You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
geoportal-data-viewer-app/src/main/java/org/gcube/portlets/user/geoportaldataviewer/client/ui/products/concessioni/LayerConcessioneView.java

50 lines
2.1 KiB
Java

package org.gcube.portlets.user.geoportaldataviewer.client.ui.products.concessioni;
import org.gcube.portlets.user.geoportaldataviewer.client.GeoportalDataViewerConstants;
import org.gcube.portlets.user.geoportaldataviewer.client.ui.map.MapView;
import org.gcube.portlets.user.geoportaldataviewer.client.ui.util.CustomFlexTable;
import org.gcube.portlets.user.geoportaldataviewer.shared.products.model.LayerConcessioneDV;
import com.google.gwt.core.client.GWT;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.HTMLPanel;
import com.google.gwt.user.client.ui.Widget;
public class LayerConcessioneView extends Composite {
private static LayerConcessioneUiBinder uiBinder = GWT.create(LayerConcessioneUiBinder.class);
interface LayerConcessioneUiBinder extends UiBinder<Widget, LayerConcessioneView> {
}
@UiField
HTMLPanel layerConcessionePanel;
@UiField
HTMLPanel mapViewPanel;
private CustomFlexTable customTable = new CustomFlexTable();
public LayerConcessioneView(LayerConcessioneDV layerDV) {
initWidget(uiBinder.createAndBindUi(this));
GWT.log("Showing: "+layerDV);
//customTable.addNextKeyValue("Created", relazioneScavoDV.getCreationTime());
customTable.addNextKeyValue("Valutazione qualità", layerDV.getValutazioneQualita());
customTable.addNextKeyValue("Metodo raccolta dati", layerDV.getMetodoRaccoltaDati());
customTable.addNextKeyValue("Scala acquisizione dati", layerDV.getScalaAcquisizione());
customTable.addNextKeyValues("Autori", layerDV.getAuthors(), GeoportalDataViewerConstants.NEW_LINE_BR);
layerConcessionePanel.add(customTable);
if(layerDV.getLayerName()!=null && layerDV.getWmsLink()!=null) {
MapView mapView = new MapView();
mapViewPanel.add(mapView);
String mapServerHost = layerDV.getWmsLink().contains("?")? layerDV.getWmsLink().substring(0,layerDV.getWmsLink().indexOf("?")):layerDV.getWmsLink();
mapView.addWMSLayer(mapServerHost, layerDV.getLayerName(), layerDV.getBbox());
}
}
}