diff options
author | Jonathan Bauer | 2015-07-29 17:07:10 +0200 |
---|---|---|
committer | Jonathan Bauer | 2015-07-29 17:07:10 +0200 |
commit | 59782784a3e6ce52d3db84d569fa9e2da10a65cd (patch) | |
tree | aed765c7d71e356044b607c90cc889d8465796e5 /dozentenmodul/src/main/java/org/openslx/dozmod/gui/control | |
parent | [client] register ImageListWindow in MainWindow (diff) | |
download | tutor-module-59782784a3e6ce52d3db84d569fa9e2da10a65cd.tar.gz tutor-module-59782784a3e6ce52d3db84d569fa9e2da10a65cd.tar.xz tutor-module-59782784a3e6ce52d3db84d569fa9e2da10a65cd.zip |
[client] ImageTable now with proper column labeling, finalized ImageListLayout based on BorderLayout
Diffstat (limited to 'dozentenmodul/src/main/java/org/openslx/dozmod/gui/control')
-rw-r--r-- | dozentenmodul/src/main/java/org/openslx/dozmod/gui/control/table/ImageTable.java | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/control/table/ImageTable.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/control/table/ImageTable.java index adf548f1..4ad6472d 100644 --- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/control/table/ImageTable.java +++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/control/table/ImageTable.java @@ -2,13 +2,15 @@ package org.openslx.dozmod.gui.control.table; import org.openslx.bwlp.thrift.iface.ImageSummaryRead; import org.openslx.bwlp.thrift.iface.LectureSummary; +import org.openslx.dozmod.thrift.MetaDataCache; import org.openslx.dozmod.thrift.UserCache; import org.openslx.dozmod.util.FormatHelper; @SuppressWarnings("serial") public class ImageTable extends ListTable<ImageSummaryRead> { - private static String[] columnNames = { "Name", "Verantwortlicher" }; + private static String[] columnNames = + { "Name", "OS", "Verantwortlicher", "Letztes Update", "Größe" }; public ImageTable() { super(columnNames); @@ -20,7 +22,13 @@ public class ImageTable extends ListTable<ImageSummaryRead> { if (columnIndex == 0) return row.getImageName(); if (columnIndex == 1) + return FormatHelper.osName(MetaDataCache.getOsById(row.getOsId())); + if (columnIndex == 2) return FormatHelper.userName(UserCache.find(row.getOwnerId())); + if (columnIndex == 3) + return FormatHelper.longDate(row.getUpdateTime()); + if (columnIndex == 4) + return row.getCurrentVersionId() == null ? "-" : FormatHelper.bytes(row.getFileSize(), false); throw new IndexOutOfBoundsException(); } |