Size displays now as GB/MB/kB

This commit is contained in:
Dmitry Isaenko 2019-03-15 00:58:04 +03:00
parent 4cfd651667
commit dc5ba1425b
5 changed files with 10 additions and 6 deletions

View file

@ -223,7 +223,7 @@ public class NSLMainController implements Initializable {
if ((filesAlreadyInTable = tableFilesListController.getFiles()) != null) {
filesDropped.removeAll(filesAlreadyInTable); // Get what we already have and add new file(s)
if (!filesDropped.isEmpty()) {
filesDropped.addAll(tableFilesListController.getFiles());
filesDropped.addAll(filesAlreadyInTable);
tableFilesListController.setFiles(filesDropped);
}
}
@ -234,7 +234,6 @@ public class NSLMainController implements Initializable {
}
event.setDropCompleted(true);
}
/**
* Save preferences before exit

View file

@ -16,7 +16,12 @@ public class NSLRowModel {
this.nspFile = nspFile;
this.markForUpload = checkBoxValue;
this.nspFileName = nspFile.getName();
this.nspFileSize = String.format("%.2f", nspFile.length()/1024.0/1024.0);
if (nspFile.length()/1024.0/1024.0/1024.0 > 1)
this.nspFileSize = String.format("%.2f", nspFile.length()/1024.0/1024.0/1024.0)+" GB";
else if (nspFile.length()/1024.0/1024.0 > 1)
this.nspFileSize = String.format("%.2f", nspFile.length()/1024.0/1024.0)+" MB";
else
this.nspFileSize = String.format("%.2f", nspFile.length()/1024.0)+" kB";
this.status = "";
}
// Model methods start

View file

@ -17,5 +17,5 @@ windowBodyConfirmWrongPFS0=Selected NSP file has incrrect starting symbols. Most
It's better to interrupt proccess now. Continue process anyway?
tableStatusLbl=Status
tableFileNameLbl=File name
tableSizeLbl=Size (~Mb)
tableSizeLbl=Size
tableUploadLbl=Upload?

View file

@ -17,7 +17,7 @@ windowBodyConfirmWrongPFS0=\u0412\u044B\u0431\u0440\u0430\u043D\u043D\u044B\u043
\u041B\u0443\u0447\u0448\u0435 \u043E\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C\u0441\u044F \u043F\u0440\u044F\u043C\u043E \u0441\u0435\u0439\u0447\u0430\u0441. \u0425\u043E\u0447\u0435\u0448\u044C \u043F\u0440\u043E\u0434\u043E\u043B\u0436\u0430\u0442\u044C \u043D\u0438 \u0441\u043C\u043E\u0442\u0440\u044F \u043D\u0438 \u043D\u0430 \u0447\u0442\u043E?\
tableUploadLbl=\u0417\u0430\u0433\u0440\u0443\u0436\u0430\u0442\u044C?
tableSizeLbl=\u0420\u0430\u0437\u043C\u0435\u0440 (~\u041C\u0431)
tableSizeLbl=\u0420\u0430\u0437\u043C\u0435\u0440
tableFileNameLbl=\u0418\u043C\u044F \u0444\u0430\u0439\u043B\u0430
tableStatusLbl=\u0421\u043E\u0441\u0442\u043E\u044F\u043D\u0438\u0435

View file

@ -17,5 +17,5 @@ windowBodyConfirmWrongPFS0=\u0412\u0438\u0431\u0440\u0430\u043D\u0438\u0439 \u04
\u041A\u0440\u0430\u0449\u0435 \u0437\u0443\u043F\u0438\u043D\u0438\u0442\u0438\u0441\u044F \u043F\u0440\u044F\u043C\u043E \u0437\u0430\u0440\u0430\u0437. \u0425\u043E\u0447\u0435\u0448 \u043F\u0440\u043E\u0434\u043E\u0432\u0436\u0438\u0442\u0438 \u043D\u0435 \u0437\u0432\u0430\u0436\u0430\u044E\u0447\u0438 \u043D\u0456 \u043D\u0430 \u0449\u043E?
tableStatusLbl=\u0421\u0442\u0430\u043D
tableFileNameLbl=\u0406\u043C'\u044F \u0444\u0430\u0439\u043B\u0443
tableSizeLbl=\u0420\u043E\u0437\u043C\u0456\u0440 (~\u041C\u0431)
tableSizeLbl=\u0420\u043E\u0437\u043C\u0456\u0440
tableUploadLbl=\u0417\u0430\u0432\u0430\u043D\u0442\u0430\u0436.?