format length in shared file stable an resize columns

pull/4/head
Zlatin Balevsky 2019-06-04 14:05:33 +01:00
parent de2753ac50
commit 404d5b60bc
1 changed files with 3 additions and 2 deletions

View File

@ -129,8 +129,9 @@ class MainFrameView {
scrollPane ( constraints : BorderLayout.CENTER) {
table(id : "shared-files-table") {
tableModel(list : model.shared) {
closureColumn(header : "Name", type : String, read : {row -> row.file.getAbsolutePath()})
closureColumn(header : "Size", type : Long, read : {row -> row.file.length()})
closureColumn(header : "Name", preferredWidth : 550, type : String, read : {row -> row.file.getAbsolutePath()})
closureColumn(header : "Size", preferredWidth : 50, type : String,
read : {row -> DataHelper.formatSize2Decimal(row.file.length(),false) + "B"})
}
}
}