diff --git a/.classpath b/.classpath index c9a5f20..f808edf 100644 --- a/.classpath +++ b/.classpath @@ -1,12 +1,12 @@ - + - + @@ -33,5 +33,5 @@ - + diff --git a/.settings/org.eclipse.jdt.core.prefs b/.settings/org.eclipse.jdt.core.prefs index b90405e..13b3428 100644 --- a/.settings/org.eclipse.jdt.core.prefs +++ b/.settings/org.eclipse.jdt.core.prefs @@ -3,11 +3,11 @@ org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=1.7 +org.eclipse.jdt.core.compiler.compliance=1.8 org.eclipse.jdt.core.compiler.debug.lineNumber=generate org.eclipse.jdt.core.compiler.debug.localVariable=generate org.eclipse.jdt.core.compiler.debug.sourceFile=generate org.eclipse.jdt.core.compiler.problem.assertIdentifier=error org.eclipse.jdt.core.compiler.problem.enumIdentifier=error org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning -org.eclipse.jdt.core.compiler.source=1.7 +org.eclipse.jdt.core.compiler.source=1.8 diff --git a/distro/changelog.xml b/distro/changelog.xml index 98d2ae6..3367943 100644 --- a/distro/changelog.xml +++ b/distro/changelog.xml @@ -1,11 +1,19 @@ + + Added location and zoom support [ticket #11708] + Added coordinates EPSG:4326 and EPSG:3857 support [ticket + #11710] + - Updated to support Metadata by StorageHub[ticket #11879] + Updated to support Metadata by StorageHub[ticket #11879] + - Updated to support download by StorageHub[ticket #11879] + Updated to support download by StorageHub[ticket #11879] + diff --git a/pom.xml b/pom.xml index 2572387..c51367b 100644 --- a/pom.xml +++ b/pom.xml @@ -12,7 +12,7 @@ org.gcube.portlets.widgets data-miner-manager-widget - 1.3.1-SNAPSHOT + 1.4.0-SNAPSHOT data-miner-manager-widget data-miner-manager-widget offers a unique access to perform data mining and statistical operations on heterogeneous data diff --git a/src/main/java/org/gcube/portlets/widgets/dataminermanagerwidget/client/parametersfield/WKTFld.java b/src/main/java/org/gcube/portlets/widgets/dataminermanagerwidget/client/parametersfield/WKTFld.java index a8b4543..2ed63e8 100644 --- a/src/main/java/org/gcube/portlets/widgets/dataminermanagerwidget/client/parametersfield/WKTFld.java +++ b/src/main/java/org/gcube/portlets/widgets/dataminermanagerwidget/client/parametersfield/WKTFld.java @@ -11,6 +11,7 @@ import org.gcube.portlets.widgets.openlayerbasicwidgets.client.event.SelectAreaD import org.gcube.portlets.widgets.openlayerbasicwidgets.client.event.SelectAreaDialogEvent.SelectAreaDialogEventHandler; import org.gcube.portlets.widgets.openlayerbasicwidgets.client.widgets.AreaSelectionDialog; import org.gcube.portlets.widgets.openlayerbasicwidgets.client.widgets.GeometryType; +import org.gcube.portlets.widgets.openlayerbasicwidgets.shared.data.Coordinates; import com.allen_sauer.gwt.log.client.Log; import com.google.gwt.core.shared.GWT; @@ -52,7 +53,8 @@ public class WKTFld extends AbstractFld { private TextField selectedAreaField; /** - * @param parameter parameter + * @param parameter + * parameter */ public WKTFld(Parameter parameter) { super(parameter); @@ -71,14 +73,12 @@ public class WKTFld extends AbstractFld { HtmlLayoutContainer descr; if (wktParameter.getDescription() == null) { - descr = new HtmlLayoutContainer( - "

"); + descr = new HtmlLayoutContainer("

"); descr.addStyleName("workflow-fieldDescription"); } else { descr = new HtmlLayoutContainer( - "

" - + wktParameter.getDescription() + "

"); + "

" + wktParameter.getDescription() + "

"); descr.addStyleName("workflow-fieldDescription"); } @@ -120,6 +120,16 @@ public class WKTFld extends AbstractFld { } } + private Coordinates getCoordinates() { + Coordinates coordinates = null; + if (wktParameter != null && wktParameter.getCoordinates() != null) { + coordinates = new Coordinates(wktParameter.getCoordinates().getProjection(), + wktParameter.getCoordinates().getX(), wktParameter.getCoordinates().getY(), + wktParameter.getCoordinates().getZoom()); + } + return coordinates; + } + private void drawAGeometry() { SelectAreaDialogEventHandler handler = new SelectAreaDialogEventHandler() { @@ -136,8 +146,7 @@ public class WKTFld extends AbstractFld { showFieldWithSelection(); break; case Failed: - Log.error("Error during area selection: " - + event.getException()); + Log.error("Error during area selection: " + event.getException()); UtilsGXT3.alert("Error", event.getErrorMessage()); break; default: @@ -147,7 +156,9 @@ public class WKTFld extends AbstractFld { } }; - areaSelectionDialog = new AreaSelectionDialog(getGeometryType()); + GeometryType geometryType = getGeometryType(); + Coordinates coordinates = getCoordinates(); + areaSelectionDialog = new AreaSelectionDialog(geometryType, coordinates); areaSelectionDialog.setZIndex(XDOM.getTopZIndex()); areaSelectionDialog.addSelectAreaDialogEventHandler(handler); areaSelectionDialog.show(); @@ -155,8 +166,7 @@ public class WKTFld extends AbstractFld { } private void init() { - selectButton = new TextButton("Draw a " - + wktParameter.getWktGeometryType().getLabel()); + selectButton = new TextButton("Draw a " + wktParameter.getWktGeometryType().getLabel()); selectButton.setIcon(DataMinerManagerPanel.resources.drawGeometry()); selectButton.addSelectHandler(new SelectEvent.SelectHandler() { @@ -166,8 +176,8 @@ public class WKTFld extends AbstractFld { } }); - //selectButton.setToolTip("Draw a " - // + wktParameter.getWktGeometryType().getLabel()); + // selectButton.setToolTip("Draw a " + // + wktParameter.getWktGeometryType().getLabel()); selectButton2 = new TextButton(""); selectButton2.setIcon(DataMinerManagerPanel.resources.folderExplore()); @@ -178,8 +188,8 @@ public class WKTFld extends AbstractFld { drawAGeometry(); } }); - //selectButton2.setToolTip("Select Another " - // + wktParameter.getWktGeometryType().getLabel()); + // selectButton2.setToolTip("Select Another " + // + wktParameter.getWktGeometryType().getLabel()); cancelButton = new TextButton(""); cancelButton.setIcon(DataMinerManagerPanel.resources.cancel());