Removed old model "Concessioni". Updated CHANGELOG
parent
6950ce8c2f
commit
6ab7c60643
@ -1,133 +0,0 @@
|
||||
package org.gcube.portlets.user.geoportaldataviewer.client.ui.images;
|
||||
|
||||
import org.gcube.application.geoportalcommon.shared.products.content.WorkspaceContentDV;
|
||||
import org.gcube.application.geoportalcommon.shared.products.model.UploadedImageDV;
|
||||
import org.gcube.portlets.user.geoportaldataviewer.client.ui.ModalWindow;
|
||||
import org.gcube.portlets.user.geoportaldataviewer.client.util.NewBrowserWindow;
|
||||
import org.gcube.portlets.user.geoportaldataviewer.client.util.StringUtil;
|
||||
|
||||
import com.github.gwtbootstrap.client.ui.Button;
|
||||
import com.github.gwtbootstrap.client.ui.Heading;
|
||||
import com.github.gwtbootstrap.client.ui.Image;
|
||||
import com.github.gwtbootstrap.client.ui.Paragraph;
|
||||
import com.github.gwtbootstrap.client.ui.constants.ButtonType;
|
||||
import com.github.gwtbootstrap.client.ui.constants.IconType;
|
||||
import com.google.gwt.core.client.GWT;
|
||||
import com.google.gwt.dom.client.Style.TextAlign;
|
||||
import com.google.gwt.event.dom.client.ClickEvent;
|
||||
import com.google.gwt.event.dom.client.ClickHandler;
|
||||
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.Widget;
|
||||
|
||||
public class ImageView extends Composite {
|
||||
|
||||
private static ImageViewUiBinder uiBinder = GWT.create(ImageViewUiBinder.class);
|
||||
|
||||
interface ImageViewUiBinder extends UiBinder<Widget, ImageView> {
|
||||
}
|
||||
|
||||
public ImageView() {
|
||||
initWidget(uiBinder.createAndBindUi(this));
|
||||
}
|
||||
|
||||
@UiField
|
||||
Image imageURL;
|
||||
|
||||
@UiField
|
||||
Heading heading;
|
||||
|
||||
@UiField
|
||||
Paragraph paragraph1;
|
||||
|
||||
@UiField
|
||||
Paragraph paragraph2;
|
||||
|
||||
@UiField
|
||||
Button openImage;
|
||||
|
||||
@UiField
|
||||
Button viewImage;
|
||||
|
||||
private WorkspaceContentDV latest;
|
||||
|
||||
|
||||
public ImageView(UploadedImageDV imageDV, final boolean showView, final boolean showOpen) {
|
||||
initWidget(uiBinder.createAndBindUi(this));
|
||||
|
||||
if(imageDV.getTitolo()!=null && !imageDV.getTitolo().isEmpty()) {
|
||||
heading.setText(imageDV.getTitolo());
|
||||
}
|
||||
paragraph1.setText(imageDV.getDidascalia());
|
||||
paragraph1.getElement().getStyle().setTextAlign(TextAlign.LEFT);
|
||||
|
||||
if(!showView && imageDV.getLicenseID()!=null) {
|
||||
paragraph2.setVisible(true);
|
||||
paragraph2.setText("ID Licenza: "+imageDV.getLicenseID());
|
||||
}
|
||||
|
||||
if(imageDV.getListWsContent()!=null && imageDV.getListWsContent().size()>0) {
|
||||
latest = imageDV.getListWsContent().get(imageDV.getListWsContent().size()-1);
|
||||
openImage.setVisible(true);
|
||||
viewImage.setVisible(true);
|
||||
imageURL.setVisible(true);
|
||||
imageURL.setUrl(latest.getLink());
|
||||
}
|
||||
|
||||
openImage.setType(ButtonType.LINK);
|
||||
openImage.setIcon(IconType.EXTERNAL_LINK);
|
||||
openImage.setTitle("Open Image in New Browser Window");
|
||||
openImage.setVisible(showOpen);
|
||||
|
||||
openImage.addClickHandler(new ClickHandler() {
|
||||
|
||||
@Override
|
||||
public void onClick(ClickEvent event) {
|
||||
|
||||
if(latest!=null) {
|
||||
NewBrowserWindow.open(latest.getLink()+"?content-disposition=inline", "_blank", null);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
viewImage.setVisible(false);
|
||||
viewImage.setType(ButtonType.LINK);
|
||||
viewImage.setIcon(IconType.EXPAND);
|
||||
viewImage.setTitle("View Image in New Dialog");
|
||||
viewImage.setVisible(showView);
|
||||
|
||||
|
||||
viewImage.addClickHandler(new ClickHandler() {
|
||||
|
||||
@Override
|
||||
public void onClick(ClickEvent event) {
|
||||
|
||||
if(latest!=null) {
|
||||
|
||||
ModalWindow mw = new ModalWindow(StringUtil.ellipsize(imageDV.getDidascalia(), 50), 900, 600);
|
||||
mw.add(new ImageView(imageDV, false, true));
|
||||
mw.setCaller(ImageView.this);
|
||||
//mw.setWidth(900);
|
||||
mw.show();
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Sets the heading.
|
||||
*
|
||||
* @param title the new heading
|
||||
*/
|
||||
protected void setHeading(String title) {
|
||||
heading.setText(title);
|
||||
}
|
||||
|
||||
protected void setParagraph(String text) {
|
||||
paragraph1.setText(text);
|
||||
}
|
||||
|
||||
}
|
@ -1,33 +0,0 @@
|
||||
<!DOCTYPE ui:UiBinder SYSTEM "http://dl.google.com/gwt/DTD/xhtml.ent">
|
||||
<ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder"
|
||||
xmlns:g="urn:import:com.google.gwt.user.client.ui"
|
||||
xmlns:b="urn:import:com.github.gwtbootstrap.client.ui">
|
||||
<ui:style>
|
||||
.max-width-400 {
|
||||
max-width: 400px;
|
||||
}
|
||||
|
||||
.float-right {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.margin-top-10 {
|
||||
margin-top: 10px;
|
||||
}
|
||||
</ui:style>
|
||||
<g:HTMLPanel>
|
||||
<!-- <b:Thumbnail size="4" addStyleNames="{style.max-width-400}" ui:field="thumbnailCont"> -->
|
||||
<b:Button ui:field="viewImage" visible="false">View</b:Button>
|
||||
<b:Button ui:field="openImage"
|
||||
addStyleNames="{style.float-right}" visible="false">Open</b:Button>
|
||||
<b:Image ui:field="imageURL" visible="false" />
|
||||
<b:Caption addStyleNames="{style.margin-top-10}">
|
||||
<b:Heading size="4" ui:field="heading" visible="false"></b:Heading>
|
||||
<b:Paragraph ui:field="paragraph1">
|
||||
</b:Paragraph>
|
||||
<b:Paragraph ui:field="paragraph2" visible="false">
|
||||
</b:Paragraph>
|
||||
</b:Caption>
|
||||
</g:HTMLPanel>
|
||||
<!-- </b:Thumbnail> -->
|
||||
</ui:UiBinder>
|
@ -1,61 +0,0 @@
|
||||
package org.gcube.portlets.user.geoportaldataviewer.client.ui.images;
|
||||
|
||||
import org.gcube.application.geoportalcommon.shared.products.model.UploadedImageDV;
|
||||
import org.gcube.portlets.user.geoportaldataviewer.client.util.StringUtil;
|
||||
|
||||
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;
|
||||
|
||||
|
||||
/**
|
||||
* The Class ThumbnailImageView.
|
||||
*
|
||||
* @author Francesco Mangiacrapa at ISTI-CNR (francesco.mangiacrapa@isti.cnr.it)
|
||||
*
|
||||
* Nov 20, 2020
|
||||
*/
|
||||
public class ThumbnailImageView extends Composite {
|
||||
|
||||
private static ThumbnailImageViewUiBinder uiBinder = GWT.create(ThumbnailImageViewUiBinder.class);
|
||||
|
||||
@UiField
|
||||
HTMLPanel thumbnailContainer;
|
||||
/**
|
||||
* The Interface ThumbnailImageViewUiBinder.
|
||||
*
|
||||
* @author Francesco Mangiacrapa at ISTI-CNR (francesco.mangiacrapa@isti.cnr.it)
|
||||
*
|
||||
* Nov 20, 2020
|
||||
*/
|
||||
interface ThumbnailImageViewUiBinder extends UiBinder<Widget, ThumbnailImageView> {
|
||||
}
|
||||
|
||||
/**
|
||||
* Instantiates a new thumbnail image view.
|
||||
*
|
||||
* @param imageDV the image DV
|
||||
* @param showView the show view
|
||||
* @param showOpen the show open
|
||||
*/
|
||||
public ThumbnailImageView(UploadedImageDV imageDV, final boolean showView, final boolean showOpen) {
|
||||
initWidget(uiBinder.createAndBindUi(this));
|
||||
|
||||
ImageView imageView = new ImageView(imageDV, showView, showOpen);
|
||||
String title = StringUtil.ellipsize(imageDV.getTitolo(), 25);
|
||||
imageView.setHeading(title);
|
||||
|
||||
String didascalia = StringUtil.ellipsize(imageDV.getDidascalia(), 50);
|
||||
imageView.setParagraph(didascalia);
|
||||
|
||||
// imageView.setViewImageVisible(true);
|
||||
|
||||
thumbnailContainer.add(imageView);
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -1,15 +0,0 @@
|
||||
<!DOCTYPE ui:UiBinder SYSTEM "http://dl.google.com/gwt/DTD/xhtml.ent">
|
||||
<ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder"
|
||||
xmlns:g="urn:import:com.google.gwt.user.client.ui"
|
||||
xmlns:b="urn:import:com.github.gwtbootstrap.client.ui"
|
||||
xmlns:citem="urn:import:org.gcube.portlets.user.geoportaldataviewer.client.ui.images">
|
||||
<ui:style>
|
||||
.max-width-400 {
|
||||
max-width: 400px;
|
||||
}
|
||||
</ui:style>
|
||||
<b:Thumbnail size="4" addStyleNames="{style.max-width-400}"
|
||||
ui:field="thumbnailView">
|
||||
<g:HTMLPanel ui:field="thumbnailContainer"></g:HTMLPanel>
|
||||
</b:Thumbnail>
|
||||
</ui:UiBinder>
|
@ -1,50 +0,0 @@
|
||||
package org.gcube.portlets.user.geoportaldataviewer.client.ui.products;
|
||||
|
||||
import org.gcube.application.geoportalcommon.shared.products.model.RecordDV;
|
||||
import org.gcube.portlets.user.geoportaldataviewer.client.GeoportalDataViewerConstants;
|
||||
import org.gcube.portlets.user.geoportaldataviewer.client.ui.util.CustomFlexTable;
|
||||
|
||||
import com.google.gwt.core.client.GWT;
|
||||
import com.google.gwt.dom.client.Style.Unit;
|
||||
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.FlowPanel;
|
||||
import com.google.gwt.user.client.ui.HTMLPanel;
|
||||
import com.google.gwt.user.client.ui.Widget;
|
||||
|
||||
public class RecordView extends Composite {
|
||||
|
||||
private static RecordViewUiBinder uiBinder = GWT.create(RecordViewUiBinder.class);
|
||||
|
||||
interface RecordViewUiBinder extends UiBinder<Widget, RecordView> {
|
||||
}
|
||||
|
||||
@UiField
|
||||
HTMLPanel recordDVPanel;
|
||||
|
||||
private CustomFlexTable customTable = new CustomFlexTable();
|
||||
|
||||
public RecordView() {
|
||||
initWidget(uiBinder.createAndBindUi(this));
|
||||
}
|
||||
|
||||
public RecordView(RecordDV record) {
|
||||
initWidget(uiBinder.createAndBindUi(this));
|
||||
|
||||
customTable.addNextKeyValue("Created", GeoportalDataViewerConstants.DT_FORMAT.format(record.getCreationTime()));
|
||||
customTable.addNextKeyValue("Last Updated", GeoportalDataViewerConstants.DT_FORMAT.format(record.getLastUpdateTime()));
|
||||
customTable.addNextKeyValue("Updated by", record.getLastUpdateUser());
|
||||
recordDVPanel.add(customTable);
|
||||
}
|
||||
|
||||
public void addLabel(FlowPanel w, String labelValue){
|
||||
com.google.gwt.user.client.ui.Label label = new com.google.gwt.user.client.ui.Label(labelValue);
|
||||
label.getElement().getStyle().setMarginRight(5, Unit.PX);
|
||||
w.add(label);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
@ -1,9 +0,0 @@
|
||||
<!DOCTYPE ui:UiBinder SYSTEM "http://dl.google.com/gwt/DTD/xhtml.ent">
|
||||
<ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder"
|
||||
xmlns:g="urn:import:com.google.gwt.user.client.ui"
|
||||
xmlns:b="urn:import:com.github.gwtbootstrap.client.ui">
|
||||
<ui:style>
|
||||
</ui:style>
|
||||
<g:HTMLPanel ui:field="recordDVPanel">
|
||||
</g:HTMLPanel>
|
||||
</ui:UiBinder>
|
@ -1,43 +0,0 @@
|
||||
package org.gcube.portlets.user.geoportaldataviewer.client.util;
|
||||
|
||||
import org.gcube.application.geoportalcommon.shared.products.model.RecordDV;
|
||||
|
||||
import com.google.gwt.core.client.GWT;
|
||||
|
||||
public class OGCUtils {
|
||||
|
||||
public static void performWFSQueryOnCentroid(RecordDV record) {
|
||||
GWT.log("WFS Query for : "+record);
|
||||
|
||||
if (record != null) {
|
||||
// GWT.log("record instanceof ConcessioneDV: " + (record instanceof ConcessioneDV) + " with mongo item id: "
|
||||
// + record.getItemId());
|
||||
// GeoportalDataViewerConstants.print("record instanceof ConcessioneDV: "
|
||||
// +(record instanceof ConcessioneDV));
|
||||
// if (record instanceof ConcessioneDV) {
|
||||
// ConcessioneDV concessioneDV = (ConcessioneDV) record;
|
||||
// Double x = concessioneDV.getCentroidLong();
|
||||
// Double y = concessioneDV.getCentroidLat();
|
||||
// GWT.log("X: " + x + ", Y:" + y);
|
||||
// if (x != null && y != null) {
|
||||
// Coordinate transfCoord = MapUtils.transformCoordiante(new Coordinate(x, y),
|
||||
// GeoportalDataViewerConstants.MAP_PROJECTION.EPSG_4326.getName(), GeoportalDataViewerConstants.MAP_PROJECTION.EPSG_3857.getName());
|
||||
// GeoQuery select = olMapMng.toDataPointQuery(transfCoord, false);
|
||||
// GWT.log("GeoQuery: " + select);
|
||||
// // GeoportalDataViewerConstants.print("fireEvent QueryDataEvent");
|
||||
// ExtentWrapped toExt = new ExtentWrapped(transfCoord.getX(), transfCoord.getY(), transfCoord.getX(),
|
||||
// transfCoord.getY());
|
||||
// layerManager.getLayerManagerBus().fireEvent(new QueryDataEvent(select, toExt, record.getItemId(),
|
||||
// true, GeoportalDataViewerConstants.MapEventType.ADDED_CENTROID_LAYER_TO_MAP));
|
||||
// } else {
|
||||
// GeoportalDataViewerConstants.printJs(
|
||||
// "I cannot select the point one or both coordiantes are null. X: " + x + ", Y:" + y);
|
||||
// }
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
Loading…
Reference in New Issue