Minor updated
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-csv-import-widget@84864 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
df2d23bbf9
commit
8f7c0ba45f
|
@ -29,8 +29,6 @@ public class CSVImportProgressBarUpdater implements CSVImportProgressListener {
|
|||
*/
|
||||
public CSVImportProgressBarUpdater(ProgressBar progressBar) {
|
||||
this.progressBar = progressBar;
|
||||
//this.wizardWindow = w;
|
||||
//this.operationResult = operationResult;
|
||||
}
|
||||
|
||||
|
||||
|
@ -38,21 +36,9 @@ public class CSVImportProgressBarUpdater implements CSVImportProgressListener {
|
|||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public void operationComplete(TRId trId) {// TODO Auto-generated method stub
|
||||
Log.info("Import complete");
|
||||
progressBar.updateProgress(1, "Import complete.");
|
||||
/*final FlexTable descriptionResult = new FlexTable();
|
||||
descriptionResult.setCellSpacing(10);
|
||||
descriptionResult.setCellPadding(4);
|
||||
descriptionResult.setBorderWidth(0);
|
||||
descriptionResult.setText(0, 0, "Result: ");
|
||||
descriptionResult.setText(0, 1, "Import complete");
|
||||
|
||||
operationResult.add(descriptionResult);
|
||||
operationResult.setVisible(true);
|
||||
*/
|
||||
//wizardWindow.setEnableNextButton(true);
|
||||
|
||||
public void operationComplete(TRId trId) {
|
||||
Log.info("Import completed");
|
||||
progressBar.updateProgress(1, "Import completed.");
|
||||
|
||||
}
|
||||
|
||||
|
@ -67,20 +53,20 @@ public class CSVImportProgressBarUpdater implements CSVImportProgressListener {
|
|||
|
||||
@Override
|
||||
public void operationInitializing() {
|
||||
Log.info("Inport inizializing");
|
||||
progressBar.updateProgress(0, "initializing...");
|
||||
Log.info("Inport Inizializing");
|
||||
progressBar.updateProgress(0, "Initializing...");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void operationUpdate(float elaborated) {
|
||||
Log.info("Import elaborated: "+elaborated);
|
||||
if (elaborated == 0) progressBar.updateProgress(0, "initializing...");
|
||||
if (elaborated == 0) progressBar.updateProgress(0, "Initializing...");
|
||||
if (elaborated>0 && elaborated<1) {
|
||||
Log.trace("progress "+elaborated);
|
||||
int elab=new Float(elaborated*100).intValue();
|
||||
progressBar.updateProgress(elaborated,elab+"% importing...");
|
||||
progressBar.updateProgress(elaborated,elab+"% Importing...");
|
||||
}
|
||||
if (elaborated == 1) progressBar.updateProgress(1, "completing...");
|
||||
if (elaborated == 1) progressBar.updateProgress(1, "Completing...");
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -47,11 +47,20 @@ public class CSVImportProgressUpdater extends Timer {
|
|||
public void onSuccess(CSVImportMonitor result) {
|
||||
Log.info("retrieved CSVImportMonitor: "+result.getStatus());
|
||||
switch (result.getStatus()) {
|
||||
case INITIALIZING:
|
||||
Log.info("CSV Import Initializing...");
|
||||
fireOperationInitializing();
|
||||
break;
|
||||
case ABORTED:
|
||||
cancel();
|
||||
Log.info("CSV Import Operation Aborted");
|
||||
break;
|
||||
case IN_PROGRESS:
|
||||
fireOperationUpdate(result.getProgress());
|
||||
break;
|
||||
case FAILED:
|
||||
cancel();
|
||||
Log.info("CSV Import Failed");
|
||||
fireOperationFailed(result.getError() ,"Failed Client Library Import", result.getError().getLocalizedMessage());
|
||||
break;
|
||||
case SUCCEDED:
|
||||
|
|
|
@ -24,8 +24,6 @@ public class FileUploadProgressBarUpdater implements FileUploadProgressListener
|
|||
*/
|
||||
public FileUploadProgressBarUpdater(ProgressBar progressBar) {
|
||||
this.progressBar = progressBar;
|
||||
//this.wizardWindow = w;
|
||||
//this.operationResult = operationResult;
|
||||
}
|
||||
|
||||
|
||||
|
@ -33,21 +31,9 @@ public class FileUploadProgressBarUpdater implements FileUploadProgressListener
|
|||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public void operationComplete() {// TODO Auto-generated method stub
|
||||
public void operationComplete() {
|
||||
Log.info("File upload complete");
|
||||
progressBar.updateProgress(1, "File upload complete.");
|
||||
/*final FlexTable descriptionResult = new FlexTable();
|
||||
descriptionResult.setCellSpacing(10);
|
||||
descriptionResult.setCellPadding(4);
|
||||
descriptionResult.setBorderWidth(0);
|
||||
descriptionResult.setText(0, 0, "Result: ");
|
||||
descriptionResult.setText(0, 1, "Import complete");
|
||||
|
||||
operationResult.add(descriptionResult);
|
||||
operationResult.setVisible(true);
|
||||
*/
|
||||
//wizardWindow.setEnableNextButton(true);
|
||||
|
||||
progressBar.updateProgress(1, "File upload completed.");
|
||||
|
||||
}
|
||||
|
||||
|
@ -63,19 +49,19 @@ public class FileUploadProgressBarUpdater implements FileUploadProgressListener
|
|||
@Override
|
||||
public void operationInitializing() {
|
||||
Log.info("File upload inizializing");
|
||||
progressBar.updateProgress(0, "initializing...");
|
||||
progressBar.updateProgress(0, "Initializing...");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void operationUpdate(float elaborated) {
|
||||
Log.info("File upload elaborated: "+elaborated);
|
||||
if (elaborated == 0) progressBar.updateProgress(0, "initializing...");
|
||||
if (elaborated == 0) progressBar.updateProgress(0, "Initializing...");
|
||||
if (elaborated>0 && elaborated<1) {
|
||||
Log.trace("progress "+elaborated);
|
||||
int elab=new Float(elaborated*100).intValue();
|
||||
progressBar.updateProgress(elaborated,elab+"% uploading...");
|
||||
progressBar.updateProgress(elaborated,elab+"% Uploading...");
|
||||
}
|
||||
if (elaborated == 1) progressBar.updateProgress(1, "completing...");
|
||||
if (elaborated == 1) progressBar.updateProgress(1, "Completed.");
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@ public class FileUploadProgressCardUpdater implements FileUploadProgressListener
|
|||
|
||||
@Override
|
||||
public void operationComplete() {
|
||||
Log.info("File upload complete");
|
||||
Log.info("File upload completed");
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue