summaryrefslogtreecommitdiffstats
path: root/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/ImageListWindowLayout.java
diff options
context:
space:
mode:
authorStephan Schwaer2015-07-09 16:33:29 +0200
committerStephan Schwaer2015-07-09 16:33:29 +0200
commit15727be8b551f7eecd597656b592622b825642f6 (patch)
treec0247007051be4cc3701eb93deb6c0691737d212 /dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/ImageListWindowLayout.java
parent[client] Added comments and improved readability of code. (diff)
parent[client] fixed buttons of disclaimer/vmware license (diff)
downloadtutor-module-15727be8b551f7eecd597656b592622b825642f6.tar.gz
tutor-module-15727be8b551f7eecd597656b592622b825642f6.tar.xz
tutor-module-15727be8b551f7eecd597656b592622b825642f6.zip
Merge branch 'v1.1' of git.openslx.org:openslx-ng/tutor-module into v1.1
Conflicts: dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/ImageListWindowLayout.java
Diffstat (limited to 'dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/ImageListWindowLayout.java')
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/ImageListWindowLayout.java31
1 files changed, 5 insertions, 26 deletions
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/ImageListWindowLayout.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/ImageListWindowLayout.java
index d0663c82..ca73bc29 100644
--- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/ImageListWindowLayout.java
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/ImageListWindowLayout.java
@@ -3,7 +3,6 @@ package org.openslx.dozmod.gui.window.layout;
import java.text.SimpleDateFormat;
import java.util.Date;
-import java.util.LinkedList;
import org.eclipse.jface.viewers.ArrayContentProvider;
import org.eclipse.jface.viewers.ISelectionChangedListener;
@@ -57,11 +56,13 @@ public abstract class ImageListWindowLayout extends Composite {
protected Text permissionInfo;
protected Text ownerInfo;
protected Text templateInfo;
+
+ protected final TableViewer tableViewer;
protected String infoTextString = "Hier können Sie images erstellen, bearbeiten und löschen.";
- public ImageListWindowLayout(Composite mainShell) {
+ public ImageListWindowLayout(final Composite mainShell) {
super(mainShell, SWT.NONE);
// the layout and layoutData of the ImageListWindow
@@ -107,33 +108,11 @@ public abstract class ImageListWindowLayout extends Composite {
vmTable.setLinesVisible(true);
// TableViewer on the table
- final TableViewer tableViewer = new TableViewer(vmTable);
+ tableViewer = new TableViewer(vmTable);
tableViewer.setContentProvider(ArrayContentProvider.getInstance());
- // For testing
- ImageSummaryRead imageSummary = new ImageSummaryRead();
- imageSummary.setImageName("Windoof");
- imageSummary.setOsId(1);
- LinkedList<ImageSummaryRead> list = new LinkedList<>();
- imageSummary.setUserPermissions(new ImagePermissions(true, true, false, false));
- imageSummary.setUpdateTime(505050550);
- imageSummary.setOwnerId("2");
- imageSummary.setImageBaseId("8");
- imageSummary.setCurrentVersionId("8.12");
- list.add(imageSummary);
-
- ImageSummaryRead imageSummary2 = new ImageSummaryRead();
- imageSummary2.setImageName("Linuksch");
- imageSummary2.setOsId(2);
- list.add(imageSummary2);
-
- // The List to be displayed in the viewer
- tableViewer.setInput(list);
- TableHelper.createImageTableColumns(tableViewer);
- tableViewer.refresh();
-
- // create, modify, download and delete buttons
+ // create, modify, download and delete buttons
Composite buttonComposite = new Composite(tableGroup, SWT.NONE);
GridData buttonComositeGridData = new GridData(SWT.FILL, SWT.FILL, true, false);
buttonComositeGridData.horizontalSpan = 4;