Fixed Progress Bar

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-information-widget@92489 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Giancarlo Panichi 2014-02-28 14:04:28 +00:00
parent f2cd35309b
commit b9eab076ab
6 changed files with 18 additions and 23 deletions

View File

@ -1,12 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<classpath> <classpath>
<classpathentry kind="src" output="target/tabular-data-information-widget-2.0.0-SNAPSHOT/WEB-INF/classes" path="src/main/java"> <classpathentry kind="src" output="target/tabular-data-information-widget-2.1.0-SNAPSHOT/WEB-INF/classes" path="src/main/java">
<attributes> <attributes>
<attribute name="optional" value="true"/> <attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/> <attribute name="maven.pomderived" value="true"/>
</attributes> </attributes>
</classpathentry> </classpathentry>
<classpathentry excluding="**" kind="src" output="target/tabular-data-information-widget-2.0.0-SNAPSHOT/WEB-INF/classes" path="src/main/resources"> <classpathentry excluding="**" kind="src" output="target/tabular-data-information-widget-2.1.0-SNAPSHOT/WEB-INF/classes" path="src/main/resources">
<attributes> <attributes>
<attribute name="maven.pomderived" value="true"/> <attribute name="maven.pomderived" value="true"/>
</attributes> </attributes>
@ -33,5 +33,5 @@
<attribute name="org.eclipse.jst.component.nondependency" value=""/> <attribute name="org.eclipse.jst.component.nondependency" value=""/>
</attributes> </attributes>
</classpathentry> </classpathentry>
<classpathentry kind="output" path="target/tabular-data-information-widget-2.0.0-SNAPSHOT/WEB-INF/classes"/> <classpathentry kind="output" path="target/tabular-data-information-widget-2.1.0-SNAPSHOT/WEB-INF/classes"/>
</classpath> </classpath>

View File

@ -14,7 +14,7 @@
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>org.gcube.portlets.user</groupId> <groupId>org.gcube.portlets.user</groupId>
<artifactId>tabular-data-information-widget</artifactId> <artifactId>tabular-data-information-widget</artifactId>
<version>2.0.0-SNAPSHOT</version> <version>2.1.0-SNAPSHOT</version>
<name>tabular-data-information-widget</name> <name>tabular-data-information-widget</name>
<description>tabular-data-information-widget allows the recovery of the information relating to a tabular resource</description> <description>tabular-data-information-widget allows the recovery of the information relating to a tabular resource</description>

View File

@ -66,8 +66,8 @@ public class ChangeTableTypeProgressBarUpdater implements ChangeTableTypeProgres
@Override @Override
public void operationStopped(String reason, String details) { public void operationStopped(TRId trId,String reason, String details) {
Log.info("Stopped"); Log.debug("Operation Stopped: ["+trId.toString()+", "+reason+", "+details+"]");
progressBar.updateText("Stopped"); progressBar.updateText("Stopped");
} }

View File

@ -125,15 +125,9 @@ public class ChangeTableTypeProgressDialog extends Window implements ChangeTable
} }
@Override @Override
public void operationStopped(String reason, String details) { public void operationStopped(TRId trId,String reason, String details) {
Log.debug("Operation Stopped: ["+trId.toString()+", "+reason+", "+details+"]");
ok.setVisible(true); ok.setVisible(true);
this.trId=null; this.trId=trId;
AlertMessageBox d = new AlertMessageBox("Stopped Changing The Table Type", reason);
d.addHideHandler(new HideHandler() {
public void onHide(HideEvent event) {
}
});
d.show();
} }
} }

View File

@ -41,10 +41,12 @@ public interface ChangeTableTypeProgressListener {
public void operationFailed(Throwable caught, String reason, String failureDetails); public void operationFailed(Throwable caught, String reason, String failureDetails);
/** /**
* Called when the operation is failed. * Called when the operation is stopped
* @param caught the failure exception. *
* @param reason the failure reason. * @param trId
* @param reason
* @param details
*/ */
public void operationStopped(String reason, String details); public void operationStopped(TRId trId, String reason, String details);
} }

View File

@ -118,7 +118,7 @@ public class ChangeTableTypeProgressUpdater extends Timer {
details = "Change the table type stopped"; details = "Change the table type stopped";
} }
fireOperationStopped(failure, details); fireOperationStopped(result.getTrId(),failure, details);
} }
@ -151,11 +151,10 @@ public class ChangeTableTypeProgressUpdater extends Timer {
listener.operationFailed(caught, failure, failureDetails); listener.operationFailed(caught, failure, failureDetails);
} }
protected void fireOperationStopped(String reason, String details) { protected void fireOperationStopped(TRId trId, String reason, String details) {
for (ChangeTableTypeProgressListener listener : listeners) for (ChangeTableTypeProgressListener listener : listeners)
listener.operationStopped(reason, details); listener.operationStopped(trId,reason, details);
} }
/** /**