mirror of https://github.com/xfarrow/guify.git
Update Queue.java
This commit is contained in:
parent
7c9db6b5ba
commit
a900c94b5a
|
@ -10,9 +10,7 @@ import javax.swing.JScrollPane;
|
||||||
import javax.swing.table.DefaultTableCellRenderer;
|
import javax.swing.table.DefaultTableCellRenderer;
|
||||||
import javax.swing.table.DefaultTableModel;
|
import javax.swing.table.DefaultTableModel;
|
||||||
import javax.swing.table.TableColumn;
|
import javax.swing.table.TableColumn;
|
||||||
|
|
||||||
import com.jcraft.jsch.SftpProgressMonitor;
|
import com.jcraft.jsch.SftpProgressMonitor;
|
||||||
|
|
||||||
import code.Constants;
|
import code.Constants;
|
||||||
import code.TransferProgress;
|
import code.TransferProgress;
|
||||||
import controllers.QueueController;
|
import controllers.QueueController;
|
||||||
|
@ -98,15 +96,12 @@ public class Queue extends JFrame implements IQueueFrame {
|
||||||
if(!controller.isTransferProgressInHashMap(transferProgress)) {
|
if(!controller.isTransferProgressInHashMap(transferProgress)) {
|
||||||
controller.putTableIndex(transferProgress,
|
controller.putTableIndex(transferProgress,
|
||||||
addRow(transferProgress.getSource(),
|
addRow(transferProgress.getSource(),
|
||||||
transferProgress.getDestination(),
|
transferProgress.getDestination(),
|
||||||
transferProgress.getOperation() == SftpProgressMonitor.GET? "Download" : "Upload",
|
transferProgress.getOperation() == SftpProgressMonitor.GET? "Download" : "Upload",
|
||||||
controller.computePercentage(transferProgress)));
|
controller.computePercentage(transferProgress)));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if(transferProgress.getTransferStatus() != TransferProgress.INIT) {
|
updateRow(controller.getTableIndex(transferProgress), controller.computePercentage(transferProgress));
|
||||||
updateRow(controller.getTableIndex(transferProgress), controller.computePercentage(transferProgress));
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue