summaryrefslogtreecommitdiffstats
path: root/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/ImageListWindowLayout.java
diff options
context:
space:
mode:
authorStephan Schwaer2015-08-25 17:50:56 +0200
committerStephan Schwaer2015-08-25 17:50:56 +0200
commit5ebff25e09415f632a129f5df5478064496dcc8e (patch)
tree12c42bbbdc43e9f90e5ebe368cc9e854bbec3bd3 /dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/ImageListWindowLayout.java
parent[client] fix description label beeing sucky (diff)
downloadtutor-module-5ebff25e09415f632a129f5df5478064496dcc8e.tar.gz
tutor-module-5ebff25e09415f632a129f5df5478064496dcc8e.tar.xz
tutor-module-5ebff25e09415f632a129f5df5478064496dcc8e.zip
[client] Extracted ImageList from imageListWindow to ImageListViewer.
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.java62
1 files changed, 11 insertions, 51 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 1343127d..6e071c2d 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,16 +7,12 @@ import java.awt.Font;
import javax.swing.Box;
import javax.swing.BoxLayout;
import javax.swing.JButton;
-import javax.swing.JComboBox;
import javax.swing.JLabel;
import javax.swing.JPanel;
-import javax.swing.JScrollPane;
-import javax.swing.JTextField;
import org.apache.log4j.Logger;
-import org.openslx.dozmod.gui.control.table.ImageTable;
+import org.openslx.dozmod.gui.control.ImageListViewer;
import org.openslx.dozmod.gui.helper.CompositePage;
-import org.openslx.dozmod.gui.helper.GridPos;
public abstract class ImageListWindowLayout extends CompositePage {
@@ -31,20 +27,15 @@ public abstract class ImageListWindowLayout extends CompositePage {
protected final static String downloadButtonLabel = "Download";
protected final static String deleteButtonLabel = "Löschen";
protected final static String backButtonLabel = "Zurück";
- protected final static String tableGroupLabel = "Images";
- protected final static String filterGroupLabel = "Filter";
- protected final static String[] filterLabels = {"Alle anzeigen", "Nur eigene Anzeigen", "Nur editierbare anzeigen", "Nur Vorlagen zeigen"};
// --------------------------------------
// search field, table and buttons
- protected JTextField searchTextField;
- protected ImageTable imageTable;
- protected JButton newButton;
- protected JButton newLectureButton;
- protected JButton downloadButton;
- protected JButton deleteButton;
- protected JButton backButton;
- protected JComboBox<String> filterCbo;
+ protected final ImageListViewer imageListViewer;
+ protected final JButton newButton;
+ protected final JButton newLectureButton;
+ protected final JButton downloadButton;
+ protected final JButton deleteButton;
+ protected final JButton backButton;
public ImageListWindowLayout() {
@@ -59,25 +50,9 @@ public abstract class ImageListWindowLayout extends CompositePage {
infoPanel.add(infoTitle, BorderLayout.NORTH);
infoPanel.add(infoText, BorderLayout.CENTER);
add(infoPanel, BorderLayout.NORTH);
-
- // --------------------------------------
- // the panel for the table and search field
- JPanel listPanel = new JPanel(new BorderLayout());
- // the search field and filter combo box
- JPanel filterPanel = new JPanel();
- filterPanel.setLayout(new BoxLayout(filterPanel, BoxLayout.LINE_AXIS));
- searchTextField = new JTextField();
- filterCbo = new JComboBox<String>();
- for (String s: filterLabels){
- filterCbo.addItem(s);
- }
- filterPanel.add(searchTextField);
- filterPanel.add(filterCbo);
- listPanel.add(filterPanel, BorderLayout.NORTH);
- // the actual table
- imageTable = new ImageTable();
- listPanel.add(new JScrollPane(imageTable), BorderLayout.CENTER);
- add(listPanel, BorderLayout.CENTER);
+
+ imageListViewer = new ImageListViewer();
+ add(imageListViewer, BorderLayout.CENTER);
// --------------------------------------
// the buttons at the bottom
@@ -95,22 +70,7 @@ public abstract class ImageListWindowLayout extends CompositePage {
buttonPanel.add(deleteButton);
buttonPanel.add(Box.createHorizontalGlue());
buttonPanel.add(backButton);
- listPanel.add(buttonPanel, BorderLayout.PAGE_END);
+ add(buttonPanel, BorderLayout.PAGE_END);
}
- /**
- * @param captionString
- * @param group
- * @param row
- * @return
- */
- public JTextField createCaptionAndTextfield(String captionString, JPanel group, int row) {
- JLabel caption = new JLabel(captionString);
- JTextField textField = new JTextField();
- textField.setEditable(false);
- caption.setText(captionString);
- group.add(caption, GridPos.get(0, row));
- group.add(textField, GridPos.get(1, row, true, false));
- return textField;
- }
}