summaryrefslogtreecommitdiffstats
path: root/dozentenmodul/src/main/java/org/openslx/dozmod/gui/control/table
diff options
context:
space:
mode:
authorJonathan Bauer2016-08-30 15:32:15 +0200
committerJonathan Bauer2016-08-30 15:32:15 +0200
commite4c4df9f0d7a6806d77386ff497e6b82461ec4cd (patch)
tree30e9b6f634e346175b0b7c78b8d6eb0f0d6202af /dozentenmodul/src/main/java/org/openslx/dozmod/gui/control/table
parent[client] started rudimentary VMX editor (diff)
downloadtutor-module-e4c4df9f0d7a6806d77386ff497e6b82461ec4cd.tar.gz
tutor-module-e4c4df9f0d7a6806d77386ff497e6b82461ec4cd.tar.xz
tutor-module-e4c4df9f0d7a6806d77386ff497e6b82461ec4cd.zip
[client] added "expires" column in ImageTable + increased MainWindow width a bit
Diffstat (limited to 'dozentenmodul/src/main/java/org/openslx/dozmod/gui/control/table')
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/gui/control/table/ImageTable.java7
1 files changed, 5 insertions, 2 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 4741e291..92f27a55 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
@@ -15,6 +15,7 @@ public class ImageTable extends ListTable<ImageSummaryRead> {
public static final ListTableColumn COL_USABLE = new ListTableColumn("Verwendbar", Boolean.class);
public static final ListTableColumn COL_SIZE = new ListTableColumn("Größe", Long.class);
public static final ListTableColumn COL_LASTCHANGE = new ListTableColumn("Geändert", Long.class);
+ public static final ListTableColumn COL_EXPIRING = new ListTableColumn("Ablaufdatum", Long.class);
public static final ListTableColumn COL_OWNER = new ListTableColumn("Besitzer", Sorters.userNameById);
public static final ListTableColumn COL_OS = new ListTableColumn("OS", Integer.class, Sorters.osNameById);
public static final ListTableColumn COL_NAME = new ListTableColumn("Name");
@@ -31,7 +32,7 @@ public class ImageTable extends ListTable<ImageSummaryRead> {
return -1;
return o1.imageBaseId.compareTo(o2.imageBaseId);
}
- }, COL_NAME, COL_OS, COL_OWNER, COL_LASTCHANGE, COL_SIZE, COL_USABLE, COL_TEMPLATE);
+ }, COL_NAME, COL_OS, COL_OWNER, COL_LASTCHANGE, COL_EXPIRING, COL_SIZE, COL_USABLE, COL_TEMPLATE);
}
// return the right value of our image (row) depending on given column
@@ -45,6 +46,8 @@ public class ImageTable extends ListTable<ImageSummaryRead> {
return row.getOwnerId();
if (column == COL_LASTCHANGE)
return row.getUpdateTime();
+ if (column == COL_EXPIRING)
+ return row.getExpireTime();
if (column == COL_SIZE)
return row.getFileSize();
if (column == COL_USABLE)
@@ -62,7 +65,7 @@ public class ImageTable extends ListTable<ImageSummaryRead> {
return FormatHelper.osName(MetaDataCache.getOsById((int) value, true));
if (column == COL_OWNER)
return FormatHelper.userName(UserCache.find((String) value));
- if (column == COL_LASTCHANGE)
+ if (column == COL_LASTCHANGE || column == COL_EXPIRING)
return FormatHelper.shortDate((long) value);
if (column == COL_SIZE)
return FormatHelper.bytes((long) value, false);