summaryrefslogtreecommitdiffstats
path: root/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/ImageListWindowLayout.java
diff options
context:
space:
mode:
authorStephan Schwaer2015-08-11 14:58:37 +0200
committerStephan Schwaer2015-08-11 14:58:37 +0200
commit906283670063afa45e9a9591a1a3f6d71fbe529f (patch)
tree90855bb406d967b92909a176563c5791ebe5f570 /dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/ImageListWindowLayout.java
parent[client] Experimental code for adjusting font size (diff)
downloadtutor-module-906283670063afa45e9a9591a1a3f6d71fbe529f.tar.gz
tutor-module-906283670063afa45e9a9591a1a3f6d71fbe529f.tar.xz
tutor-module-906283670063afa45e9a9591a1a3f6d71fbe529f.zip
[client] added combo and filter to filter imagelist for editable and own images.
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.java16
1 files changed, 14 insertions, 2 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 56f38c98..4138c0b8 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
@@ -7,6 +7,8 @@ import java.awt.Font;
import javax.swing.Box;
import javax.swing.BoxLayout;
import javax.swing.JButton;
+import javax.swing.JCheckBox;
+import javax.swing.JComboBox;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
@@ -32,6 +34,7 @@ public abstract class ImageListWindowLayout extends CompositePage {
protected final static String backButtonLabel = "Zurück";
protected final static String tableGroupLabel = "Images";
protected final static String filterGroupLabel = "Filter";
+ protected final static String[] showOwnedLabel = {"Alle anzeigen", "Nur eigene Anzeigen", "Nur editierbare anzeigen"};
// --------------------------------------
// search field, table and buttons
@@ -42,6 +45,7 @@ public abstract class ImageListWindowLayout extends CompositePage {
protected JButton downloadButton;
protected JButton deleteButton;
protected JButton backButton;
+ protected JComboBox<String> showOwned;
public ImageListWindowLayout() {
@@ -60,9 +64,17 @@ public abstract class ImageListWindowLayout extends CompositePage {
// --------------------------------------
// the panel for the table and search field
JPanel listPanel = new JPanel(new BorderLayout());
- // the search field
+ // the search field and show only owned images checkbox
+ JPanel filterPanel = new JPanel();
+ filterPanel.setLayout(new BoxLayout(filterPanel, BoxLayout.LINE_AXIS));
searchTextField = new JTextField();
- listPanel.add(searchTextField, BorderLayout.NORTH);
+ showOwned = new JComboBox<String>();
+ for (String s: showOwnedLabel){
+ showOwned.addItem(s);
+ }
+ filterPanel.add(searchTextField);
+ filterPanel.add(showOwned);
+ listPanel.add(filterPanel, BorderLayout.NORTH);
// the actual table
imageTable = new ImageTable();
listPanel.add(new JScrollPane(imageTable), BorderLayout.CENTER);