From 92bfc6e8c79049999b2279c032878c7b1293bbac Mon Sep 17 00:00:00 2001 From: Giancarlo Panichi Date: Wed, 30 Apr 2014 09:51:39 +0000 Subject: [PATCH] Updated progress bar git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-sdmx-import-widget@95258 82a268e6-3cf1-43bd-a215-b396298e98cf --- .../client/SDMXOperationInProgressCard.java | 6 ++++++ .../client/progress/ImportProgressBarUpdater.java | 7 +++++++ .../client/progress/OperationProgressListener.java | 6 ++++++ .../client/progress/OperationProgressUpdater.java | 9 +++++++++ 4 files changed, 28 insertions(+) diff --git a/src/main/java/org/gcube/portlets/user/td/sdmximportwidget/client/SDMXOperationInProgressCard.java b/src/main/java/org/gcube/portlets/user/td/sdmximportwidget/client/SDMXOperationInProgressCard.java index 8d7cc82..7fb5b16 100644 --- a/src/main/java/org/gcube/portlets/user/td/sdmximportwidget/client/SDMXOperationInProgressCard.java +++ b/src/main/java/org/gcube/portlets/user/td/sdmximportwidget/client/SDMXOperationInProgressCard.java @@ -231,4 +231,10 @@ public class SDMXOperationInProgressCard extends WizardCard implements } + @Override + public void operationGeneratingView() { + // TODO Auto-generated method stub + + } + } diff --git a/src/main/java/org/gcube/portlets/user/td/sdmximportwidget/client/progress/ImportProgressBarUpdater.java b/src/main/java/org/gcube/portlets/user/td/sdmximportwidget/client/progress/ImportProgressBarUpdater.java index 437758c..154f293 100644 --- a/src/main/java/org/gcube/portlets/user/td/sdmximportwidget/client/progress/ImportProgressBarUpdater.java +++ b/src/main/java/org/gcube/portlets/user/td/sdmximportwidget/client/progress/ImportProgressBarUpdater.java @@ -78,5 +78,12 @@ public class ImportProgressBarUpdater implements OperationProgressListener { progressBar.updateText("Validations failed"); } + + @Override + public void operationGeneratingView() { + Log.info("Generating View..."); + progressBar.updateText("Generating View..."); + + } } diff --git a/src/main/java/org/gcube/portlets/user/td/sdmximportwidget/client/progress/OperationProgressListener.java b/src/main/java/org/gcube/portlets/user/td/sdmximportwidget/client/progress/OperationProgressListener.java index ef0ea4b..b6431e8 100644 --- a/src/main/java/org/gcube/portlets/user/td/sdmximportwidget/client/progress/OperationProgressListener.java +++ b/src/main/java/org/gcube/portlets/user/td/sdmximportwidget/client/progress/OperationProgressListener.java @@ -52,4 +52,10 @@ public interface OperationProgressListener { */ public void operationStopped(TRId trId, String reason, String details); + + /** + * Called when the operation is generating the view + */ + public void operationGeneratingView(); + } diff --git a/src/main/java/org/gcube/portlets/user/td/sdmximportwidget/client/progress/OperationProgressUpdater.java b/src/main/java/org/gcube/portlets/user/td/sdmximportwidget/client/progress/OperationProgressUpdater.java index 739fa0c..5e11750 100644 --- a/src/main/java/org/gcube/portlets/user/td/sdmximportwidget/client/progress/OperationProgressUpdater.java +++ b/src/main/java/org/gcube/portlets/user/td/sdmximportwidget/client/progress/OperationProgressUpdater.java @@ -59,6 +59,10 @@ public class OperationProgressUpdater extends Timer { case VALIDATING_RULES: fireOperationUpdate(result.getProgress()); break; + case GENERATING_VIEW: + Log.info("Generating View..."); + fireOperationGeneratingView(); + break; case FAILED: cancel(); errorMessage(result); @@ -132,6 +136,11 @@ public class OperationProgressUpdater extends Timer { for (OperationProgressListener listener : listeners) listener.operationInitializing(); } + + protected void fireOperationGeneratingView() { + for (OperationProgressListener listener : listeners) + listener.operationGeneratingView(); + } protected void fireOperationUpdate(float elaborated) { for (OperationProgressListener listener : listeners)