ref 8471:TDM - DataMiner Manager - Support Java 8 compatibility

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

Updated to support Java 8 compatibility

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/widgets/data-miner-manager-widget@148452 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Giancarlo Panichi 2017-05-10 14:04:24 +00:00
parent 2ed09d9df1
commit 5801474f2a
131 changed files with 858 additions and 1095 deletions

View File

@ -1,20 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" output="target/data-miner-manager-widget-1.0.0-SNAPSHOT/WEB-INF/classes" path="src/main/java">
<classpathentry kind="src" output="target/data-miner-manager-widget-1.1.0-SNAPSHOT/WEB-INF/classes" path="src/main/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry including="**/*.java" kind="src" path="src/main/resources"/>
<classpathentry excluding="**" kind="src" output="target/data-miner-manager-widget-1.1.0-SNAPSHOT/WEB-INF/classes" path="src/main/resources">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry including="**/*.java" kind="src" output="target/test-classes" path="src/test/resources"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7">
<classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
@ -25,5 +33,5 @@
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="output" path="target/data-miner-manager-widget-1.0.0-SNAPSHOT/WEB-INF/classes"/>
<classpathentry kind="output" path="target/data-miner-manager-widget-1.1.0-SNAPSHOT/WEB-INF/classes"/>
</classpath>

View File

@ -1,8 +1,8 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
org.eclipse.jdt.core.compiler.compliance=1.7
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.compliance=1.8
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

View File

@ -4,6 +4,7 @@
<wb-resource deploy-path="/" source-path="/src/main/webapp" tag="defaultRootSource"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/test/resources"/>
<property name="java-output-path" value="/data-miner-manager/target/data-miner-manager-1.2.0-SNAPSHOT/WEB-INF/classes"/>
<property name="context-root" value="data-miner-manager-widget"/>
</wb-module>

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<faceted-project>
<fixed facet="wst.jsdt.web"/>
<installed facet="java" version="1.7"/>
<installed facet="java" version="1.8"/>
<installed facet="jst.web" version="3.0"/>
<installed facet="wst.jsdt.web" version="1.0"/>
</faceted-project>

View File

@ -1,4 +1,8 @@
<ReleaseNotes>
<Changeset component="org.gcube.portlets.widgets.data-miner-manager-widget.1-1-0"
date="2017-06-12">
<Change>Support Java 8 compatibility [ticket #8471]</Change>
</Changeset>
<Changeset component="org.gcube.portlets.widgets.data-miner-manager-widget.1-0-0"
date="2017-03-31">
<Change>First release</Change>

11
pom.xml
View File

@ -12,7 +12,7 @@
<groupId>org.gcube.portlets.widgets</groupId>
<artifactId>data-miner-manager-widget</artifactId>
<version>1.0.0-SNAPSHOT</version>
<version>1.1.0-SNAPSHOT</version>
<name>data-miner-manager-widget</name>
<description>data-miner-manager-widget offers a unique access to perform data mining and statistical operations on heterogeneous data</description>
@ -40,8 +40,9 @@
<configDirectory>config</configDirectory>
<!-- Java Version -->
<javaVersion>1.7</javaVersion>
<!-- Java -->
<maven.compiler.source>1.7</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<!-- GWT configuration -->
<gwtVersion>2.6.1</gwtVersion>
@ -433,8 +434,8 @@
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>${javaVersion}</source>
<target>${javaVersion}</target>
<source>${maven.compiler.source}</source>
<target>${maven.compiler.target}</target>
</configuration>
</plugin>

View File

@ -49,8 +49,8 @@ import com.sencha.gxt.widget.core.client.event.HideEvent.HideHandler;
/**
*
* @author Giancarlo Panichi email: <a
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
* @author Giancarlo Panichi
*
*
*/
public class DataMinerManagerController {

View File

@ -13,8 +13,8 @@ import com.sencha.gxt.widget.core.client.Window;
/**
*
* @author Giancarlo Panichi email: <a
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
* @author Giancarlo Panichi
*
*
*/
public class DataMinerManagerDialog extends Window implements HasExternalExecutionEventHandler {

View File

@ -23,8 +23,8 @@ import com.sencha.gxt.widget.core.client.container.SimpleContainer;
/**
*
* @author Giancarlo Panichi email: <a
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
* @author Giancarlo Panichi
*
*
*/
public class DataMinerManagerPanel extends ContentPanel {

View File

@ -21,8 +21,8 @@ import com.google.gwt.user.client.ui.Image;
/**
*
* @author Giancarlo Panichi email: <a
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
* @author Giancarlo Panichi
*
*
*/
public class Header extends HorizontalPanel {

View File

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

View File

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

View File

@ -8,8 +8,8 @@ import com.google.gwt.event.shared.SimpleEventBus;
/**
*
* @author Giancarlo Panichi email: <a
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
* @author Giancarlo Panichi
*
*
*/
public class EventBusProvider {

View File

@ -14,8 +14,8 @@ import com.sencha.gxt.widget.core.client.form.TextField;
/**
*
* @author Giancarlo Panichi email: <a
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
* @author Giancarlo Panichi
*
*
*/
public class ComputationValueFileListPanel extends SimpleContainer {

View File

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

View File

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

View File

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

View File

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

View File

@ -2,8 +2,8 @@ package org.gcube.portlets.widgets.dataminermanagerwidget.client.computations;
/**
*
* @author Giancarlo Panichi email: <a
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
* @author Giancarlo Panichi
*
*
*/
public enum ComputationsPropertiesType {

View File

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

View File

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

View File

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

View File

@ -19,8 +19,8 @@ import com.sencha.gxt.core.client.util.Format;
/**
*
* @author Giancarlo Panichi email: <a
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
* @author Giancarlo Panichi
*
*
*/
public class GreenProgressBarAppearance implements ProgressBarAppearance {

View File

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

View File

@ -19,8 +19,8 @@ import com.sencha.gxt.core.client.util.Format;
/**
*
* @author Giancarlo Panichi email: <a
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
* @author Giancarlo Panichi
*
*
*/
public class OrangeProgressBarAppearance implements ProgressBarAppearance {

View File

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

View File

@ -19,8 +19,8 @@ import com.sencha.gxt.core.client.util.Format;
/**
*
* @author Giancarlo Panichi email: <a
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
* @author Giancarlo Panichi
*
*
*/
public class RedProgressBarAppearance implements ProgressBarAppearance {

View File

@ -11,8 +11,8 @@ import com.sencha.gxt.widget.core.client.container.SimpleContainer;
/**
*
* @author Giancarlo Panichi email: <a
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
* @author Giancarlo Panichi
*
*
*/
public class DataSpacePanel extends SimpleContainer {

View File

@ -2,8 +2,8 @@ package org.gcube.portlets.widgets.dataminermanagerwidget.client.dataspace;
/**
*
* @author Giancarlo Panichi email: <a
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
* @author Giancarlo Panichi
*
*
*/
public enum DataSpacePropertiesType {

View File

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

View File

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

View File

@ -12,8 +12,8 @@ import com.google.gwt.event.shared.HasHandlers;
* Cancel Computation Request Event
*
*
* @author "Giancarlo Panichi" <a
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
* @author Giancarlo Panichi
*
*
*/
public class CancelComputationExecutionRequestEvent

View File

@ -11,8 +11,8 @@ import com.google.gwt.event.shared.HasHandlers;
* Cancel Execution From Computations Request Event
*
*
* @author "Giancarlo Panichi" <a
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
* @author Giancarlo Panichi
*
*
*/
public class CancelExecutionFromComputationsRequestEvent

View File

@ -12,8 +12,8 @@ import com.google.gwt.event.shared.HasHandlers;
* Computation Data Event
*
*
* @author "Giancarlo Panichi" <a
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
* @author Giancarlo Panichi
*
*
*/
public class ComputationDataEvent extends

View File

@ -11,8 +11,8 @@ import com.google.gwt.event.shared.HasHandlers;
* Output Show Request Event
*
*
* @author "Giancarlo Panichi" <a
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
* @author Giancarlo Panichi
*
*
*/
public class ComputationDataRequestEvent

View File

@ -12,8 +12,8 @@ import com.google.gwt.event.shared.HasHandlers;
* Computation Ready Event
*
*
* @author "Giancarlo Panichi" <a
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
* @author Giancarlo Panichi
*
*
*/
public class ComputationReadyEvent extends

View File

@ -13,8 +13,8 @@ import com.google.gwt.event.shared.HasHandlers;
* Data Miner Work Area Event
*
*
* @author "Giancarlo Panichi" <a
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
* @author Giancarlo Panichi
*
*
*/
public class DataMinerWorkAreaEvent extends

View File

@ -12,8 +12,8 @@ import com.google.gwt.event.shared.HasHandlers;
* Data Miner Work Area Request Event
*
*
* @author "Giancarlo Panichi" <a
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
* @author Giancarlo Panichi
*
*
*/
public class DataMinerWorkAreaRequestEvent

View File

@ -12,8 +12,8 @@ import com.google.gwt.event.shared.HasHandlers;
* Delete Item Request Event
*
*
* @author "Giancarlo Panichi" <a
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
* @author Giancarlo Panichi
*
*
*/
public class DeleteItemRequestEvent extends

View File

@ -11,8 +11,8 @@ import com.google.gwt.event.shared.HasHandlers;
* External Execution Event
*
*
* @author "Giancarlo Panichi" <a
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
* @author Giancarlo Panichi
*
*
*/
public class ExternalExecutionEvent extends

View File

@ -11,8 +11,8 @@ import com.google.gwt.event.shared.HasHandlers;
* Start Computation Execution Request Event
*
*
* @author "Giancarlo Panichi" <a
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
* @author Giancarlo Panichi
*
*
*/
public class ExternalExecutionRequestEvent extends

View File

@ -11,8 +11,8 @@ import com.google.gwt.event.shared.HasHandlers;
* Menu Event
*
*
* @author "Giancarlo Panichi" <a
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
* @author Giancarlo Panichi
*
*
*/
public class MenuEvent extends

View File

@ -11,8 +11,8 @@ import com.google.gwt.event.shared.HasHandlers;
* Menu Event
*
*
* @author "Giancarlo Panichi" <a
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
* @author Giancarlo Panichi
*
*
*/
public class MenuSwitchEvent extends

View File

@ -12,8 +12,8 @@ import com.google.gwt.event.shared.HasHandlers;
* Operators Classification Event
*
*
* @author "Giancarlo Panichi" <a
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
* @author Giancarlo Panichi
*
*
*/
public class OperatorsClassificationEvent

View File

@ -11,8 +11,8 @@ import com.google.gwt.event.shared.HasHandlers;
* Operators Classification Request Event
*
*
* @author "Giancarlo Panichi" <a
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
* @author Giancarlo Panichi
*
*
*/
public class OperatorsClassificationRequestEvent

View File

@ -12,8 +12,8 @@ import com.google.gwt.event.shared.HasHandlers;
* Output Data Event
*
*
* @author "Giancarlo Panichi" <a
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
* @author Giancarlo Panichi
*
*
*/
public class OutputDataEvent extends

View File

@ -12,8 +12,8 @@ import com.google.gwt.event.shared.HasHandlers;
* Output Data Request Event
*
*
* @author "Giancarlo Panichi" <a
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
* @author Giancarlo Panichi
*
*
*/
public class OutputDataRequestEvent extends

View File

@ -11,8 +11,8 @@ import com.google.gwt.event.shared.HasHandlers;
* Refresh DataMiner Work Area Event
*
*
* @author "Giancarlo Panichi" <a
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
* @author Giancarlo Panichi
*
*
*/
public class RefreshDataMinerWorkAreaEvent extends

View File

@ -12,8 +12,8 @@ import com.google.gwt.event.shared.HasHandlers;
* Resubmit Computation Execution Event
*
*
* @author "Giancarlo Panichi" <a
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
* @author Giancarlo Panichi
*
*
*/
public class ResubmitComputationExecutionEvent

View File

@ -11,8 +11,8 @@ import com.google.gwt.event.shared.HasHandlers;
* Resubmit Computation Execution Request Event
*
*
* @author "Giancarlo Panichi" <a
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
* @author Giancarlo Panichi
*
*
*/
public class ResubmitComputationExecutionRequestEvent

View File

@ -11,8 +11,8 @@ import com.google.gwt.event.shared.HasHandlers;
* Session Expired Event
*
*
* @author "Giancarlo Panichi" <a
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
* @author Giancarlo Panichi
*
*
*/
public class SessionExpiredEvent extends GwtEvent<SessionExpiredEvent.SessionExpiredEventHandler> {

View File

@ -12,8 +12,8 @@ import com.google.gwt.event.shared.HasHandlers;
* Start Computation Execution Event
*
*
* @author "Giancarlo Panichi" <a
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
* @author Giancarlo Panichi
*
*
*/
public class StartComputationExecutionEvent

View File

@ -12,8 +12,8 @@ import com.google.gwt.event.shared.HasHandlers;
* Start Computation Execution Request Event
*
*
* @author "Giancarlo Panichi" <a
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
* @author Giancarlo Panichi
*
*
*/
public class StartComputationExecutionRequestEvent

View File

@ -12,8 +12,8 @@ import com.google.gwt.event.shared.HasHandlers;
* TabularFldChangeEvent
*
*
* @author "Giancarlo Panichi" <a
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
* @author Giancarlo Panichi
*
*
*/
public class TabularFldChangeEvent extends

View File

@ -11,8 +11,8 @@ import com.google.gwt.event.shared.HasHandlers;
* Tabular Resource Info Event
*
*
* @author "Giancarlo Panichi" <a
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
* @author Giancarlo Panichi
*
*
*/
public class TabularResourceInfoEvent extends

View File

@ -9,8 +9,8 @@ import com.google.gwt.event.shared.HasHandlers;
* Tabular Resource Info Request Event
*
*
* @author "Giancarlo Panichi" <a
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
* @author Giancarlo Panichi
*
*
*/
public class TabularResourceInfoRequestEvent

View File

@ -11,8 +11,8 @@ import com.google.gwt.event.shared.HasHandlers;
* User Interface State Event
*
*
* @author "Giancarlo Panichi" <a
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
* @author Giancarlo Panichi
*
*
*/
public class UIStateEvent extends GwtEvent<UIStateEvent.UIStateEventHandler> {

View File

@ -12,8 +12,8 @@ import com.google.gwt.event.shared.HasHandlers;
* WPS Menu Event
*
*
* @author "Giancarlo Panichi" <a
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
* @author Giancarlo Panichi
*
*
*/
public class WPSMenuEvent extends

View File

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

View File

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

View File

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

View File

@ -44,8 +44,8 @@ import com.sencha.gxt.widget.core.client.form.FormPanel;
/**
*
* @author Giancarlo Panichi email: <a
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
* @author Giancarlo Panichi
*
*
*/
public class ComputationParametersPanel extends SimpleContainer {

View File

@ -33,8 +33,8 @@ import com.sencha.gxt.widget.core.client.info.Info;
/**
*
* @author Giancarlo Panichi email: <a
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
* @author Giancarlo Panichi
*
*
*/
public class ComputationStatusPanel extends SimpleContainer {
@ -49,6 +49,7 @@ public class ComputationStatusPanel extends SimpleContainer {
/**
*
* @param operatorName operator name
*/
public ComputationStatusPanel(String operatorName) {
super();

View File

@ -10,8 +10,8 @@ import com.sencha.gxt.widget.core.client.form.TextArea;
/**
*
* @author Giancarlo Panichi email: <a
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
* @author Giancarlo Panichi
*
*
*/
public class EquivalentRequestDialog extends Dialog {

View File

@ -11,8 +11,8 @@ import com.sencha.gxt.widget.core.client.container.SimpleContainer;
/**
*
* @author Giancarlo Panichi email: <a
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
* @author Giancarlo Panichi
*
*
*/
public class ExperimentPanel extends SimpleContainer implements

View File

@ -22,8 +22,8 @@ import com.sencha.gxt.widget.core.client.tips.ToolTipConfig;
/**
*
* @author Giancarlo Panichi email: <a
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
* @author Giancarlo Panichi
*
*
*/
public class OperatorCategoryPanel extends SimpleContainer {
@ -38,14 +38,14 @@ public class OperatorCategoryPanel extends SimpleContainer {
/**
*
* @param handler
* @param cat
* @param handler operator panel handler
* @param operatorCategory operator category
*/
public OperatorCategoryPanel(OperatorsPanelHandler handler,
OperatorCategory cat) {
OperatorCategory operatorCategory) {
super();
this.handler = handler;
this.category = cat;
this.category = operatorCategory;
create();
}

View File

@ -1,6 +1,5 @@
package org.gcube.portlets.widgets.dataminermanagerwidget.client.experiments;
import org.gcube.data.analysis.dataminermanagercl.shared.process.Operator;
import org.gcube.portlets.widgets.dataminermanagerwidget.client.DataMinerManagerPanel;
@ -19,7 +18,7 @@ import com.sencha.gxt.widget.core.client.tips.ToolTipConfig;
/**
*
* @author Giancarlo Panichi
* email: <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
*
*
*/
public class OperatorPanel extends SimpleContainer {
@ -36,7 +35,9 @@ public class OperatorPanel extends SimpleContainer {
/**
*
* @param operator
* operator
* @param handler
* operator panel handler
*/
public OperatorPanel(Operator operator, OperatorsPanelHandler handler) {
super();
@ -56,7 +57,7 @@ public class OperatorPanel extends SimpleContainer {
public void onClick(ClickEvent event) {
event.stopPropagation();
handler.addOperator(OperatorPanel.this, operator);
}
}, ClickEvent.getType());
@ -64,31 +65,30 @@ public class OperatorPanel extends SimpleContainer {
titleHtml = new HTML(operator.getName());
titleHtml.addStyleName("operatorPanel-title");
HTML descriptionHtml = new HTML(Format.ellipse(operator.getBriefDescription(),OPERATOR_BRIEF_DESCRIPTION_LENGHT));
HTML descriptionHtml = new HTML(
Format.ellipse(operator.getBriefDescription(), OPERATOR_BRIEF_DESCRIPTION_LENGHT));
descriptionHtml.addStyleName("operatorPanel-briefDescription");
vert=new VerticalLayoutContainer();
vert = new VerticalLayoutContainer();
vert.add(titleHtml, new VerticalLayoutData(1, -1, new Margins(0)));
vert.add(descriptionHtml, new VerticalLayoutData(1, -1, new Margins(0)));
add(vert);
ToolTipConfig tooltipConfig = createToolTip(operator);
setToolTipConfig(tooltipConfig);
}
/**
*
* @return
* @return operator
*/
public Operator getOperator() {
return operator;
}
/**
* @return
*/
private ToolTipConfig createToolTip(Operator op) {
ToolTipConfig tooltipConfig = new ToolTipConfig();
tooltipConfig.setTitleHtml("<br>&nbsp;&nbsp;" + op.getName());
@ -96,32 +96,26 @@ public class OperatorPanel extends SimpleContainer {
tooltipConfig.setMouseOffsetY(0);
tooltipConfig.setAnchor(Side.LEFT);
tooltipConfig.setDismissDelay(5000);
tooltipConfig.setBodyHtml(getTooltipTemplate(GWT.getModuleBaseURL(),
op.getId(), op.hasImage(), op.getDescription()));
tooltipConfig.setBodyHtml(
getTooltipTemplate(GWT.getModuleBaseURL(), op.getId(), op.hasImage(), op.getDescription()));
// config.setCloseable(true);
tooltipConfig.setMaxWidth(TOOLTIP_WIDTH);
return tooltipConfig;
}
/**
*
* @param base
* @param id
* @param hasImage
* @param description
* @return
*/
private String getTooltipTemplate(String base, String id, boolean hasImage,
String description) {
String image=DataMinerManagerPanel.resources.operatorsDefaultImage().getSafeUri().asString();
String template = "<div class='categoryItemTooltip'>" + "<img src='"
+ image +"' >" + Format.ellipse(description, TOOLTIP_DESCRIPTION_LENGHT)
+ "</div>";
private String getTooltipTemplate(String base, String id, boolean hasImage, String description) {
String image = DataMinerManagerPanel.resources.operatorsDefaultImage().getSafeUri().asString();
String template = "<div class='categoryItemTooltip'>" + "<img src='" + image + "' >"
+ Format.ellipse(description, TOOLTIP_DESCRIPTION_LENGHT) + "</div>";
return template;
};
/**
*
* @param isSelect set if is selected
*/
public void toggleSelected(boolean isSelect) {
if (isSelect)
this.addStyleName("operatorPanel-selected");
@ -130,8 +124,11 @@ public class OperatorPanel extends SimpleContainer {
this.removeStyleName("operatorPanel-selected");
// titleHtml.removeStyleName("operatorPanel-title-selected");
}
public void setAsTheDefaultOperator(){
/**
*
*/
public void setAsTheDefaultOperator() {
handler.addOperator(OperatorPanel.this, operator);
}

View File

@ -42,8 +42,8 @@ import com.sencha.gxt.widget.core.client.toolbar.ToolBar;
/**
*
* @author Giancarlo Panichi email: <a
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
* @author Giancarlo Panichi
*
*
*/
public class OperatorsPanel extends FramedPanel {
@ -70,9 +70,10 @@ public class OperatorsPanel extends FramedPanel {
private View view = null;
private String currentClassificationName = Constants.UserClassificationName;
/**
*
* @param handler
* operators panel handler
*/
public OperatorsPanel(OperatorsPanelHandler handler) {
super();
@ -91,81 +92,67 @@ public class OperatorsPanel extends FramedPanel {
}
private void bind() {
EventBusProvider.INSTANCE
.addHandler(
OperatorsClassificationEvent.TYPE,
new OperatorsClassificationEvent.OperatorsClassificationEventHandler() {
EventBusProvider.INSTANCE.addHandler(OperatorsClassificationEvent.TYPE,
new OperatorsClassificationEvent.OperatorsClassificationEventHandler() {
@Override
public void onOperatorsClassification(
OperatorsClassificationEvent event) {
Log.debug("OperatorsPanel catch OperatorsClassificationEvent: "
+ event);
manageOperatorsClassificationEvent(event);
}
});
@Override
public void onOperatorsClassification(OperatorsClassificationEvent event) {
Log.debug("OperatorsPanel catch OperatorsClassificationEvent: " + event);
manageOperatorsClassificationEvent(event);
}
});
}
private void manageOperatorsClassificationEvent(
OperatorsClassificationEvent event) {
if (event.getOperatorsClassificationRequestType().compareTo(
OperatorsClassificationRequestType.ByName) == 0) {
if (currentClassificationName.compareTo(event
.getClassificationName()) == 0) {
private void manageOperatorsClassificationEvent(OperatorsClassificationEvent event) {
if (event.getOperatorsClassificationRequestType().compareTo(OperatorsClassificationRequestType.ByName) == 0) {
if (currentClassificationName.compareTo(event.getClassificationName()) == 0) {
waitMessage(false);
if (event.getOperatorsClassification() != null) {
operatorsClassification = event
.getOperatorsClassification();
operatorsClassification = event.getOperatorsClassification();
operators.clear();
operators.addAll(event.getOperatorsClassification()
.getOperators());
operators.addAll(event.getOperatorsClassification().getOperators());
String operatorId = event.getOperatorId();
Log.debug("ShowCategoriesList");
List<OperatorCategoryPanel> categoryPanels = mapCategoriesPanels
.get(currentClassificationName);
List<OperatorCategoryPanel> categoryPanels = mapCategoriesPanels.get(currentClassificationName);
if (categoryPanels == null) {
categoryPanels = new ArrayList<OperatorCategoryPanel>();
if (operatorsClassification != null) {
for (OperatorCategory cat : operatorsClassification
.getOperatorCategories()) {
categoryPanels.add(new OperatorCategoryPanel(
handler, cat));
for (OperatorCategory cat : operatorsClassification.getOperatorCategories()) {
categoryPanels.add(new OperatorCategoryPanel(handler, cat));
}
}
mapCategoriesPanels.put(currentClassificationName,
categoryPanels);
mapCategoriesPanels.put(currentClassificationName, categoryPanels);
}
v.clear();
for (OperatorCategoryPanel panel : categoryPanels){
for (OperatorCategoryPanel panel : categoryPanels) {
v.add(panel);
}
view = View.CATEGORIES;
if(operatorId!=null&&!operatorId.isEmpty()){
OperatorCategory operatorCategoryDefault=null;
Operator operatorDefault=null;
for(Operator op:operators){
if(op.getId().compareTo(operatorId)==0){
operatorDefault=op;
operatorCategoryDefault=op.getCategory();
if (operatorId != null && !operatorId.isEmpty()) {
OperatorCategory operatorCategoryDefault = null;
Operator operatorDefault = null;
for (Operator op : operators) {
if (op.getId().compareTo(operatorId) == 0) {
operatorDefault = op;
operatorCategoryDefault = op.getCategory();
break;
}
}
if(operatorCategoryDefault!=null){
for (OperatorCategoryPanel opCategoryPanel : categoryPanels){
if(opCategoryPanel.getCategory().compareTo(operatorCategoryDefault)==0){
if (operatorCategoryDefault != null) {
for (OperatorCategoryPanel opCategoryPanel : categoryPanels) {
if (opCategoryPanel.getCategory().compareTo(operatorCategoryDefault) == 0) {
opCategoryPanel.setOperatorDefault(operatorDefault);
break;
}
}
}
}
forceLayout();
}
@ -188,8 +175,7 @@ public class OperatorsPanel extends FramedPanel {
OperatorsClassificationRequestEvent operatorsClassificationRequestEvent = new OperatorsClassificationRequestEvent(
currentClassificationName, true);
Log.debug("OperatorsPanel fire: " + operatorsClassificationRequestEvent);
EventBusProvider.INSTANCE
.fireEvent(operatorsClassificationRequestEvent);
EventBusProvider.INSTANCE.fireEvent(operatorsClassificationRequestEvent);
}
/**
@ -201,8 +187,7 @@ public class OperatorsPanel extends FramedPanel {
final StoreFilterField<String> filterField = new StoreFilterField<String>() {
@Override
protected boolean doSelect(Store<String> store, String parent,
String item, String filter) {
protected boolean doSelect(Store<String> store, String parent, String item, String filter) {
Log.debug("StoreFilterField: " + item + " " + filter);
return false;
}
@ -227,18 +212,16 @@ public class OperatorsPanel extends FramedPanel {
filterField.setWidth(100);
TextButton showAllOperatorsButton = new TextButton();
showAllOperatorsButton.setIcon(DataMinerManagerPanel.resources
.sortAscending());
showAllOperatorsButton
.addSelectHandler(new SelectEvent.SelectHandler() {
showAllOperatorsButton.setIcon(DataMinerManagerPanel.resources.sortAscending());
showAllOperatorsButton.addSelectHandler(new SelectEvent.SelectHandler() {
@Override
public void onSelect(SelectEvent event) {
filterField.clear();
showAllOperatorsList();
@Override
public void onSelect(SelectEvent event) {
filterField.clear();
showAllOperatorsList();
}
});
}
});
showAllOperatorsButton.setToolTip(SHOW_ALL_OPERATORS_TOOLTIP);
TextButton showCategoriesButton = new TextButton();
@ -255,18 +238,15 @@ public class OperatorsPanel extends FramedPanel {
showCategoriesButton.setToolTip(SHOW_CATEGORIES_TOOLTIP);
final TextButton btnMenuPerspective = new TextButton(
currentClassificationName);
btnMenuPerspective
.setIcon(DataMinerManagerPanel.resources.userPerspective());
final TextButton btnMenuPerspective = new TextButton(currentClassificationName);
btnMenuPerspective.setIcon(DataMinerManagerPanel.resources.userPerspective());
Menu menuPerspective = new Menu();
for (final String perspectiveName : Constants.ClassificationNames) {
final ImageResource img = perspectiveName
.equals(Constants.UserClassificationName) ? DataMinerManagerPanel.resources
.userPerspective() : DataMinerManagerPanel.resources
.computationPerspective();
final ImageResource img = perspectiveName.equals(Constants.UserClassificationName)
? DataMinerManagerPanel.resources.userPerspective()
: DataMinerManagerPanel.resources.computationPerspective();
MenuItem perspectiveItem = new MenuItem(perspectiveName);
perspectiveItem.addSelectionHandler(new SelectionHandler<Item>() {
@ -306,16 +286,14 @@ public class OperatorsPanel extends FramedPanel {
List<String> ids = new ArrayList<String>();
for (Operator op : operators)
// check for filtering and prevent duplicates
if (op.getName().toLowerCase().contains(searchText.toLowerCase())
&& !ids.contains(op.getId())) {
if (op.getName().toLowerCase().contains(searchText.toLowerCase()) && !ids.contains(op.getId())) {
filteredOperators.add(op);
ids.add(op.getId());
}
v.clear();
HTML html = new HTML("Filtered results <span class='counter'>("
+ filteredOperators.size() + " item"
HTML html = new HTML("Filtered results <span class='counter'>(" + filteredOperators.size() + " item"
+ (filteredOperators.size() == 1 ? "" : "s") + " found)</span>");
html.addStyleName("filterResultText");
v.add(html);
@ -332,19 +310,15 @@ public class OperatorsPanel extends FramedPanel {
try {
if (force || view != View.CATEGORIES) {
Log.debug("ShowCategoriesList");
List<OperatorCategoryPanel> categoryPanels = mapCategoriesPanels
.get(currentClassificationName);
List<OperatorCategoryPanel> categoryPanels = mapCategoriesPanels.get(currentClassificationName);
if (categoryPanels == null) {
categoryPanels = new ArrayList<OperatorCategoryPanel>();
if (operatorsClassification != null) {
for (OperatorCategory cat : operatorsClassification
.getOperatorCategories()) {
categoryPanels.add(new OperatorCategoryPanel(
handler, cat));
for (OperatorCategory cat : operatorsClassification.getOperatorCategories()) {
categoryPanels.add(new OperatorCategoryPanel(handler, cat));
}
}
mapCategoriesPanels.put(currentClassificationName,
categoryPanels);
mapCategoriesPanels.put(currentClassificationName, categoryPanels);
}
v.clear();
@ -363,8 +337,7 @@ public class OperatorsPanel extends FramedPanel {
if (view != View.ALL) {
v.clear();
HTML html = new HTML("All Operators <span class='counter'>("
+ operators.size() + " item"
HTML html = new HTML("All Operators <span class='counter'>(" + operators.size() + " item"
+ (operators.size() == 1 ? "" : "s") + " found)</span>");
html.addStyleName("filterResultText");
v.add(html);

View File

@ -9,14 +9,14 @@ import org.gcube.data.analysis.dataminermanagercl.shared.process.Operator;
/**
*
* @author Giancarlo Panichi
* email: <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
*
*
*/
public interface OperatorsPanelHandler {
/**
* @param operatorPanel
* @param operator
* @param operatorPanel operator panel
* @param operator operator
*/
void addOperator(OperatorPanel operatorPanel, Operator operator);

View File

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

View File

@ -5,8 +5,8 @@ import com.sencha.gxt.widget.core.client.box.AutoProgressMessageBox;
/**
*
* @author giancarlo email: <a
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
* @author Giancarlo Panichi
*
*
*/
public class StatusMonitor extends AutoProgressMessageBox {
@ -18,8 +18,8 @@ public class StatusMonitor extends AutoProgressMessageBox {
/**
*
* @param headingHtml
* @param messageHtml
* @param headingHtml head
* @param messageHtml message
*/
public StatusMonitor(SafeHtml headingHtml, SafeHtml messageHtml) {
super(headingHtml, messageHtml);
@ -28,7 +28,7 @@ public class StatusMonitor extends AutoProgressMessageBox {
/**
*
* @param headingHtml
* @param headingHtml head
*/
public StatusMonitor(SafeHtml headingHtml) {
super(headingHtml);
@ -37,8 +37,8 @@ public class StatusMonitor extends AutoProgressMessageBox {
/**
*
* @param headingHtml
* @param messageHtml
* @param headingHtml head
* @param messageHtml message
*/
public StatusMonitor(String headingHtml, String messageHtml) {
super(headingHtml, messageHtml);
@ -47,7 +47,7 @@ public class StatusMonitor extends AutoProgressMessageBox {
/**
*
* @param headingHtml
* @param headingHtml head
*/
public StatusMonitor(String headingHtml) {
super(headingHtml);

View File

@ -3,7 +3,6 @@
*/
package org.gcube.portlets.widgets.dataminermanagerwidget.client.parametersfield;
import org.gcube.data.analysis.dataminermanagercl.shared.parameters.Parameter;
import com.google.gwt.user.client.ui.Widget;
@ -11,44 +10,47 @@ import com.google.gwt.user.client.ui.Widget;
/**
*
* @author Giancarlo Panichi
* email: <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
*
*
*/
public abstract class AbstractFld {
protected Parameter parameter;
public abstract String getValue();
public abstract String getValue();
public abstract Widget getWidget();
/**
*
* @param parameter
* parameter
*/
public AbstractFld(Parameter parameter) {
this.parameter = parameter;
}
/**
* @return the operator
*/
public Parameter getParameter() {
return parameter;
}
/**
* @param operator the operator to set
*
* @param parameter parameter
*/
public void setParameter(Parameter parameter) {
this.parameter = parameter;
}
/**
*
* @return
* @return true if is valid
*/
public boolean isValid() {
return true;
}
}

View File

@ -19,8 +19,8 @@ import com.sencha.gxt.widget.core.client.form.SimpleComboBox;
/**
*
* @author Giancarlo Panichi email: <a
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
* @author Giancarlo Panichi
*
*
*/
public class BooleanFld extends AbstractFld {
@ -30,6 +30,7 @@ public class BooleanFld extends AbstractFld {
/**
* @param parameter
* parameter
*/
public BooleanFld(Parameter parameter) {
super(parameter);
@ -48,14 +49,14 @@ public class BooleanFld extends AbstractFld {
listBox.setEditable(false);
listBox.setTriggerAction(TriggerAction.ALL);
if (p.getDefaultValue() != null&& !p.getDefaultValue().isEmpty()) {
Boolean b=Boolean.valueOf(p.getDefaultValue());
if(b){
if (p.getDefaultValue() != null && !p.getDefaultValue().isEmpty()) {
Boolean b = Boolean.valueOf(p.getDefaultValue());
if (b) {
listBox.setValue("true");
} else {
listBox.setValue("false");
}
} else {
listBox.setValue("false");
}
@ -63,15 +64,12 @@ public class BooleanFld extends AbstractFld {
HtmlLayoutContainer descr;
if (p.getDescription() == null) {
descr = new HtmlLayoutContainer(
"<p style='margin-left:5px !important;'></p>");
descr = new HtmlLayoutContainer("<p style='margin-left:5px !important;'></p>");
descr.addStyleName("workflow-fieldDescription");
} else {
// listBox.setToolTip(p.getDescription());
descr = new HtmlLayoutContainer(
"<p style='margin-left:5px !important;'>"
+ p.getDescription() + "</p>");
descr = new HtmlLayoutContainer("<p style='margin-left:5px !important;'>" + p.getDescription() + "</p>");
descr.addStyleName("workflow-fieldDescription");
}
horiz.add(listBox, new BoxLayoutData(new Margins()));
@ -82,17 +80,11 @@ public class BooleanFld extends AbstractFld {
}
/**
*
*/
@Override
public String getValue() {
return listBox.getCurrentValue();
}
/**
*
*/
@Override
public Widget getWidget() {
return fieldContainer;

View File

@ -31,12 +31,11 @@ import com.sencha.gxt.widget.core.client.form.ComboBox;
/**
*
* @author Giancarlo Panichi email: <a
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
* @author Giancarlo Panichi
*
*
*/
public class ColumnFld extends AbstractFld implements
TabularFldChangeEventHandler {
public class ColumnFld extends AbstractFld implements TabularFldChangeEventHandler {
private String defaultColumn;
private ComboBox<ColumnItem> comboBox;
@ -49,14 +48,14 @@ public class ColumnFld extends AbstractFld implements
/**
* @param parameter
* parameter
*/
public ColumnFld(Parameter parameter) {
super(parameter);
ColumnParameter columnParameter = (ColumnParameter) parameter;
referredTabularParameterName = columnParameter
.getReferredTabularParameterName();
referredTabularParameterName = columnParameter.getReferredTabularParameterName();
defaultColumn = columnParameter.getDefaultColumn();
fieldContainer = new SimpleContainer();
@ -64,8 +63,7 @@ public class ColumnFld extends AbstractFld implements
horiz.setPack(BoxLayoutPack.START);
horiz.setEnableOverflow(false);
ColumnItemPropertiesCombo props = GWT
.create(ColumnItemPropertiesCombo.class);
ColumnItemPropertiesCombo props = GWT.create(ColumnItemPropertiesCombo.class);
store = new ListStore<ColumnItem>(props.id());
@ -78,15 +76,13 @@ public class ColumnFld extends AbstractFld implements
HtmlLayoutContainer descr;
if (columnParameter.getDescription() == null) {
descr = new HtmlLayoutContainer(
"<p style='margin-left:5px !important;'></p>");
descr = new HtmlLayoutContainer("<p style='margin-left:5px !important;'></p>");
descr.addStyleName("workflow-fieldDescription");
} else {
// comboBox.setToolTip(columnParameter.getDescription());
descr = new HtmlLayoutContainer(
"<p style='margin-left:5px !important;'>"
+ columnParameter.getDescription() + "</p>");
"<p style='margin-left:5px !important;'>" + columnParameter.getDescription() + "</p>");
descr.addStyleName("workflow-fieldDescription");
}
@ -105,12 +101,10 @@ public class ColumnFld extends AbstractFld implements
VerticalLayoutContainer vField = new VerticalLayoutContainer();
HtmlLayoutContainer typeDescription = new HtmlLayoutContainer(
"<div class='workflow-parameters-description'><p>Select table from parameter "
+ Format.ellipse(referredTabularParameterName, 30)
+ "</p></div>");
+ Format.ellipse(referredTabularParameterName, 30) + "</p></div>");
typeDescription.setStylePrimaryName("workflow-parameters-description");
vField.add(comboBox, new VerticalLayoutData(1, -1, new Margins(0)));
vField.add(typeDescription, new VerticalLayoutData(-1, -1, new Margins(
0)));
vField.add(typeDescription, new VerticalLayoutData(-1, -1, new Margins(0)));
vContainer.add(vField);
}
@ -119,18 +113,13 @@ public class ColumnFld extends AbstractFld implements
VerticalLayoutContainer vField = new VerticalLayoutContainer();
HtmlLayoutContainer typeDescription = new HtmlLayoutContainer(
"<div class='workflow-parameters-description'><p>Columns of Table "
+ Format.ellipse(tableItem.getName(), 30)
+ "</p></div>");
+ Format.ellipse(tableItem.getName(), 30) + "</p></div>");
typeDescription.setStylePrimaryName("workflow-parameters-description");
vField.add(comboBox, new VerticalLayoutData(1, -1, new Margins(0)));
vField.add(typeDescription, new VerticalLayoutData(-1, -1, new Margins(
0)));
vField.add(typeDescription, new VerticalLayoutData(-1, -1, new Margins(0)));
vContainer.add(vField);
}
/**
*
*/
@Override
public String getValue() {
if (tableItemSimple == null) {
@ -149,9 +138,6 @@ public class ColumnFld extends AbstractFld implements
}
}
/**
*
*/
@Override
public Widget getWidget() {
return fieldContainer;

View File

@ -39,12 +39,11 @@ import com.sencha.gxt.widget.core.client.grid.Grid;
/**
*
* @author Giancarlo Panichi email: <a
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
* @author Giancarlo Panichi
*
*
*/
public class ColumnListFld extends AbstractFld implements
TabularFldChangeEventHandler {
public class ColumnListFld extends AbstractFld implements TabularFldChangeEventHandler {
interface LabelTemplates extends XTemplates {
@XTemplate("<span title=\"{value}\">{value}</span>")
@ -63,6 +62,7 @@ public class ColumnListFld extends AbstractFld implements
/**
*
* @param parameter
* parameter
*/
public ColumnListFld(Parameter parameter) {
super(parameter);
@ -80,15 +80,13 @@ public class ColumnListFld extends AbstractFld implements
HtmlLayoutContainer descr;
if (columnListParameter.getDescription() == null) {
descr = new HtmlLayoutContainer(
"<p style='margin-left:5px !important;'></p>");
descr = new HtmlLayoutContainer("<p style='margin-left:5px !important;'></p>");
descr.addStyleName("workflow-fieldDescription");
} else {
// grid.setToolTip(columnListParameter.getDescription());
descr = new HtmlLayoutContainer(
"<p style='margin-left:5px !important;'>"
+ columnListParameter.getDescription() + "</p>");
"<p style='margin-left:5px !important;'>" + columnListParameter.getDescription() + "</p>");
descr.addStyleName("workflow-fieldDescription");
}
@ -105,15 +103,13 @@ public class ColumnListFld extends AbstractFld implements
private void createGrid() {
ColumnItemProperties props = GWT.create(ColumnItemProperties.class);
ColumnConfig<ColumnItem, String> labelCol = new ColumnConfig<ColumnItem, String>(
props.label());
ColumnConfig<ColumnItem, String> labelCol = new ColumnConfig<ColumnItem, String>(props.label());
labelCol.setCell(new AbstractCell<String>() {
@Override
public void render(Context context, String value, SafeHtmlBuilder sb) {
LabelTemplates labelTemplates = GWT
.create(LabelTemplates.class);
LabelTemplates labelTemplates = GWT.create(LabelTemplates.class);
sb.append(labelTemplates.format(value));
}
});
@ -150,13 +146,10 @@ public class ColumnListFld extends AbstractFld implements
VerticalLayoutContainer vField = new VerticalLayoutContainer();
HtmlLayoutContainer typeDescription = new HtmlLayoutContainer(
"<div class='workflow-parameters-description'><p>Select table from parameter "
+ Format.ellipse(columnListParameter
.getReferredTabularParameterName(), 30)
+ "</p></div>");
+ Format.ellipse(columnListParameter.getReferredTabularParameterName(), 30) + "</p></div>");
typeDescription.setStylePrimaryName("workflow-parameters-description");
vField.add(grid, new VerticalLayoutData(-1, -1, new Margins(0)));
vField.add(typeDescription, new VerticalLayoutData(-1, -1, new Margins(
0)));
vField.add(typeDescription, new VerticalLayoutData(-1, -1, new Margins(0)));
vContainer.add(vField);
}
@ -165,18 +158,13 @@ public class ColumnListFld extends AbstractFld implements
VerticalLayoutContainer vField = new VerticalLayoutContainer();
HtmlLayoutContainer typeDescription = new HtmlLayoutContainer(
"<div class='workflow-parameters-description'><p>Columns of Table "
+ Format.ellipse(tableItem.getName(), 30)
+ "</p></div>");
+ Format.ellipse(tableItem.getName(), 30) + "</p></div>");
typeDescription.setStylePrimaryName("workflow-parameters-description");
vField.add(grid, new VerticalLayoutData(-1, -1, new Margins(0)));
vField.add(typeDescription, new VerticalLayoutData(-1, -1, new Margins(
0)));
vField.add(typeDescription, new VerticalLayoutData(-1, -1, new Margins(0)));
vContainer.add(vField);
}
/**
*
*/
@Override
public String getValue() {
String separator = columnListParameter.getSeparator();
@ -201,17 +189,11 @@ public class ColumnListFld extends AbstractFld implements
}
/**
*
*/
@Override
public Widget getWidget() {
return fieldContainer;
}
/**
*
*/
@Override
public boolean isValid() {
return (sm.getSelection() != null && sm.getSelection().size() > 0);

View File

@ -23,8 +23,8 @@ import com.sencha.gxt.widget.core.client.form.DateField;
/**
*
* @author Giancarlo Panichi email: <a
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
* @author Giancarlo Panichi
*
*
*/
public class DateFld extends AbstractFld {
@ -35,6 +35,7 @@ public class DateFld extends AbstractFld {
/**
* @param parameter
* parameter
*/
public DateFld(Parameter parameter) {
super(parameter);
@ -57,26 +58,21 @@ public class DateFld extends AbstractFld {
HtmlLayoutContainer descr;
if (p.getDescription() == null) {
descr = new HtmlLayoutContainer(
"<p style='margin-left:5px !important;'></p>");
descr = new HtmlLayoutContainer("<p style='margin-left:5px !important;'></p>");
descr.addStyleName("workflow-fieldDescription");
} else {
// textField.setToolTip(p.getDescription());
descr = new HtmlLayoutContainer(
"<p style='margin-left:5px !important;'>"
+ p.getDescription() + "</p>");
descr = new HtmlLayoutContainer("<p style='margin-left:5px !important;'>" + p.getDescription() + "</p>");
descr.addStyleName("workflow-fieldDescription");
}
SimpleContainer vContainer = new SimpleContainer();
VerticalLayoutContainer vField = new VerticalLayoutContainer();
HtmlLayoutContainer typeDescription = new HtmlLayoutContainer(
"Date Value");
HtmlLayoutContainer typeDescription = new HtmlLayoutContainer("Date Value");
typeDescription.setStylePrimaryName("workflow-parameters-description");
vField.add(dateField, new VerticalLayoutData(-1, -1, new Margins(0)));
vField.add(typeDescription, new VerticalLayoutData(-1, -1, new Margins(
0)));
vField.add(typeDescription, new VerticalLayoutData(-1, -1, new Margins(0)));
vContainer.add(vField);
fieldContainer = new SimpleContainer();
@ -92,18 +88,12 @@ public class DateFld extends AbstractFld {
}
/**
*
*/
@Override
public String getValue() {
String dateS = dateFormat.format(dateField.getCurrentValue());
return dateS;
}
/**
*
*/
@Override
public Widget getWidget() {
return fieldContainer;

View File

@ -1,6 +1,5 @@
package org.gcube.portlets.widgets.dataminermanagerwidget.client.parametersfield;
import org.gcube.data.analysis.dataminermanagercl.shared.parameters.ObjectParameter;
import org.gcube.data.analysis.dataminermanagercl.shared.parameters.Parameter;
@ -17,21 +16,23 @@ import com.sencha.gxt.widget.core.client.form.DoubleField;
/**
*
* @author Giancarlo Panichi email: <a
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
* @author Giancarlo Panichi
*
*
*/
public class DoubleFld extends AbstractFld {
private SimpleContainer fieldContainer;
private DoubleField numberField;
/**
* @param operator
*
* @param parameter
* parameter
*/
public DoubleFld(Parameter parameter) {
super(parameter);
fieldContainer=new SimpleContainer();
fieldContainer = new SimpleContainer();
HBoxLayoutContainer horiz = new HBoxLayoutContainer();
horiz.setPack(BoxLayoutPack.START);
horiz.setEnableOverflow(false);
@ -43,7 +44,7 @@ public class DoubleFld extends AbstractFld {
if (p.getDefaultValue() != null)
numberField.setValue(Double.parseDouble(p.getDefaultValue()));
numberField.setAllowBlank(false);
HtmlLayoutContainer descr;
if (p.getDescription() == null) {
@ -51,52 +52,40 @@ public class DoubleFld extends AbstractFld {
descr.addStyleName("workflow-fieldDescription");
} else {
//numberField.setToolTip(p.getDescription());
descr = new HtmlLayoutContainer("<p style='margin-left:5px !important;'>"
+ p.getDescription() + "</p>");
// numberField.setToolTip(p.getDescription());
descr = new HtmlLayoutContainer("<p style='margin-left:5px !important;'>" + p.getDescription() + "</p>");
descr.addStyleName("workflow-fieldDescription");
}
SimpleContainer vContainer=new SimpleContainer();
SimpleContainer vContainer = new SimpleContainer();
VerticalLayoutContainer vField = new VerticalLayoutContainer();
HtmlLayoutContainer typeDescription = new HtmlLayoutContainer(
"Double Value");
HtmlLayoutContainer typeDescription = new HtmlLayoutContainer("Double Value");
typeDescription.setStylePrimaryName("workflow-parameters-description");
vField.add(numberField, new VerticalLayoutData(-1,-1,new Margins(0)));
vField.add(typeDescription, new VerticalLayoutData(-1,-1,new Margins(0)));
vField.add(numberField, new VerticalLayoutData(-1, -1, new Margins(0)));
vField.add(typeDescription, new VerticalLayoutData(-1, -1, new Margins(0)));
vContainer.add(vField);
horiz.add(vContainer, new BoxLayoutData(new Margins()));
horiz.add(descr, new BoxLayoutData(new Margins()));
fieldContainer.add(horiz);
fieldContainer.forceLayout();
}
/**
*
*/
@Override
public String getValue() {
return numberField.getCurrentValue().toString();
}
/**
*
*/
@Override
public Widget getWidget() {
return fieldContainer;
}
/**
*
*/
@Override
public boolean isValid() {
return numberField.isValid();
}
}

View File

@ -3,7 +3,6 @@
*/
package org.gcube.portlets.widgets.dataminermanagerwidget.client.parametersfield;
import org.gcube.data.analysis.dataminermanagercl.shared.parameters.EnumParameter;
import org.gcube.data.analysis.dataminermanagercl.shared.parameters.Parameter;
@ -20,8 +19,8 @@ import com.sencha.gxt.widget.core.client.form.SimpleComboBox;
/**
*
* @author Giancarlo Panichi email: <a
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
* @author Giancarlo Panichi
*
*
*/
public class EnumFld extends AbstractFld {
@ -31,6 +30,7 @@ public class EnumFld extends AbstractFld {
/**
* @param parameter
* parameter
*/
public EnumFld(Parameter parameter) {
super(parameter);
@ -58,9 +58,8 @@ public class EnumFld extends AbstractFld {
descr.addStyleName("workflow-fieldDescription");
} else {
//listBox.setToolTip(p.getDescription());
descr = new HtmlLayoutContainer("<p style='margin-left:5px !important;'>"
+ p.getDescription() + "</p>");
// listBox.setToolTip(p.getDescription());
descr = new HtmlLayoutContainer("<p style='margin-left:5px !important;'>" + p.getDescription() + "</p>");
descr.addStyleName("workflow-fieldDescription");
}
horiz.add(listBox, new BoxLayoutData(new Margins()));
@ -71,17 +70,11 @@ public class EnumFld extends AbstractFld {
}
/**
*
*/
@Override
public String getValue() {
return listBox.getCurrentValue();
}
/**
*
*/
@Override
public Widget getWidget() {
return fieldContainer;
@ -91,5 +84,5 @@ public class EnumFld extends AbstractFld {
public boolean isValid() {
return listBox.isValid();
}
}

View File

@ -43,8 +43,8 @@ import com.sencha.gxt.widget.core.client.form.TextField;
/**
*
* @author Giancarlo Panichi email: <a
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
* @author Giancarlo Panichi
*
*
*/
public class FileFld extends AbstractFld {
@ -52,7 +52,7 @@ public class FileFld extends AbstractFld {
private VerticalLayoutContainer vp;
private SimpleContainer fieldContainer;
private HBoxLayoutContainer horiz;
// FileSelector fileSelector;
private WorkspaceExplorerSelectDialog wselectDialog;
private TextButton selectButton;
@ -67,10 +67,9 @@ public class FileFld extends AbstractFld {
private FileParameter fileParameter;
private boolean created = false;
/**
* @param parameter
* parameter
*/
public FileFld(Parameter parameter) {
super(parameter);
@ -84,7 +83,7 @@ public class FileFld extends AbstractFld {
retrieveTabularResourceInfo();
}
private void bind() {
EventBusProvider.INSTANCE.addHandler(TabularResourceInfoEvent.TYPE,
new TabularResourceInfoEvent.TabularResourceInfoEventHandler() {
@ -107,8 +106,8 @@ public class FileFld extends AbstractFld {
TabularResourceInfoRequestEvent event = new TabularResourceInfoRequestEvent();
EventBusProvider.INSTANCE.fireEvent(event);
}
private void create(){
private void create() {
SimpleContainer tabContainer = new SimpleContainer();
vp = new VerticalLayoutContainer();
init();
@ -126,8 +125,8 @@ public class FileFld extends AbstractFld {
descr.addStyleName("workflow-fieldDescription");
} else {
descr = new HtmlLayoutContainer("<p style='margin-left:5px !important;'>"
+ fileParameter.getDescription() + "</p>");
descr = new HtmlLayoutContainer(
"<p style='margin-left:5px !important;'>" + fileParameter.getDescription() + "</p>");
descr.addStyleName("workflow-fieldDescription");
}
@ -165,8 +164,7 @@ public class FileFld extends AbstractFld {
@Override
public void onFailed(Throwable throwable) {
Log.error("Error in create project: "
+ throwable.getLocalizedMessage());
Log.error("Error in create project: " + throwable.getLocalizedMessage());
UtilsGXT3.alert("Error", throwable.getLocalizedMessage());
throwable.printStackTrace();
}
@ -185,7 +183,6 @@ public class FileFld extends AbstractFld {
wselectDialog.addWorkspaceExplorerSelectNotificationListener(handler);
wselectDialog.setZIndex(XDOM.getTopZIndex());
selectTRButton = new TextButton("Use Tabular Resource");
selectTRButton.addSelectHandler(new SelectEvent.SelectHandler() {
@ -194,8 +191,7 @@ public class FileFld extends AbstractFld {
useTabularResource();
}
});
selectTRButton.setIcon(DataMinerManagerPanel.resources
.tabularResource());
selectTRButton.setIcon(DataMinerManagerPanel.resources.tabularResource());
selectTRButton.setToolTip("Use Tabular Resource");
selectTRButton2 = new TextButton("");
@ -207,12 +203,9 @@ public class FileFld extends AbstractFld {
}
});
selectTRButton2.setIcon(DataMinerManagerPanel.resources
.tabularResource());
selectTRButton2.setIcon(DataMinerManagerPanel.resources.tabularResource());
selectTRButton2.setToolTip("Use Tabular Resource");
selectButton = new TextButton("Select File");
selectButton.setIcon(DataMinerManagerPanel.resources.folderExplore());
selectButton.addSelectHandler(new SelectEvent.SelectHandler() {
@ -260,82 +253,69 @@ public class FileFld extends AbstractFld {
downloadButton.setToolTip("Download File");
}
private void useTabularResource() {
Log.debug("TabularResourceData: " + tabularResourceData);
selectedFileItem = new ItemDescription(
tabularResourceData.getTabularResourceId(),
tabularResourceData.getName(),
"","",
tabularResourceData.getType());
selectedFileItem.setPublicLink(tabularResourceData.getTabularResourceId());
selectedFileItem = new ItemDescription(tabularResourceData.getTabularResourceId(),
tabularResourceData.getName(), "", "", tabularResourceData.getType());
selectedFileItem.setPublicLink(tabularResourceData.getTabularResourceId());
showFieldWithTRSelection();
}
private void retrieveFileInformation(final Item item) {
Log.debug("Retrieved: " + item);
final ItemDescription itemDescription = new ItemDescription(
item.getId(), item.getName(), item.getOwner(), item.getPath(),
item.getType().name());
final ItemDescription itemDescription = new ItemDescription(item.getId(), item.getName(), item.getOwner(),
item.getPath(), item.getType().name());
DataMinerPortletServiceAsync.INSTANCE.getPublicLink(itemDescription,
new AsyncCallback<String>() {
DataMinerPortletServiceAsync.INSTANCE.getPublicLink(itemDescription, new AsyncCallback<String>() {
@Override
public void onFailure(Throwable caught) {
Log.error("Error in retrieveFileInformation: "
+ caught.getMessage());
if (caught instanceof SessionExpiredServiceException) {
UtilsGXT3.alert("Error", "Expired Session");
@Override
public void onFailure(Throwable caught) {
Log.error("Error in retrieveFileInformation: " + caught.getMessage());
if (caught instanceof SessionExpiredServiceException) {
UtilsGXT3.alert("Error", "Expired Session");
} else {
UtilsGXT3.alert("Error",
"Error retrieving file informations: "
+ caught.getLocalizedMessage());
}
} else {
UtilsGXT3.alert("Error", "Error retrieving file informations: " + caught.getLocalizedMessage());
}
}
}
@Override
public void onSuccess(String result) {
itemDescription.setPublicLink(result);
selectedFileItem = itemDescription;
Log.debug("SelectedFileItem: " + selectedFileItem);
showFieldWithFileSelection();
@Override
public void onSuccess(String result) {
itemDescription.setPublicLink(result);
selectedFileItem = itemDescription;
Log.debug("SelectedFileItem: " + selectedFileItem);
showFieldWithFileSelection();
}
});
}
});
}
private void downloadFile() {
if (selectedFileItem != null) {
DataMinerPortletServiceAsync.INSTANCE.getPublicLink(
selectedFileItem, new AsyncCallback<String>() {
DataMinerPortletServiceAsync.INSTANCE.getPublicLink(selectedFileItem, new AsyncCallback<String>() {
@Override
public void onFailure(Throwable caught) {
if (caught instanceof SessionExpiredServiceException) {
EventBusProvider.INSTANCE
.fireEvent(new SessionExpiredEvent());
} else {
Log.error("Error downloading file: "
+ caught.getLocalizedMessage());
UtilsGXT3.alert("Error",
caught.getLocalizedMessage());
}
caught.printStackTrace();
@Override
public void onFailure(Throwable caught) {
if (caught instanceof SessionExpiredServiceException) {
EventBusProvider.INSTANCE.fireEvent(new SessionExpiredEvent());
} else {
Log.error("Error downloading file: " + caught.getLocalizedMessage());
UtilsGXT3.alert("Error", caught.getLocalizedMessage());
}
caught.printStackTrace();
}
}
@Override
public void onSuccess(String link) {
Log.debug("Retrieved link: " + link);
Window.open(link, selectedFileItem.getName(), "");
}
@Override
public void onSuccess(String link) {
Log.debug("Retrieved link: " + link);
Window.open(link, selectedFileItem.getName(), "");
}
});
});
} else {
UtilsGXT3.info("Attention", "Select a file!");
@ -343,7 +323,6 @@ public class FileFld extends AbstractFld {
}
private void showNoSelectionField() {
vp.clear();
vp.add(selectTRButton);
@ -351,8 +330,7 @@ public class FileFld extends AbstractFld {
vp.forceLayout();
fieldContainer.forceLayout();
}
private void showFieldWithFileSelection() {
String fileName = selectedFileItem.getName();
@ -376,7 +354,7 @@ public class FileFld extends AbstractFld {
fieldContainer.forceLayout();
}
private void showFieldWithTRSelection() {
String fileName = selectedFileItem.getName();
@ -401,10 +379,6 @@ public class FileFld extends AbstractFld {
}
/**
*
*/
@Override
public boolean isValid() {
return (selectedFileItem != null);
@ -417,8 +391,7 @@ public class FileFld extends AbstractFld {
@Override
public String getValue() {
return (selectedFileItem == null) ? null : selectedFileItem
.getPublicLink();
return (selectedFileItem == null) ? null : selectedFileItem.getPublicLink();
}
}

View File

@ -1,6 +1,5 @@
package org.gcube.portlets.widgets.dataminermanagerwidget.client.parametersfield;
import org.gcube.data.analysis.dataminermanagercl.shared.parameters.ObjectParameter;
import org.gcube.data.analysis.dataminermanagercl.shared.parameters.Parameter;
@ -17,8 +16,8 @@ import com.sencha.gxt.widget.core.client.form.FloatField;
/**
*
* @author Giancarlo Panichi email: <a
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
* @author Giancarlo Panichi
*
*
*/
public class FloatFld extends AbstractFld {
@ -27,7 +26,9 @@ public class FloatFld extends AbstractFld {
private FloatField numberField;
/**
* @param operator
*
* @param parameter
* parameter
*/
public FloatFld(Parameter parameter) {
super(parameter);
@ -51,20 +52,17 @@ public class FloatFld extends AbstractFld {
descr.addStyleName("workflow-fieldDescription");
} else {
//numberField.setToolTip(p.getDescription());
descr = new HtmlLayoutContainer("<p style='margin-left:5px !important;'>"
+ p.getDescription() + "</p>");
// numberField.setToolTip(p.getDescription());
descr = new HtmlLayoutContainer("<p style='margin-left:5px !important;'>" + p.getDescription() + "</p>");
descr.addStyleName("workflow-fieldDescription");
}
SimpleContainer vContainer = new SimpleContainer();
VerticalLayoutContainer vField = new VerticalLayoutContainer();
HtmlLayoutContainer typeDescription = new HtmlLayoutContainer(
"Float Value");
HtmlLayoutContainer typeDescription = new HtmlLayoutContainer("Float Value");
typeDescription.setStylePrimaryName("workflow-parameters-description");
vField.add(numberField, new VerticalLayoutData(-1, -1, new Margins(0)));
vField.add(typeDescription, new VerticalLayoutData(-1, -1, new Margins(
0)));
vField.add(typeDescription, new VerticalLayoutData(-1, -1, new Margins(0)));
vContainer.add(vField);
horiz.add(vContainer, new BoxLayoutData(new Margins()));
@ -75,18 +73,12 @@ public class FloatFld extends AbstractFld {
}
/**
*
*/
@Override
public String getValue() {
Float f = numberField.getCurrentValue();
return f.toString();
}
/**
*
*/
@Override
public Widget getWidget() {
return fieldContainer;

View File

@ -1,6 +1,5 @@
package org.gcube.portlets.widgets.dataminermanagerwidget.client.parametersfield;
import org.gcube.data.analysis.dataminermanagercl.shared.parameters.ObjectParameter;
import org.gcube.data.analysis.dataminermanagercl.shared.parameters.Parameter;
@ -17,8 +16,8 @@ import com.sencha.gxt.widget.core.client.form.IntegerField;
/**
*
* @author Giancarlo Panichi email: <a
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
* @author Giancarlo Panichi
*
*
*/
public class IntFld extends AbstractFld {
@ -27,7 +26,9 @@ public class IntFld extends AbstractFld {
private IntegerField numberField;
/**
* @param operator
*
* @param parameter
* parameter
*/
public IntFld(Parameter parameter) {
super(parameter);
@ -51,21 +52,19 @@ public class IntFld extends AbstractFld {
descr.addStyleName("workflow-fieldDescription");
} else {
//numberField.setToolTip(p.getDescription());
descr = new HtmlLayoutContainer("<p style='margin-left:5px !important;'>"
+ p.getDescription() + "</p>");
// numberField.setToolTip(p.getDescription());
descr = new HtmlLayoutContainer("<p style='margin-left:5px !important;'>" + p.getDescription() + "</p>");
descr.addStyleName("workflow-fieldDescription");
}
SimpleContainer vContainer=new SimpleContainer();
SimpleContainer vContainer = new SimpleContainer();
VerticalLayoutContainer vField = new VerticalLayoutContainer();
HtmlLayoutContainer typeDescription = new HtmlLayoutContainer(
"Integer Value");
HtmlLayoutContainer typeDescription = new HtmlLayoutContainer("Integer Value");
typeDescription.setStylePrimaryName("workflow-parameters-description");
vField.add(numberField, new VerticalLayoutData(-1,-1,new Margins(0)));
vField.add(typeDescription, new VerticalLayoutData(-1,-1,new Margins(0)));
vField.add(numberField, new VerticalLayoutData(-1, -1, new Margins(0)));
vField.add(typeDescription, new VerticalLayoutData(-1, -1, new Margins(0)));
vContainer.add(vField);
horiz.add(vContainer, new BoxLayoutData(new Margins()));
horiz.add(descr, new BoxLayoutData(new Margins()));
@ -74,24 +73,17 @@ public class IntFld extends AbstractFld {
}
/**
*
*/
@Override
public String getValue() {
Integer i = numberField.getCurrentValue();
return i.toString();
}
/**
*
*/
@Override
public Widget getWidget() {
return fieldContainer;
}
@Override
public boolean isValid() {
return numberField.isValid();

View File

@ -28,7 +28,7 @@ import com.sencha.gxt.widget.core.client.form.IntegerField;
/**
*
* @author Giancarlo Panichi
* email: <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
*
*
*/
public class ListIntFld extends AbstractFld {
@ -42,23 +42,25 @@ public class ListIntFld extends AbstractFld {
private HBoxLayoutContainer horiz;
/**
*
* @param parameter
* parameter
*/
public ListIntFld(Parameter parameter) {
super(parameter);
this.listParameter = (ListParameter) parameter;
listContainer = new SimpleContainer();
vp = new VerticalLayoutContainer();
items = new ArrayList<Item>();
addField(null);
listContainer.add(vp, new MarginData(new Margins()));
fieldContainer = new SimpleContainer();
horiz = new HBoxLayoutContainer();
horiz.setPack(BoxLayoutPack.START);
horiz.setEnableOverflow(false);
HtmlLayoutContainer descr;
if (listParameter.getDescription() == null) {
@ -66,9 +68,9 @@ public class ListIntFld extends AbstractFld {
descr.addStyleName("workflow-fieldDescription");
} else {
//listContainer.setToolTip(listParameter.getDescription());
descr = new HtmlLayoutContainer("<p style='margin-left:5px !important;'>"
+ listParameter.getDescription() + "</p>");
// listContainer.setToolTip(listParameter.getDescription());
descr = new HtmlLayoutContainer(
"<p style='margin-left:5px !important;'>" + listParameter.getDescription() + "</p>");
descr.addStyleName("workflow-fieldDescription");
}
@ -77,14 +79,13 @@ public class ListIntFld extends AbstractFld {
fieldContainer.add(horiz);
fieldContainer.forceLayout();
}
private void addField(Item upperItem) {
ObjectParameter objPar = new ObjectParameter(listParameter.getName(),
listParameter.getDescription(), listParameter.getType(), null);
ObjectParameter objPar = new ObjectParameter(listParameter.getName(), listParameter.getDescription(),
listParameter.getType(), null);
if (upperItem == null) {
Item item = new Item(objPar, true);
@ -107,25 +108,19 @@ public class ListIntFld extends AbstractFld {
}
/**
* @param item
*/
private void removeField(Item item) {
items.remove(item);
vp.remove(item);
if (items.size() == 1) {
items.get(0).hideCancelButton();
}
simpleContainer.forceLayout();
}
/**
*
*/
@Override
public String getValue() {
String separator = listParameter.getSeparator();
@ -141,17 +136,11 @@ public class ListIntFld extends AbstractFld {
return value;
}
/**
*
*/
@Override
public Widget getWidget() {
return fieldContainer;
}
/**
*
*/
@Override
public boolean isValid() {
for (Item item : items)
@ -167,15 +156,12 @@ public class ListIntFld extends AbstractFld {
private TextButton addBtn;
private TextButton removeBtn;
/**
* @param objPar
*/
public Item(ObjectParameter objectParameter, boolean first) {
super();
field = new IntegerField();
field.setAllowBlank(false);
addBtn = new TextButton("");
addBtn.setIcon(DataMinerManagerPanel.resources.add());

View File

@ -22,8 +22,8 @@ import com.sencha.gxt.widget.core.client.container.VerticalLayoutContainer;
/**
*
* @author Giancarlo Panichi email: <a
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
* @author Giancarlo Panichi
*
*
*/
public class ListStringFld extends AbstractFld {
@ -38,6 +38,7 @@ public class ListStringFld extends AbstractFld {
/**
*
* @param parameter
* parameter
*/
public ListStringFld(Parameter parameter) {
super(parameter);
@ -61,9 +62,9 @@ public class ListStringFld extends AbstractFld {
descr.addStyleName("workflow-fieldDescription");
} else {
/*listContainer.setToolTip(listParameter.getDescription());*/
descr = new HtmlLayoutContainer("<p style='margin-left:5px !important;'>"
+ listParameter.getDescription() + "</p>");
/* listContainer.setToolTip(listParameter.getDescription()); */
descr = new HtmlLayoutContainer(
"<p style='margin-left:5px !important;'>" + listParameter.getDescription() + "</p>");
descr.addStyleName("workflow-fieldDescription");
}
@ -76,8 +77,8 @@ public class ListStringFld extends AbstractFld {
protected void addField(StringItem upperItem) {
ObjectParameter objPar = new ObjectParameter(listParameter.getName(),
listParameter.getDescription(), listParameter.getType(), null);
ObjectParameter objPar = new ObjectParameter(listParameter.getName(), listParameter.getDescription(),
listParameter.getType(), null);
if (upperItem == null) {
StringItem item = new StringItem(this, objPar, true);
@ -91,30 +92,27 @@ public class ListStringFld extends AbstractFld {
upperItem.forceLayout();
StringItem item = new StringItem(this, objPar, false);
items.add(pos + 1, item);
vp.insert(item, pos + 1);//don't use new VerticalLayoutData(1, -1,new Margins(0))
vp.insert(item, pos + 1);// don't use new VerticalLayoutData(1,
// -1,new Margins(0))
} else {
upperItem.forceLayout();
StringItem item = new StringItem(this, objPar, true);
items.add(item);
vp.add(item);//don't use new VerticalLayoutData(-1, -1, new Margins(0))
vp.add(item);// don't use new VerticalLayoutData(-1, -1, new
// Margins(0))
}
}
forceLayout();
}
protected void forceLayout(){
protected void forceLayout() {
vp.forceLayout();
horiz.forceLayout();
fieldContainer.forceLayout();
}
/**
* @param item
*/
protected void removeField(StringItem item) {
items.remove(item);
@ -124,13 +122,10 @@ public class ListStringFld extends AbstractFld {
items.get(0).hideCancelButton();
items.get(0).forceLayout();
}
forceLayout();
}
/**
*
*/
@Override
public String getValue() {
String separator = listParameter.getSeparator();
@ -146,17 +141,11 @@ public class ListStringFld extends AbstractFld {
return value;
}
/**
*
*/
@Override
public Widget getWidget() {
return fieldContainer;
}
/**
*
*/
@Override
public boolean isValid() {
boolean valid = false;
@ -168,6 +157,4 @@ public class ListStringFld extends AbstractFld {
return valid;
}
}

View File

@ -3,7 +3,6 @@
*/
package org.gcube.portlets.widgets.dataminermanagerwidget.client.parametersfield;
import org.gcube.data.analysis.dataminermanagercl.shared.parameters.ListParameter;
import org.gcube.data.analysis.dataminermanagercl.shared.parameters.ObjectParameter;
import org.gcube.data.analysis.dataminermanagercl.shared.parameters.Parameter;
@ -13,8 +12,8 @@ import com.sencha.gxt.widget.core.client.form.FieldLabel;
/**
*
* @author Giancarlo Panichi email: <a
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
* @author Giancarlo Panichi
*
*
*/
public class OperatorFieldWidget {
@ -24,46 +23,49 @@ public class OperatorFieldWidget {
private FieldLabel parameterLabel;
/**
*
* @param parameter
* parameter
*/
public OperatorFieldWidget(Parameter p) {
public OperatorFieldWidget(Parameter parameter) {
super();
this.parameter = p;
this.parameter = parameter;
try {
if (p.getTypology() != null) {
switch (p.getTypology()) {
if (parameter.getTypology() != null) {
switch (parameter.getTypology()) {
case COLUMN:
field = new ColumnFld(p);
field = new ColumnFld(parameter);
break;
case COLUMN_LIST:
field = new ColumnListFld(p);
field = new ColumnListFld(parameter);
break;
case ENUM:
field = new EnumFld(p);
field = new EnumFld(parameter);
break;
case FILE:
field = new FileFld(p);
field = new FileFld(parameter);
break;
case LIST:
field = createListField(p);
field = createListField(parameter);
break;
case OBJECT:
field = createObjectField(p);
field = createObjectField(parameter);
break;
case TABULAR:
field = new TabularFld(p);
field = new TabularFld(parameter);
break;
case TABULAR_LIST:
field = new TabularListFld(p);
field = new TabularListFld(parameter);
break;
case WKT:
field = new WKTFld(p);
field = new WKTFld(parameter);
break;
case DATE:
field = new DateFld(p);
break;
field = new DateFld(parameter);
break;
case TIME:
field = new TimeFld(p);
field = new TimeFld(parameter);
break;
default:
break;
@ -72,12 +74,12 @@ public class OperatorFieldWidget {
}
if (field == null) {
parameterLabel = new FieldLabel(null, p.getName());
parameterLabel = new FieldLabel(null, parameter.getName());
parameterLabel.setLabelWidth(200);
parameterLabel.setLabelWordWrap(true);
} else {
parameterLabel = new FieldLabel(field.getWidget(), p.getName());
parameterLabel = new FieldLabel(field.getWidget(), parameter.getName());
parameterLabel.setLabelWidth(200);
parameterLabel.setLabelWordWrap(true);
}
@ -107,10 +109,6 @@ public class OperatorFieldWidget {
return parameterLabel;
}
/**
* @param p
* @return
*/
private AbstractFld createObjectField(Parameter p) {
ObjectParameter objectParameter = (ObjectParameter) p;
String type = objectParameter.getType();
@ -128,18 +126,15 @@ public class OperatorFieldWidget {
return null;
}
/**
*
*/
private AbstractFld createListField(Parameter p) {
ListParameter listParameter = (ListParameter) p;
String type = listParameter.getType();
if (type.contentEquals(String.class.getName())
|| type.contentEquals("STRING")) { // TODO REMOVE "STRING"
if (type.contentEquals(String.class.getName()) || type.contentEquals("STRING")) { // TODO
// REMOVE
// "STRING"
return new ListStringFld(listParameter);
} else if (type.contentEquals(Integer.class.getName())
|| type.contentEquals("NUMBER")) {
} else if (type.contentEquals(Integer.class.getName()) || type.contentEquals("NUMBER")) {
return new ListIntFld(listParameter);
}
// } else if (type.contentEquals(Boolean.class.getName())) {
@ -153,9 +148,6 @@ public class OperatorFieldWidget {
return null;
}
/**
*
*/
public void updateOperatorParameterValue() {
this.parameter.setValue(this.getFieldValue());
}

View File

@ -3,7 +3,6 @@
*/
package org.gcube.portlets.widgets.dataminermanagerwidget.client.parametersfield;
import org.gcube.data.analysis.dataminermanagercl.shared.parameters.ObjectParameter;
import org.gcube.data.analysis.dataminermanagercl.shared.parameters.Parameter;
@ -20,8 +19,8 @@ import com.sencha.gxt.widget.core.client.form.TextField;
/**
*
* @author Giancarlo Panichi email: <a
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
* @author Giancarlo Panichi
*
*
*/
public class StringFld extends AbstractFld {
@ -31,12 +30,13 @@ public class StringFld extends AbstractFld {
/**
* @param parameter
* parameter
*/
public StringFld(Parameter parameter) {
super(parameter);
ObjectParameter p = (ObjectParameter) parameter;
textField = new TextField();
textField.setValue(p.getDefaultValue());
@ -46,49 +46,41 @@ public class StringFld extends AbstractFld {
HtmlLayoutContainer descr;
if (p.getDescription() == null) {
descr=new HtmlLayoutContainer("<p style='margin-left:5px !important;'></p>");
descr = new HtmlLayoutContainer("<p style='margin-left:5px !important;'></p>");
descr.addStyleName("workflow-fieldDescription");
} else {
//textField.setToolTip(p.getDescription());
descr=new HtmlLayoutContainer("<p style='margin-left:5px !important;'>"+p.getDescription()+"</p>");
// textField.setToolTip(p.getDescription());
descr = new HtmlLayoutContainer("<p style='margin-left:5px !important;'>" + p.getDescription() + "</p>");
descr.addStyleName("workflow-fieldDescription");
}
SimpleContainer vContainer=new SimpleContainer();
SimpleContainer vContainer = new SimpleContainer();
VerticalLayoutContainer vField = new VerticalLayoutContainer();
HtmlLayoutContainer typeDescription = new HtmlLayoutContainer(
"String Value");
HtmlLayoutContainer typeDescription = new HtmlLayoutContainer("String Value");
typeDescription.setStylePrimaryName("workflow-parameters-description");
vField.add(textField, new VerticalLayoutData(-1,-1,new Margins(0)));
vField.add(typeDescription, new VerticalLayoutData(-1,-1,new Margins(0)));
vField.add(textField, new VerticalLayoutData(-1, -1, new Margins(0)));
vField.add(typeDescription, new VerticalLayoutData(-1, -1, new Margins(0)));
vContainer.add(vField);
fieldContainer = new SimpleContainer();
HBoxLayoutContainer horiz = new HBoxLayoutContainer();
horiz.setPack(BoxLayoutPack.START);
horiz.setEnableOverflow(false);
horiz.add(vContainer, new BoxLayoutData(new Margins()));
horiz.add(descr, new BoxLayoutData(new Margins()));
fieldContainer.add(horiz);
fieldContainer.forceLayout();
}
/**
*
*/
@Override
public String getValue() {
return textField.getValue();
}
/**
*
*/
@Override
public Widget getWidget() {
return fieldContainer;
@ -98,5 +90,5 @@ public class StringFld extends AbstractFld {
public boolean isValid() {
return textField.isValid();
}
}

View File

@ -12,7 +12,7 @@ import com.sencha.gxt.widget.core.client.form.TextField;
/**
*
* @author Giancarlo Panichi
* email: <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
*
*
*/
public class StringItem extends HBoxLayoutContainer {
@ -22,7 +22,10 @@ public class StringItem extends HBoxLayoutContainer {
private TextButton removeBtn;
/**
* @param objPar
*
* @param parent parent
* @param objectParameter object parameter
* @param first true if first
*/
public StringItem(ListStringFld parent, ObjectParameter objectParameter, boolean first) {
super();

View File

@ -33,8 +33,8 @@ import com.sencha.gxt.widget.core.client.form.TextField;
/**
*
* @author Giancarlo Panichi email: <a
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
* @author Giancarlo Panichi
*
*
*/
public class TabItem extends HBoxLayoutContainer {
@ -60,12 +60,14 @@ public class TabItem extends HBoxLayoutContainer {
/**
*
* @param tabularListFld
* @param parent
* parent
* @param tabularParameter
* tabular parameter
* @param first
* true if is first
*/
public TabItem(TabularListFld parent, TabularParameter tabularParameter,
boolean first) {
public TabItem(TabularListFld parent, TabularParameter tabularParameter, boolean first) {
super();
this.parent = parent;
this.first = first;
@ -117,8 +119,7 @@ public class TabItem extends HBoxLayoutContainer {
useTabularResource();
}
});
selectTRButton.setIcon(DataMinerManagerPanel.resources
.tabularResource());
selectTRButton.setIcon(DataMinerManagerPanel.resources.tabularResource());
selectTRButton.setToolTip("Use Tabular Resource");
selectTRButton2 = new TextButton("");
@ -129,11 +130,9 @@ public class TabItem extends HBoxLayoutContainer {
useTabularResource();
}
});
selectTRButton2.setIcon(DataMinerManagerPanel.resources
.tabularResource());
selectTRButton2.setIcon(DataMinerManagerPanel.resources.tabularResource());
selectTRButton2.setToolTip("Use Tabular Resource");
selectButton = new TextButton("Select Data Set");
selectButton.addSelectHandler(new SelectEvent.SelectHandler() {
@ -156,7 +155,7 @@ public class TabItem extends HBoxLayoutContainer {
wselectDialog.show();
}
});
downloadButton = new TextButton("");
downloadButton.setIcon(DataMinerManagerPanel.resources.download());
downloadButton.addSelectHandler(new SelectEvent.SelectHandler() {
@ -167,7 +166,6 @@ public class TabItem extends HBoxLayoutContainer {
}
});
downloadButton.setToolTip("Download Data Set");
addBtn = new TextButton("");
addBtn.setIcon(DataMinerManagerPanel.resources.add());
@ -191,7 +189,6 @@ public class TabItem extends HBoxLayoutContainer {
}
});
setPack(BoxLayoutPack.START);
setEnableOverflow(false);
@ -209,7 +206,7 @@ public class TabItem extends HBoxLayoutContainer {
selectButton2.setVisible(false);
downloadButton.setVisible(false);
removeBtn.setVisible(!first);
forceLayout();
}
@ -228,7 +225,8 @@ public class TabItem extends HBoxLayoutContainer {
* "multipart/x-zip"
*/
// List<String> allowedMimeTypes =
// Arrays.asList("text/csv","text/plain","text/plain; charset=ISO-8859-1");
// Arrays.asList("text/csv","text/plain","text/plain;
// charset=ISO-8859-1");
/**
* "zip"
@ -260,8 +258,7 @@ public class TabItem extends HBoxLayoutContainer {
@Override
public void onFailed(Throwable throwable) {
Log.error("Error in create project: "
+ throwable.getLocalizedMessage());
Log.error("Error in create project: " + throwable.getLocalizedMessage());
UtilsGXT3.alert("Error", throwable.getLocalizedMessage());
throwable.printStackTrace();
}
@ -284,66 +281,56 @@ public class TabItem extends HBoxLayoutContainer {
private void retrieveTableInformation(Item item) {
Log.debug("Retrieved: " + item);
itemDescriptionSelected = new ItemDescription(item.getId(),
item.getName(), item.getOwner(), item.getPath(), item.getType()
.name());
itemDescriptionSelected = new ItemDescription(item.getId(), item.getName(), item.getOwner(), item.getPath(),
item.getType().name());
DataMinerPortletServiceAsync.INSTANCE.retrieveTableInformation(item,
new AsyncCallback<TableItemSimple>() {
DataMinerPortletServiceAsync.INSTANCE.retrieveTableInformation(item, new AsyncCallback<TableItemSimple>() {
@Override
public void onFailure(Throwable caught) {
Log.error("Error in retrieveTableInformation "
+ caught.getMessage());
if (caught instanceof SessionExpiredServiceException) {
UtilsGXT3.alert("Error", "Expired Session");
@Override
public void onFailure(Throwable caught) {
Log.error("Error in retrieveTableInformation " + caught.getMessage());
if (caught instanceof SessionExpiredServiceException) {
UtilsGXT3.alert("Error", "Expired Session");
} else {
UtilsGXT3.alert("Error",
"Error retrieving table information: "
+ caught.getLocalizedMessage());
}
} else {
UtilsGXT3.alert("Error", "Error retrieving table information: " + caught.getLocalizedMessage());
}
}
}
@Override
public void onSuccess(TableItemSimple result) {
Log.debug("Retrieved: " + result);
selectedTableItem = result;
showFieldWithFileSelection();
@Override
public void onSuccess(TableItemSimple result) {
Log.debug("Retrieved: " + result);
selectedTableItem = result;
showFieldWithFileSelection();
}
});
}
});
}
private void downloadFile() {
if (itemDescriptionSelected != null) {
DataMinerPortletServiceAsync.INSTANCE.getPublicLink(
itemDescriptionSelected, new AsyncCallback<String>() {
DataMinerPortletServiceAsync.INSTANCE.getPublicLink(itemDescriptionSelected, new AsyncCallback<String>() {
@Override
public void onFailure(Throwable caught) {
if (caught instanceof SessionExpiredServiceException) {
EventBusProvider.INSTANCE
.fireEvent(new SessionExpiredEvent());
} else {
Log.error("Error downloading table: "
+ caught.getLocalizedMessage());
UtilsGXT3.alert("Error",
caught.getLocalizedMessage());
}
caught.printStackTrace();
@Override
public void onFailure(Throwable caught) {
if (caught instanceof SessionExpiredServiceException) {
EventBusProvider.INSTANCE.fireEvent(new SessionExpiredEvent());
} else {
Log.error("Error downloading table: " + caught.getLocalizedMessage());
UtilsGXT3.alert("Error", caught.getLocalizedMessage());
}
caught.printStackTrace();
}
}
@Override
public void onSuccess(String link) {
Log.debug("Retrieved link: " + link);
Window.open(link,
itemDescriptionSelected.getName(), "");
}
@Override
public void onSuccess(String link) {
Log.debug("Retrieved link: " + link);
Window.open(link, itemDescriptionSelected.getName(), "");
}
});
});
} else {
UtilsGXT3.info("Attention", "Select a Table!");
@ -353,18 +340,12 @@ public class TabItem extends HBoxLayoutContainer {
private void useTabularResource() {
Log.debug("TabularResourceData: " + tabularResourceData);
selectedTableItem = new TableItemSimple(
tabularResourceData.getTabularResourceId(),
tabularResourceData.getName(),
tabularResourceData.getDescription(),
tabularResourceData.getType());
selectedTableItem = new TableItemSimple(tabularResourceData.getTabularResourceId(),
tabularResourceData.getName(), tabularResourceData.getDescription(), tabularResourceData.getType());
selectedTableItem.setColumns(tabularResourceData.getColumns());
showFieldWithTRSelection();
}
/**
*
*/
private void showFieldWithTRSelection() {
try {

View File

@ -50,12 +50,11 @@ import com.sencha.gxt.widget.core.client.form.TextField;
/**
*
* @author Giancarlo Panichi email: <a
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
* @author Giancarlo Panichi
*
*
*/
public class TabularFld extends AbstractFld implements
HasTabularFldChangeEventHandler {
public class TabularFld extends AbstractFld implements HasTabularFldChangeEventHandler {
private SimpleContainer fieldContainer;
private HBoxLayoutContainer horiz;
@ -78,6 +77,7 @@ public class TabularFld extends AbstractFld implements
/**
* @param parameter
* parameter
*/
public TabularFld(Parameter parameter) {
super(parameter);
@ -90,7 +90,7 @@ public class TabularFld extends AbstractFld implements
retrieveTabularResourceInfo();
}
private void bind() {
EventBusProvider.INSTANCE.addHandler(TabularResourceInfoEvent.TYPE,
new TabularResourceInfoEvent.TabularResourceInfoEventHandler() {
@ -120,21 +120,18 @@ public class TabularFld extends AbstractFld implements
SimpleContainer tabContainer = new SimpleContainer();
vp = new VerticalLayoutContainer();
//retrieveInfo();
// retrieveInfo();
init();
createField(tabContainer);
showNoSelectionField();
} catch (Throwable e) {
Log.error("TabularField: " + e.getLocalizedMessage());
UtilsGXT3.alert("Error",
"Error creating Tabular Field: " + e.getLocalizedMessage());
UtilsGXT3.alert("Error", "Error creating Tabular Field: " + e.getLocalizedMessage());
e.printStackTrace();
}
}
private void createField(SimpleContainer tabContainer) {
List<String> templates = tabularParameter.getTemplates();
if (templates == null || templates.isEmpty()) {
@ -148,8 +145,7 @@ public class TabularFld extends AbstractFld implements
first = false;
}
templatesList = new HtmlLayoutContainer(
"<p>Suitable Data Set Templates: <br>" + list + "</p>");
templatesList = new HtmlLayoutContainer("<p>Suitable Data Set Templates: <br>" + list + "</p>");
templatesList.addStyleName("workflow-parameters-description");
}
@ -163,14 +159,12 @@ public class TabularFld extends AbstractFld implements
HtmlLayoutContainer descr;
if (tabularParameter.getDescription() == null) {
descr = new HtmlLayoutContainer(
"<p style='margin-left:5px !important;'></p>");
descr = new HtmlLayoutContainer("<p style='margin-left:5px !important;'></p>");
descr.addStyleName("workflow-fieldDescription");
} else {
descr = new HtmlLayoutContainer(
"<p style='margin-left:5px !important;'>"
+ tabularParameter.getDescription() + "</p>");
"<p style='margin-left:5px !important;'>" + tabularParameter.getDescription() + "</p>");
descr.addStyleName("workflow-fieldDescription");
}
@ -195,7 +189,8 @@ public class TabularFld extends AbstractFld implements
* "multipart/x-zip"
*/
// List<String> allowedMimeTypes =
// Arrays.asList("text/csv","text/plain","text/plain; charset=ISO-8859-1");
// Arrays.asList("text/csv","text/plain","text/plain;
// charset=ISO-8859-1");
/**
* "zip"
@ -208,8 +203,7 @@ public class TabularFld extends AbstractFld implements
* FilterCriteria(allowedMimeTypes, allowedFileExtensions, new
* HashMap<String, String>());
*/
wselectDialog = new WorkspaceExplorerSelectDialog("Select CSV",
false);
wselectDialog = new WorkspaceExplorerSelectDialog("Select CSV", false);
// filterCriteria, selectableTypes);
WorskpaceExplorerSelectNotificationListener handler = new WorskpaceExplorerSelectNotificationListener() {
@ -229,10 +223,8 @@ public class TabularFld extends AbstractFld implements
@Override
public void onFailed(Throwable throwable) {
Log.error("Error in create project: "
+ throwable.getLocalizedMessage());
UtilsGXT3.alert("Error",
throwable.getLocalizedMessage());
Log.error("Error in create project: " + throwable.getLocalizedMessage());
UtilsGXT3.alert("Error", throwable.getLocalizedMessage());
throwable.printStackTrace();
}
@ -247,17 +239,14 @@ public class TabularFld extends AbstractFld implements
}
};
wselectDialog
.addWorkspaceExplorerSelectNotificationListener(handler);
wselectDialog.addWorkspaceExplorerSelectNotificationListener(handler);
wselectDialog.setZIndex(XDOM.getTopZIndex());
} catch (Throwable e) {
Log.error("TabularField error using WorkspaceExplorerSelectDialog: "
+ e.getLocalizedMessage());
Log.error("TabularField error using WorkspaceExplorerSelectDialog: " + e.getLocalizedMessage());
e.printStackTrace();
throw new Exception(
"TabularField error using WorkspaceExplorerSelectDialog: "
+ e.getLocalizedMessage());
"TabularField error using WorkspaceExplorerSelectDialog: " + e.getLocalizedMessage());
}
selectTRButton = new TextButton("Use Tabular Resource");
@ -268,8 +257,7 @@ public class TabularFld extends AbstractFld implements
useTabularResource();
}
});
selectTRButton.setIcon(DataMinerManagerPanel.resources
.tabularResource());
selectTRButton.setIcon(DataMinerManagerPanel.resources.tabularResource());
selectTRButton.setToolTip("Use Tabular Resource");
selectTRButton2 = new TextButton("");
@ -281,8 +269,7 @@ public class TabularFld extends AbstractFld implements
}
});
selectTRButton2.setIcon(DataMinerManagerPanel.resources
.tabularResource());
selectTRButton2.setIcon(DataMinerManagerPanel.resources.tabularResource());
selectTRButton2.setToolTip("Use Tabular Resource");
selectButton = new TextButton("Select Data Set");
@ -293,8 +280,7 @@ public class TabularFld extends AbstractFld implements
wselectDialog.show();
}
});
selectButton.setIcon(DataMinerManagerPanel.resources
.folderExplore());
selectButton.setIcon(DataMinerManagerPanel.resources.folderExplore());
selectButton.setToolTip("Select Data Set");
selectButton2 = new TextButton("");
@ -306,8 +292,7 @@ public class TabularFld extends AbstractFld implements
}
});
selectButton2.setIcon(DataMinerManagerPanel.resources
.folderExplore());
selectButton2.setIcon(DataMinerManagerPanel.resources.folderExplore());
selectButton2.setToolTip("Select Another Data Set");
cancelButton = new TextButton("");
@ -321,9 +306,8 @@ public class TabularFld extends AbstractFld implements
updateListeners(null);
}
});
cancelButton.setToolTip("Cancel");
cancelButton.setToolTip("Cancel");
downloadButton = new TextButton("");
downloadButton.setIcon(DataMinerManagerPanel.resources.download());
@ -335,7 +319,7 @@ public class TabularFld extends AbstractFld implements
}
});
downloadButton.setToolTip("Download Data Set");
} catch (Throwable e) {
Log.error("TabularField init: " + e.getLocalizedMessage());
e.printStackTrace();
@ -345,11 +329,8 @@ public class TabularFld extends AbstractFld implements
private void useTabularResource() {
Log.debug("TabularResourceData: " + tabularResourceData);
selectedTableItem = new TableItemSimple(
tabularResourceData.getTabularResourceId(),
tabularResourceData.getName(),
tabularResourceData.getDescription(),
tabularResourceData.getType());
selectedTableItem = new TableItemSimple(tabularResourceData.getTabularResourceId(),
tabularResourceData.getName(), tabularResourceData.getDescription(), tabularResourceData.getType());
selectedTableItem.setColumns(tabularResourceData.getColumns());
selectedTableItem.setTabularResource(true);
showFieldWithTRSelection();
@ -359,66 +340,56 @@ public class TabularFld extends AbstractFld implements
private void retrieveTableInformation(Item item) {
Log.debug("Retrieved: " + item);
itemDescriptionSelected = new ItemDescription(item.getId(),
item.getName(), item.getOwner(), item.getPath(), item.getType()
.name());
itemDescriptionSelected = new ItemDescription(item.getId(), item.getName(), item.getOwner(), item.getPath(),
item.getType().name());
DataMinerPortletServiceAsync.INSTANCE.retrieveTableInformation(item,
new AsyncCallback<TableItemSimple>() {
DataMinerPortletServiceAsync.INSTANCE.retrieveTableInformation(item, new AsyncCallback<TableItemSimple>() {
@Override
public void onFailure(Throwable caught) {
Log.error("Error in retrieveTableInformation "
+ caught.getMessage());
if (caught instanceof SessionExpiredServiceException) {
UtilsGXT3.alert("Error", "Expired Session");
@Override
public void onFailure(Throwable caught) {
Log.error("Error in retrieveTableInformation " + caught.getMessage());
if (caught instanceof SessionExpiredServiceException) {
UtilsGXT3.alert("Error", "Expired Session");
} else {
UtilsGXT3.alert("Error",
"Error retrieving table information: "
+ caught.getLocalizedMessage());
}
} else {
UtilsGXT3.alert("Error", "Error retrieving table information: " + caught.getLocalizedMessage());
}
}
}
@Override
public void onSuccess(TableItemSimple result) {
Log.debug("Retrieved: " + result);
selectedTableItem = result;
showFieldWithFileSelection();
updateListeners(selectedTableItem);
}
});
@Override
public void onSuccess(TableItemSimple result) {
Log.debug("Retrieved: " + result);
selectedTableItem = result;
showFieldWithFileSelection();
updateListeners(selectedTableItem);
}
});
}
private void downloadFile() {
if (itemDescriptionSelected != null) {
DataMinerPortletServiceAsync.INSTANCE.getPublicLink(
itemDescriptionSelected, new AsyncCallback<String>() {
DataMinerPortletServiceAsync.INSTANCE.getPublicLink(itemDescriptionSelected, new AsyncCallback<String>() {
@Override
public void onFailure(Throwable caught) {
if (caught instanceof SessionExpiredServiceException) {
EventBusProvider.INSTANCE
.fireEvent(new SessionExpiredEvent());
} else {
Log.error("Error downloading table: "
+ caught.getLocalizedMessage());
UtilsGXT3.alert("Error",
caught.getLocalizedMessage());
}
caught.printStackTrace();
@Override
public void onFailure(Throwable caught) {
if (caught instanceof SessionExpiredServiceException) {
EventBusProvider.INSTANCE.fireEvent(new SessionExpiredEvent());
} else {
Log.error("Error downloading table: " + caught.getLocalizedMessage());
UtilsGXT3.alert("Error", caught.getLocalizedMessage());
}
caught.printStackTrace();
}
}
@Override
public void onSuccess(String link) {
Log.debug("Retrieved link: " + link);
Window.open(link,
itemDescriptionSelected.getName(), "");
}
@Override
public void onSuccess(String link) {
Log.debug("Retrieved link: " + link);
Window.open(link, itemDescriptionSelected.getName(), "");
}
});
});
} else {
UtilsGXT3.info("Attention", "Select a Table!");
@ -426,9 +397,6 @@ public class TabularFld extends AbstractFld implements
}
/**
*
*/
private void showNoSelectionField() {
vp.clear();
vp.add(selectTRButton);
@ -484,35 +452,24 @@ public class TabularFld extends AbstractFld implements
fieldContainer.forceLayout();
}
/**
*
*/
@Override
public String getValue() {
return (selectedTableItem == null) ? null : selectedTableItem.getId();
}
/**
*
*/
@Override
public Widget getWidget() {
return fieldContainer;
}
/**
*
*/
@Override
public boolean isValid() {
return (selectedTableItem != null);
}
@Override
public HandlerRegistration addTabularFldChangeEventHandler(
TabularFldChangeEventHandler handler) {
return fieldContainer.addHandler(handler,
TabularFldChangeEvent.getType());
public HandlerRegistration addTabularFldChangeEventHandler(TabularFldChangeEventHandler handler) {
return fieldContainer.addHandler(handler, TabularFldChangeEvent.getType());
}

View File

@ -22,8 +22,8 @@ import com.sencha.gxt.widget.core.client.container.VerticalLayoutContainer;
/**
*
* @author Giancarlo Panichi email: <a
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
* @author Giancarlo Panichi
*
*
*/
public class TabularListFld extends AbstractFld {
@ -37,6 +37,7 @@ public class TabularListFld extends AbstractFld {
/**
* @param parameter
* parameter
*/
public TabularListFld(Parameter parameter) {
super(parameter);
@ -81,8 +82,8 @@ public class TabularListFld extends AbstractFld {
descr.addStyleName("workflow-fieldDescription");
} else {
/* listContainer.setToolTip(listParameter.getDescription()); */
descr = new HtmlLayoutContainer("<p style='margin-left:5px !important;'>"
+ tabularListParameter.getDescription() + "</p>");
descr = new HtmlLayoutContainer(
"<p style='margin-left:5px !important;'>" + tabularListParameter.getDescription() + "</p>");
descr.addStyleName("workflow-fieldDescription");
}
@ -97,12 +98,9 @@ public class TabularListFld extends AbstractFld {
protected void addField(TabItem upperItem) {
try {
TabularParameter tabPar = new TabularParameter(
tabularListParameter.getName(),
tabularListParameter.getDescription(), null,
tabularListParameter.getTemplates(),
tabularListParameter.getDefaultMimeType(),
tabularListParameter.getSupportedMimeTypes());
TabularParameter tabPar = new TabularParameter(tabularListParameter.getName(),
tabularListParameter.getDescription(), null, tabularListParameter.getTemplates(),
tabularListParameter.getDefaultMimeType(), tabularListParameter.getSupportedMimeTypes());
if (upperItem == null) {
TabItem item = new TabItem(this, tabPar, true);
@ -114,18 +112,20 @@ public class TabularListFld extends AbstractFld {
int pos = items.indexOf(upperItem);
if (pos == 0) {
upperItem.showCancelButton();
TabItem item = new TabItem(this, tabPar, false);
items.add(1, item);
vp.insert(item, 1);// don't use new
// VerticalLayoutData(-1, -1,new
// Margins(0))
// VerticalLayoutData(-1, -1,new
// Margins(0))
} else {
//upperItem.forceLayout();
// upperItem.forceLayout();
TabItem item = new TabItem(this, tabPar, false);
items.add(pos+1,item);
vp.insert(item,pos+1);// don't use new VerticalLayoutData(-1, -1, new
// Margins(0))
items.add(pos + 1, item);
vp.insert(item, pos + 1);// don't use new
// VerticalLayoutData(-1, -1,
// new
// Margins(0))
}
}
@ -137,24 +137,17 @@ public class TabularListFld extends AbstractFld {
}
}
/**
*
* @param item
*/
protected void removeField(TabItem item) {
items.remove(item);
if (items.size() == 1) {
TabItem topItem=items.get(0);
TabItem topItem = items.get(0);
topItem.hideCancelButton();
}
vp.remove(item);
forceLayout();
}
/**
*
*/
protected void forceLayout() {
vp.forceLayout();
listContainer.forceLayout();
@ -162,9 +155,6 @@ public class TabularListFld extends AbstractFld {
fieldContainer.forceLayout();
}
/**
*
*/
@Override
public String getValue() {
String separator = tabularListParameter.getSeparator();
@ -181,9 +171,6 @@ public class TabularListFld extends AbstractFld {
return value;
}
/**
*
*/
@Override
public Widget getWidget() {
return fieldContainer;

View File

@ -24,8 +24,8 @@ import com.sencha.gxt.widget.core.client.form.TimeField;
/**
*
* @author Giancarlo Panichi email: <a
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
* @author Giancarlo Panichi
*
*
*/
public class TimeFld extends AbstractFld {
@ -36,6 +36,7 @@ public class TimeFld extends AbstractFld {
/**
* @param parameter
* parameter
*/
public TimeFld(Parameter parameter) {
super(parameter);
@ -60,26 +61,21 @@ public class TimeFld extends AbstractFld {
HtmlLayoutContainer descr;
if (p.getDescription() == null) {
descr = new HtmlLayoutContainer(
"<p style='margin-left:5px !important;'></p>");
descr = new HtmlLayoutContainer("<p style='margin-left:5px !important;'></p>");
descr.addStyleName("workflow-fieldDescription");
} else {
// textField.setToolTip(p.getDescription());
descr = new HtmlLayoutContainer(
"<p style='margin-left:5px !important;'>"
+ p.getDescription() + "</p>");
descr = new HtmlLayoutContainer("<p style='margin-left:5px !important;'>" + p.getDescription() + "</p>");
descr.addStyleName("workflow-fieldDescription");
}
SimpleContainer vContainer = new SimpleContainer();
VerticalLayoutContainer vField = new VerticalLayoutContainer();
HtmlLayoutContainer typeDescription = new HtmlLayoutContainer(
"Time Value");
HtmlLayoutContainer typeDescription = new HtmlLayoutContainer("Time Value");
typeDescription.setStylePrimaryName("workflow-parameters-description");
vField.add(timeField, new VerticalLayoutData(-1, -1, new Margins(0)));
vField.add(typeDescription, new VerticalLayoutData(-1, -1, new Margins(
0)));
vField.add(typeDescription, new VerticalLayoutData(-1, -1, new Margins(0)));
vContainer.add(vField);
fieldContainer = new SimpleContainer();
@ -95,18 +91,12 @@ public class TimeFld extends AbstractFld {
}
/**
*
*/
@Override
public String getValue() {
String timeS = timeFormat.format(timeField.getCurrentValue());
return timeS;
}
/**
*
*/
@Override
public Widget getWidget() {
return fieldContainer;

View File

@ -30,8 +30,8 @@ import com.sencha.gxt.widget.core.client.form.TextField;
/**
*
* @author Giancarlo Panichi email: <a
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
* @author Giancarlo Panichi
*
*
*/
public class WKTFld extends AbstractFld {
@ -52,7 +52,7 @@ public class WKTFld extends AbstractFld {
private TextField selectedAreaField;
/**
* @param parameter
* @param parameter parameter
*/
public WKTFld(Parameter parameter) {
super(parameter);

View File

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

View File

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

View File

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

View File

@ -20,8 +20,8 @@ import com.google.gwt.user.client.rpc.AsyncCallback;
/**
*
* @author Giancarlo Panichi email: <a
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
* @author Giancarlo Panichi
*
*
*/
public interface DataMinerPortletServiceAsync {

View File

@ -10,8 +10,8 @@ import org.gcube.data.analysis.dataminermanagercl.shared.data.ColumnItem;
/**
*
* @author Giancarlo Panichi email: <a
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
* @author Giancarlo Panichi
*
*
*/
public class TabularResourceData implements Serializable {

View File

@ -2,8 +2,8 @@ package org.gcube.portlets.widgets.dataminermanagerwidget.client.type;
/**
*
* @author "Giancarlo Panichi" <a
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
* @author Giancarlo Panichi
*
*
*/
public enum DataMinerWorkAreaElementType {

View File

@ -2,8 +2,8 @@ package org.gcube.portlets.widgets.dataminermanagerwidget.client.type;
/**
*
* @author "Giancarlo Panichi"
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
* @author Giancarlo Panichi
*
*
*/
public enum DataMinerWorkAreaEventType {

View File

@ -2,8 +2,8 @@ package org.gcube.portlets.widgets.dataminermanagerwidget.client.type;
/**
*
* @author "Giancarlo Panichi" <a
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
* @author Giancarlo Panichi
*
*
*/
public enum DataMinerWorkAreaRegionType {

View File

@ -3,7 +3,7 @@ package org.gcube.portlets.widgets.dataminermanagerwidget.client.type;
/**
*
* @author Giancarlo Panichi
* email: <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
*
*
*/
public enum DataMinerWorkAreaRequestEventType {

Some files were not shown because too many files have changed in this diff Show More