summaryrefslogtreecommitdiffstats
path: root/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/ImageListWindowLayout.java
diff options
context:
space:
mode:
authorSimon Rettberg2016-02-02 12:38:54 +0100
committerSimon Rettberg2016-02-02 12:38:54 +0100
commit2b18a8ec42ddc282bb176f25944983493ff37dd7 (patch)
treea31a29f181ab538c38b9000dc765d67c2b836934 /dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/ImageListWindowLayout.java
parent[client] Sanitize messy button-enabling-code in ImageListWindow (diff)
downloadtutor-module-2b18a8ec42ddc282bb176f25944983493ff37dd7.tar.gz
tutor-module-2b18a8ec42ddc282bb176f25944983493ff37dd7.tar.xz
tutor-module-2b18a8ec42ddc282bb176f25944983493ff37dd7.zip
[client] Add icons to lecture and image list buttons
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.java29
1 files changed, 17 insertions, 12 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 1fa98797..f401dba9 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
@@ -1,16 +1,19 @@
package org.openslx.dozmod.gui.window.layout;
import java.awt.BorderLayout;
-import java.awt.Dimension;
import java.awt.Font;
import javax.swing.BorderFactory;
import javax.swing.Box;
import javax.swing.BoxLayout;
+import javax.swing.GroupLayout;
import javax.swing.JButton;
import javax.swing.JPanel;
+import javax.swing.JSeparator;
+import javax.swing.SwingConstants;
import org.apache.log4j.Logger;
+import org.openslx.dozmod.gui.Gui;
import org.openslx.dozmod.gui.control.ImageListViewer;
import org.openslx.dozmod.gui.control.ImageListViewer.FilterType;
import org.openslx.dozmod.gui.control.QLabel;
@@ -21,12 +24,14 @@ import org.openslx.dozmod.gui.helper.GridManager;
public abstract class ImageListWindowLayout extends CompositePage {
private final static Logger LOGGER = Logger.getLogger(ImageListWindowLayout.class);
+
+ private static final int ICON_SIZE_Y = 24;
protected final static String infoTextString = "Hier können Sie Virtuelle Maschinen hochladen, herunterladen, bearbeiten und löschen.";
protected final static String infoTitleString = "Übersicht Virtuelle Maschinen";
protected final static String newButtonLabel = "Neue VM";
protected final static String newLectureButtonLabel = "Neue Veranstaltung";
- protected final static String editButtonLabel = "Detailansicht";
+ protected final static String editButtonLabel = "Detailansicht / Bearbeiten";
protected final static String downloadButtonLabel = "Download";
protected final static String deleteButtonLabel = "Löschen";
protected final static String switchViewButtonLabel = "Zu 'Veranstaltungen' wechseln";
@@ -61,19 +66,19 @@ public abstract class ImageListWindowLayout extends CompositePage {
JPanel buttonPanel = new JPanel();
buttonPanel.setBorder(BorderFactory.createEmptyBorder(5, 0, 0, 0));
buttonPanel.setLayout(new BoxLayout(buttonPanel, BoxLayout.LINE_AXIS));
- btnNewVm = new JButton(newButtonLabel);
- btnNewLecture = new JButton(newLectureButtonLabel);
- btnDelete = new JButton(deleteButtonLabel);
- btnEditDetails = new JButton(editButtonLabel);
- btnDownload = new JButton(downloadButtonLabel);
- btnSwitchView = new JButton(switchViewButtonLabel);
+ btnNewVm = new JButton(newButtonLabel, Gui.getScaledIconResource("/img/new-icon.png", "New VM", ICON_SIZE_Y, buttonPanel));
+ btnEditDetails = new JButton(editButtonLabel, Gui.getScaledIconResource("/img/edit-icon.png", "Edit VM", ICON_SIZE_Y, buttonPanel));
+ btnDelete = new JButton(deleteButtonLabel, Gui.getScaledIconResource("/img/red-cross.png", "Delete VM", ICON_SIZE_Y, buttonPanel));
+ btnDownload = new JButton(downloadButtonLabel, Gui.getScaledIconResource("/img/download-icon.png", "New VM", ICON_SIZE_Y, buttonPanel));
+ btnNewLecture = new JButton(newLectureButtonLabel, Gui.getScaledIconResource("/img/new-lecture-icon.png", "New Lecture", ICON_SIZE_Y, buttonPanel));
+ btnSwitchView = new JButton(switchViewButtonLabel, Gui.getScaledIconResource("/img/switch-icon.png", "Switch", ICON_SIZE_Y, buttonPanel));
buttonPanel.add(btnNewVm);
- buttonPanel.add(Box.createRigidArea(new Dimension(5, 0)));
- buttonPanel.add(btnNewLecture);
buttonPanel.add(btnEditDetails);
- buttonPanel.add(btnDownload);
- buttonPanel.add(Box.createRigidArea(new Dimension(5, 0)));
buttonPanel.add(btnDelete);
+ buttonPanel.add(Box.createHorizontalStrut(5));
+ buttonPanel.add(btnDownload);
+ buttonPanel.add(Box.createHorizontalStrut(5));
+ buttonPanel.add(btnNewLecture);
buttonPanel.add(Box.createHorizontalGlue());
buttonPanel.add(btnSwitchView);