summaryrefslogtreecommitdiffstats
path: root/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/ImageListWindowLayout.java
diff options
context:
space:
mode:
authorStephan Schwaer2015-07-13 18:03:49 +0200
committerStephan Schwaer2015-07-13 18:03:49 +0200
commita5b80f89e023e35d4f75db7d705131ed2e7eeda6 (patch)
treea6c87548bcd31db876e3856f2c907fb4eb59c29e /dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/ImageListWindowLayout.java
parent[client] fix IDP combo not beeing enabled when TEST_ACCOUNT auth method is saved (diff)
downloadtutor-module-a5b80f89e023e35d4f75db7d705131ed2e7eeda6.tar.gz
tutor-module-a5b80f89e023e35d4f75db7d705131ed2e7eeda6.tar.xz
tutor-module-a5b80f89e023e35d4f75db7d705131ed2e7eeda6.zip
[client] Added filter and column sorting for the imageList.
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.java28
1 files changed, 25 insertions, 3 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 9defdb34..bccbb509 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
@@ -16,7 +16,7 @@ import org.eclipse.swt.widgets.Table;
import org.eclipse.swt.widgets.Text;
import org.openslx.dozmod.gui.helper.CompositePage;
import org.openslx.dozmod.gui.helper.Gui;
-import org.openslx.dozmod.gui.helper.TableHelper;
+import org.openslx.dozmod.gui.helper.ImageListFilter;
public abstract class ImageListWindowLayout extends CompositePage {
@@ -27,12 +27,14 @@ public abstract class ImageListWindowLayout extends CompositePage {
protected String downloadButtonLabel = "Download";
protected String tableGroupLabel = "Images";
protected String vmInfoGroupLabel = "Detailinformationen";
+ protected String filterGroupLabel = "Filter";
// buttons
protected Button newButton;
protected Button deleteButton;
protected Button editButton;
protected Button downloadButton;
+
// imageDetail texts
protected Text imageSelectedNameLabel;
@@ -42,8 +44,11 @@ public abstract class ImageListWindowLayout extends CompositePage {
protected Text permissionInfo;
protected Text ownerInfo;
protected Text templateInfo;
+
+ protected final Text searchTextField;
protected final TableViewer tableViewer;
+ protected ImageListFilter filter;
protected String infoTextString = "Hier können Sie Virtuelle Maschinen hochladen, herunterladen, bearbeiten und löschen.";
@@ -74,6 +79,7 @@ public abstract class ImageListWindowLayout extends CompositePage {
infoText.setText(infoTextString);
// -- end group of title --
+
// -- group for the table --
Group tableGroup = new Group(this, SWT.BORDER);
tableGroup.setText(tableGroupLabel);
@@ -82,7 +88,22 @@ public abstract class ImageListWindowLayout extends CompositePage {
tgLayoutData.widthHint = 800;
tableGroup.setLayoutData(tgLayoutData);
tableGroup.setLayout(new GridLayout());
-
+
+ // -- group for the filter --
+ Group filterGroup = new Group(tableGroup, SWT.BORDER);
+ filterGroup.setText(filterGroupLabel);
+ GridData fgGridData = new GridData(SWT.FILL, SWT.TOP, true, false);
+ fgGridData.minimumWidth = 400;
+ fgGridData.widthHint = 800;
+ fgGridData.horizontalSpan = 2;
+ filterGroup.setLayoutData(fgGridData);
+ filterGroup.setLayout(new GridLayout());
+
+ // filter text field
+ searchTextField = new Text(filterGroup, SWT.BORDER);
+ searchTextField.setMessage("Name, Verantwortlicher, OS");
+ // -- end group of filter --
+
// table
Table vmTable = new Table(tableGroup, SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL);
GridData tableGridData = new GridData(SWT.FILL, SWT.FILL, true, true);
@@ -93,7 +114,8 @@ public abstract class ImageListWindowLayout extends CompositePage {
// TableViewer on the table
tableViewer = new TableViewer(vmTable);
tableViewer.setContentProvider(ArrayContentProvider.getInstance());
- TableHelper.createImageTableColumns(tableViewer);
+
+
// create, modify, download and delete buttons
Composite buttonComposite = new Composite(tableGroup, SWT.NONE);