summaryrefslogtreecommitdiffstats
path: root/idrop-lite
diff options
context:
space:
mode:
authorLISA STILLWELL <lisa@dhcp152-54-6-218.wireless.europa.renci.org>2012-01-06 16:07:10 (GMT)
committer LISA STILLWELL <lisa@dhcp152-54-6-218.wireless.europa.renci.org>2012-01-06 16:07:10 (GMT)
commit395e7acd10997ff240f57ff2e04d124fc269fe18 (patch)
treee46cd187ccdbf7fa3ada1e7cb0a18803040607bb /idrop-lite
parent0bce21243175200928e6c3a3c64e36a5e248a753 (diff)
downloadQCG-Data-395e7acd10997ff240f57ff2e04d124fc269fe18.zip
QCG-Data-395e7acd10997ff240f57ff2e04d124fc269fe18.tar.gz
QCG-Data-395e7acd10997ff240f57ff2e04d124fc269fe18.tar.bz2
[#583] changed code to not update progress bar for first IN_PROOGRESS_START_FILE callback
Diffstat (limited to 'idrop-lite')
-rw-r--r--idrop-lite/src/main/java/org/irods/jargon/idrop/lite/iDropLiteApplet.java39
1 files changed, 20 insertions, 19 deletions
diff --git a/idrop-lite/src/main/java/org/irods/jargon/idrop/lite/iDropLiteApplet.java b/idrop-lite/src/main/java/org/irods/jargon/idrop/lite/iDropLiteApplet.java
index c862873..41955f3 100644
--- a/idrop-lite/src/main/java/org/irods/jargon/idrop/lite/iDropLiteApplet.java
+++ b/idrop-lite/src/main/java/org/irods/jargon/idrop/lite/iDropLiteApplet.java
@@ -727,30 +727,31 @@ public class iDropLiteApplet extends javax.swing.JApplet implements TransferStat
float bt = ts.getBytesTransfered() * 100;
float tot = ts.getTotalSize();
float percentDone = bt / tot;
- //tblUploadTable1.getModel().setValueAt((int) percentDone, tableRow, 2);
TransferProgressInfo tpi = new TransferProgressInfo(ts.getTotalSize(), ts.getBytesTransfered(), 0, 0, true);
tblUploadTable1.getModel().setValueAt(tpi, tableRow, 2);
}
} else if (ts.getTransferState() == TransferStatus.TransferState.IN_PROGRESS_START_FILE) {
-
- // start of a file operation
- progressIntraFile.setMinimum(0);
- progressIntraFile.setMaximum((int) ts.getTotalSize());
- progressIntraFile.setValue(0);
- lblCurrentFile.setText(abbreviateFileName(ts.getSourceFileAbsolutePath()));
-
- //currentUploadFile = ts.getSourceFileAbsolutePath();
- if (currentUploadFile != null) {
- tableRow = getUploadTableProgressRow(currentUploadFile);
- }
- if ((tableRow >= 0)) {
- //tblUploadTable1.getModel().setValueAt(0, tableRow, 2);
- TransferProgressInfo tpi = new TransferProgressInfo(ts.getTotalSize(), ts.getBytesTransfered(),
- ts.getTotalFilesToTransfer(), ts.getTotalFilesTransferredSoFar());
- tblUploadTable1.getModel().setValueAt(tpi, tableRow, 2);
- }
-
+
+ // start of a file operation
+ progressIntraFile.setMinimum(0);
+ progressIntraFile.setMaximum((int) ts.getTotalSize());
+ progressIntraFile.setValue(0);
+ lblCurrentFile.setText(abbreviateFileName(ts.getSourceFileAbsolutePath()));
+
+ // need to do this because an IN_PROGRESS_START_FILE message is sent first that says
+ // all of the bytes have been transferred which of course is incorrect, so must ignore
+ // that first message
+ if(!(ts.getTotalSize() == ts.getBytesTransfered())) {
+ if (currentUploadFile != null) {
+ tableRow = getUploadTableProgressRow(currentUploadFile);
+ }
+ if ((tableRow >= 0)) {
+ TransferProgressInfo tpi = new TransferProgressInfo(ts.getTotalSize(), ts.getBytesTransfered(),
+ ts.getTotalFilesToTransfer(), ts.getTotalFilesTransferredSoFar());
+ tblUploadTable1.getModel().setValueAt(tpi, tableRow, 2);
+ }
+ }
} else if (ts.getTransferState() == TransferStatus.TransferState.IN_PROGRESS_COMPLETE_FILE) {