ref 8580:TDM - TabMan - Support Java 8 compatibility

https://support.d4science.org/issues/8580

Updated compatibility to Java 8

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-portlet@148745 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Giancarlo Panichi 2017-05-16 15:41:53 +00:00
parent bcb7af8b9b
commit b2529c9eae
35 changed files with 101 additions and 94 deletions

View File

@ -1,12 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<classpath> <classpath>
<classpathentry kind="src" output="target/tabular-data-manager-2.15.0-SNAPSHOT/WEB-INF/classes" path="src/main/java"> <classpathentry kind="src" output="target/tabular-data-manager-2.16.0-SNAPSHOT/WEB-INF/classes" path="src/main/java">
<attributes> <attributes>
<attribute name="optional" value="true"/> <attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/> <attribute name="maven.pomderived" value="true"/>
</attributes> </attributes>
</classpathentry> </classpathentry>
<classpathentry excluding="**" kind="src" output="target/tabular-data-manager-2.15.0-SNAPSHOT/WEB-INF/classes" path="src/main/resources"> <classpathentry excluding="**" kind="src" output="target/tabular-data-manager-2.16.0-SNAPSHOT/WEB-INF/classes" path="src/main/resources">
<attributes> <attributes>
<attribute name="maven.pomderived" value="true"/> <attribute name="maven.pomderived" value="true"/>
</attributes> </attributes>
@ -45,5 +45,5 @@
</classpathentry> </classpathentry>
<classpathentry kind="lib" path="/home/giancarlo/gwt/gwt-2.6.1/validation-api-1.0.0.GA.jar" sourcepath="/home/giancarlo/gwt/gwt-2.6.1/validation-api-1.0.0.GA-sources.jar"/> <classpathentry kind="lib" path="/home/giancarlo/gwt/gwt-2.6.1/validation-api-1.0.0.GA.jar" sourcepath="/home/giancarlo/gwt/gwt-2.6.1/validation-api-1.0.0.GA-sources.jar"/>
<classpathentry kind="lib" path="/home/giancarlo/gwt/gwt-2.6.1/validation-api-1.0.0.GA-sources.jar"/> <classpathentry kind="lib" path="/home/giancarlo/gwt/gwt-2.6.1/validation-api-1.0.0.GA-sources.jar"/>
<classpathentry kind="output" path="target/tabular-data-manager-2.15.0-SNAPSHOT/WEB-INF/classes"/> <classpathentry kind="output" path="target/tabular-data-manager-2.16.0-SNAPSHOT/WEB-INF/classes"/>
</classpath> </classpath>

View File

@ -1,4 +1,8 @@
<ReleaseNotes> <ReleaseNotes>
<Changeset component="org.gcube.portlets-user.tabular-data-portlet.2-16-0"
date="2017-06-12">
<Change>Support Java 8 compatibility [ticket #8580]</Change>
</Changeset>
<Changeset component="org.gcube.portlets-user.tabular-data-portlet.2-15-0" <Changeset component="org.gcube.portlets-user.tabular-data-portlet.2-15-0"
date="2017-04-01"> date="2017-04-01">
<Change>Updated to DataMiner [ticket #6078]</Change> <Change>Updated to DataMiner [ticket #6078]</Change>
@ -41,7 +45,8 @@
<Change>Added Notifications [issue #197]</Change> <Change>Added Notifications [issue #197]</Change>
<Change>Added support to Storage Id [issue #180]</Change> <Change>Added support to Storage Id [issue #180]</Change>
<Change>Added different colors for columns of different type [issue <Change>Added different colors for columns of different type [issue
#251]</Change> #251]
</Change>
<Change>Added to long text [issue #108]</Change> <Change>Added to long text [issue #108]</Change>
<Change>Updated Templates</Change> <Change>Updated Templates</Change>
<Change>Updated Commons Event</Change> <Change>Updated Commons Event</Change>

View File

@ -13,7 +13,7 @@
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>org.gcube.portlets.user</groupId> <groupId>org.gcube.portlets.user</groupId>
<artifactId>tabular-data-manager</artifactId> <artifactId>tabular-data-manager</artifactId>
<version>2.15.0-SNAPSHOT</version> <version>2.16.0-SNAPSHOT</version>
<packaging>war</packaging> <packaging>war</packaging>
@ -43,6 +43,9 @@
<distroDirectory>distro</distroDirectory> <distroDirectory>distro</distroDirectory>
<configDirectory>config</configDirectory> <configDirectory>config</configDirectory>
<!-- JAVA -->
<maven.compiler.source>1.7</maven.compiler.source>
<!-- GWT configuration --> <!-- GWT configuration -->
<gwtVersion>2.6.1</gwtVersion> <gwtVersion>2.6.1</gwtVersion>
<gwtLogVersion>3.3.2</gwtLogVersion> <gwtLogVersion>3.3.2</gwtLogVersion>

View File

@ -15,8 +15,8 @@ import com.sencha.gxt.widget.core.client.container.Viewport.ViewportAppearance;
/** /**
* *
* @author "Giancarlo Panichi" * @author Giancarlo Panichi
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a> *
* *
*/ */
public class PortalViewport extends SimpleContainer { public class PortalViewport extends SimpleContainer {
@ -24,13 +24,12 @@ public class PortalViewport extends SimpleContainer {
protected int rightScrollBarSize = 17; protected int rightScrollBarSize = 17;
protected boolean enableScroll; protected boolean enableScroll;
/** /**
* Creates a viewport layout container with the default appearance. * Creates a viewport layout container with the default appearance.
*/ */
public PortalViewport() { public PortalViewport() {
this(GWT.<ViewportAppearance> create(ViewportAppearance.class)); this(GWT.<ViewportAppearance>create(ViewportAppearance.class));
} }
/** /**
@ -45,15 +44,14 @@ public class PortalViewport extends SimpleContainer {
SafeHtmlBuilder sb = new SafeHtmlBuilder(); SafeHtmlBuilder sb = new SafeHtmlBuilder();
appearance.render(sb); appearance.render(sb);
XElement element=XDOM.create(sb.toSafeHtml()); XElement element = XDOM.create(sb.toSafeHtml());
setElement((Element)element); setElement((Element) element);
monitorWindowResize = true; monitorWindowResize = true;
forceLayoutOnResize = true; forceLayoutOnResize = true;
getFocusSupport().setIgnore(false); getFocusSupport().setIgnore(false);
resize(); resize();
} catch (Exception e) { } catch (Exception e) {
Log.error("PortalViewport: constructor error " Log.error("PortalViewport: constructor error " + e.getLocalizedMessage());
+ e.getLocalizedMessage());
} }
} }
@ -102,21 +100,19 @@ public class PortalViewport extends SimpleContainer {
protected void resize() { protected void resize() {
int viewWidth; int viewWidth;
if(enableScroll){ if (enableScroll) {
viewWidth= calculateWidth() - rightScrollBarSize; viewWidth = calculateWidth() - rightScrollBarSize;
} else { } else {
viewWidth = calculateWidth(); viewWidth = calculateWidth();
} }
int viewHeight = calculateHeight(); int viewHeight = calculateHeight();
Log.info("TDM resize viewWidth: " + viewWidth + " viewHeight: " Log.info("TDM resize viewWidth: " + viewWidth + " viewHeight: " + viewHeight + " clientWidth: "
+ viewHeight + " clientWidth: " + Window.getClientWidth() + Window.getClientWidth() + " clientHeight: " + Window.getClientHeight());
+ " clientHeight: " + Window.getClientHeight());
try { try {
setPixelSize(viewWidth, viewHeight); setPixelSize(viewWidth, viewHeight);
} catch (Exception e) { } catch (Exception e) {
Log.error("PortalViewport: error in resize() at setPixelSize " Log.error("PortalViewport: error in resize() at setPixelSize " + e.getLocalizedMessage());
+ e.getLocalizedMessage());
} }
} }
@ -127,16 +123,12 @@ public class PortalViewport extends SimpleContainer {
protected void onWindowResize(int width, int height) { protected void onWindowResize(int width, int height) {
int viewWidth = calculateWidth(); int viewWidth = calculateWidth();
int viewHeight = calculateHeight(); int viewHeight = calculateHeight();
Log.trace("TDM onWindowResize viewWidth: " + viewWidth Log.trace("TDM onWindowResize viewWidth: " + viewWidth + " viewHeight: " + viewHeight + " clientWidth: "
+ " viewHeight: " + viewHeight + " clientWidth: " + Window.getClientWidth() + " clientHeight: " + Window.getClientHeight());
+ Window.getClientWidth() + " clientHeight: "
+ Window.getClientHeight());
setPixelSize(viewWidth, viewHeight); setPixelSize(viewWidth, viewHeight);
} }
/**
* Update window size
*/
/* /*
* public void resize(){ * public void resize(){
* *
@ -156,23 +148,25 @@ public class PortalViewport extends SimpleContainer {
* int rootWidth = Window.getClientWidth() - 2* leftBorder; //- * int rootWidth = Window.getClientWidth() - 2* leftBorder; //-
* rightScrollBar; * rightScrollBar;
* *
* System.out.println("New workspace dimension Height: "+rootHeight+" Width: " * System.out.println("New workspace dimension Height: "
* +rootWidth); * +rootHeight+" Width: " +rootWidth);
* *
* this.setHeight(rootHeight); this.setWidth(rootWidth); } * this.setHeight(rootHeight); this.setWidth(rootWidth); }
*/ */
/**
*
* @return Width
*/
protected int calculateWidth() { protected int calculateWidth() {
int leftBorder = getAbsoluteLeft(); int leftBorder = getAbsoluteLeft();
Log.info("TDM width: " Log.info("TDM width: " + String.valueOf(Window.getClientWidth() - 2 * leftBorder));
+ String.valueOf(Window.getClientWidth() - 2 * leftBorder));
return Window.getClientWidth() - 2 * leftBorder; return Window.getClientWidth() - 2 * leftBorder;
} }
protected int calculateHeight() { protected int calculateHeight() {
int topBorder = getAbsoluteTop(); int topBorder = getAbsoluteTop();
Log.info("TDM height: " Log.info("TDM height: " + String.valueOf(Window.getClientHeight() - topBorder - 34));
+ String.valueOf(Window.getClientHeight() - topBorder - 34));
return Window.getClientHeight() - topBorder - 34; return Window.getClientHeight() - topBorder - 34;
} }

View File

@ -105,8 +105,8 @@ import com.sencha.gxt.widget.core.client.event.DialogHideEvent.DialogHideHandler
/** /**
* *
* @author "Giancarlo Panichi" <a * @author Giancarlo Panichi
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a> *
* *
*/ */
public class TabularDataController { public class TabularDataController {

View File

@ -4,8 +4,8 @@ import com.google.gwt.i18n.client.Messages;
/** /**
* *
* @author giancarlo email: <a * @author Giancarlo Panichi
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a> *
* *
*/ */
public interface TabularDataControllerMessages extends Messages { public interface TabularDataControllerMessages extends Messages {

View File

@ -20,8 +20,8 @@ import com.sencha.gxt.widget.core.client.container.Viewport;
/** /**
* *
* @author "Giancarlo Panichi" <a * @author Giancarlo Panichi
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a> *
* *
*/ */
public class TabularDataPortlet implements EntryPoint { public class TabularDataPortlet implements EntryPoint {

View File

@ -3,8 +3,8 @@ package org.gcube.portlets.user.td.client.custom;
/** /**
* Fix for z-index bug between GXT3 and GXT2 * Fix for z-index bug between GXT3 and GXT2
* *
* @author giancarlo email: <a * @author Giancarlo Panichi
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a> *
* *
*/ */
public class Gxt2ZIndexXDOM extends public class Gxt2ZIndexXDOM extends

View File

@ -30,6 +30,11 @@ import com.sencha.gxt.widget.core.client.event.SelectEvent;
import com.sencha.gxt.widget.core.client.event.SelectEvent.SelectHandler; import com.sencha.gxt.widget.core.client.event.SelectEvent.SelectHandler;
import com.sencha.gxt.widget.core.client.toolbar.ToolBar; import com.sencha.gxt.widget.core.client.toolbar.ToolBar;
/**
*
* @author Giancarlo Panichi
*
*/
public class TDMLogs extends Window { public class TDMLogs extends Window {
protected static final String TDMLogsServlet = "TDLogsServlet"; protected static final String TDMLogsServlet = "TDLogsServlet";
protected static final String WIDTH = "700px"; protected static final String WIDTH = "700px";

View File

@ -9,8 +9,8 @@ import com.google.gwt.resources.client.ImageResource;
/** /**
* *
* @author "Giancarlo Panichi" <a * @author Giancarlo Panichi
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a> *
* *
*/ */
public interface TabularDataResources extends ClientBundle { public interface TabularDataResources extends ClientBundle {

View File

@ -27,8 +27,8 @@ import com.sencha.gxt.widget.core.client.toolbar.ToolBar;
/** /**
* *
* @author giancarlo email: <a * @author Giancarlo Panichi
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a> *
* *
*/ */
public class AnalyseToolBar { public class AnalyseToolBar {

View File

@ -4,8 +4,8 @@ import com.google.gwt.i18n.client.Messages;
/** /**
* *
* @author giancarlo * @author Giancarlo Panichi
* email: <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a> *
* *
*/ */
public interface AnalyseToolBarMessages extends Messages { public interface AnalyseToolBarMessages extends Messages {

View File

@ -28,8 +28,8 @@ import com.sencha.gxt.widget.core.client.toolbar.ToolBar;
/** /**
* *
* @author "Giancarlo Panichi" <a * @author Giancarlo Panichi
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a> *
* *
*/ */
public class CurationToolBar { public class CurationToolBar {

View File

@ -4,8 +4,8 @@ import com.google.gwt.i18n.client.Messages;
/** /**
* *
* @author giancarlo email: <a * @author Giancarlo Panichi
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a> *
* *
*/ */
public interface CurationToolBarMessages extends Messages { public interface CurationToolBarMessages extends Messages {

View File

@ -34,8 +34,8 @@ import com.sencha.gxt.widget.core.client.toolbar.ToolBar;
/** /**
* *
* @author "Giancarlo Panichi" <a * @author Giancarlo Panichi
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a> *
* *
*/ */
public class FileToolBar { public class FileToolBar {

View File

@ -5,8 +5,8 @@ import com.google.gwt.i18n.client.Messages;
/** /**
* *
* @author giancarlo * @author Giancarlo Panichi
* email: <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a> *
* *
*/ */
public interface FileToolBarMessages extends Messages { public interface FileToolBarMessages extends Messages {

View File

@ -32,8 +32,8 @@ import com.sencha.gxt.widget.core.client.toolbar.ToolBar;
/** /**
* *
* @author giancarlo email: <a * @author Giancarlo Panichi
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a> *
* *
*/ */
public class ModifyToolBar { public class ModifyToolBar {

View File

@ -4,8 +4,8 @@ import com.google.gwt.i18n.client.Messages;
/** /**
* *
* @author giancarlo email: <a * @author Giancarlo Panichi
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a> *
* *
*/ */
public interface ModifyToolBarMessages extends Messages { public interface ModifyToolBarMessages extends Messages {

View File

@ -27,8 +27,8 @@ import com.sencha.gxt.widget.core.client.toolbar.ToolBar;
/** /**
* *
* @author "Giancarlo Panichi" <a * @author Giancarlo Panichi
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a> *
* *
*/ */
public class RuleToolBar { public class RuleToolBar {

View File

@ -4,8 +4,8 @@ import com.google.gwt.i18n.client.Messages;
/** /**
* *
* @author giancarlo email: <a * @author Giancarlo Panichi
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a> *
* *
*/ */
public interface RuleToolBarMessages extends Messages { public interface RuleToolBarMessages extends Messages {

View File

@ -13,8 +13,8 @@ import com.sencha.gxt.widget.core.client.container.VerticalLayoutContainer.Verti
/** /**
* *
* @author "Giancarlo Panichi" * @author Giancarlo Panichi
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a> *
* *
*/ */
public class TabularDataRibbon { public class TabularDataRibbon {

View File

@ -4,8 +4,8 @@ import com.google.gwt.i18n.client.Messages;
/** /**
* *
* @author giancarlo * @author Giancarlo Panichi
* email: <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a> *
* *
*/ */
public interface TabularDataRibbonMessages extends Messages { public interface TabularDataRibbonMessages extends Messages {

View File

@ -27,8 +27,8 @@ import com.sencha.gxt.widget.core.client.toolbar.ToolBar;
/** /**
* *
* @author "Giancarlo Panichi" <a * @author Giancarlo Panichi
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a> *
* *
*/ */
public class TemplateToolBar { public class TemplateToolBar {

View File

@ -4,8 +4,8 @@ import com.google.gwt.i18n.client.Messages;
/** /**
* *
* @author giancarlo email: <a * @author Giancarlo Panichi
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a> *
* *
*/ */
public interface TemplateToolBarMessages extends Messages { public interface TemplateToolBarMessages extends Messages {

View File

@ -20,8 +20,8 @@ import com.google.web.bindery.event.shared.EventBus;
* RStudio Widget * RStudio Widget
* *
* *
* @author "Giancarlo Panichi" <a * @author Giancarlo Panichi
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a> *
* *
*/ */
public class RStudio { public class RStudio {

View File

@ -26,8 +26,8 @@ import com.sencha.gxt.widget.core.client.event.SelectEvent.SelectHandler;
/** /**
* *
* @author "Giancarlo Panichi" <a * @author Giancarlo Panichi
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a> *
* *
*/ */
public class TemplateApplyDialog extends Window implements public class TemplateApplyDialog extends Window implements

View File

@ -59,8 +59,8 @@ import com.sencha.gxt.widget.core.client.toolbar.ToolBar;
/** /**
* *
* @author giancarlo email: <a * @author Giancarlo Panichi
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a> *
* *
*/ */
public class TemplateApplyPanel extends FramedPanel { public class TemplateApplyPanel extends FramedPanel {

View File

@ -13,8 +13,8 @@ import com.sencha.gxt.data.shared.PropertyAccess;
/** /**
* *
* @author giancarlo * @author Giancarlo Panichi
* email: <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a> *
* *
*/ */
public interface TemplateDataProperties extends PropertyAccess<TemplateData> { public interface TemplateDataProperties extends PropertyAccess<TemplateData> {

View File

@ -18,8 +18,8 @@ import com.sencha.gxt.widget.core.client.event.SelectEvent.SelectHandler;
/** /**
* *
* @author "Giancarlo Panichi" <a * @author Giancarlo Panichi
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a> *
* *
*/ */
public class TemplateDeleteDialog extends Window { public class TemplateDeleteDialog extends Window {

View File

@ -12,8 +12,8 @@ import com.sencha.gxt.widget.core.client.event.SelectEvent.SelectHandler;
/** /**
* *
* @author "Giancarlo Panichi" <a * @author Giancarlo Panichi
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a> *
* *
*/ */
public class TemplateOpenDialog extends Window { public class TemplateOpenDialog extends Window {

View File

@ -57,8 +57,8 @@ import com.sencha.gxt.widget.core.client.toolbar.ToolBar;
/** /**
* *
* @author giancarlo email: <a * @author Giancarlo Panichi
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a> *
* *
*/ */
public class TemplateOpenPanel extends FramedPanel { public class TemplateOpenPanel extends FramedPanel {

View File

@ -16,8 +16,8 @@ import com.sencha.gxt.widget.core.client.event.SelectEvent.SelectHandler;
/** /**
* *
* @author "Giancarlo Panichi" <a * @author Giancarlo Panichi
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a> *
* *
*/ */
public class TemplateShareDialog extends Window { public class TemplateShareDialog extends Window {

View File

@ -57,8 +57,8 @@ import com.sencha.gxt.widget.core.client.toolbar.ToolBar;
/** /**
* *
* @author giancarlo email: <a * @author Giancarlo Panichi
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a> *
* *
*/ */
public class TemplateSharePanel extends FramedPanel { public class TemplateSharePanel extends FramedPanel {

View File

@ -17,8 +17,8 @@ import org.slf4j.LoggerFactory;
/** /**
* *
* @author Giancarlo Panichi email: <a * @author Giancarlo Panichi Panichi
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a> *
* *
*/ */
public class TabularDataPortlet extends GenericPortlet { public class TabularDataPortlet extends GenericPortlet {

View File

@ -7,8 +7,8 @@ package org.gcube.portlets.user.td;
/** /**
* *
* @author "Giancarlo Panichi" * @author Giancarlo Panichi
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a> *
* *
*/ */
public class TestTabularDataPortlet { public class TestTabularDataPortlet {