summaryrefslogtreecommitdiffstats
path: root/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/LectureListWindowLayout.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/LectureListWindowLayout.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/LectureListWindowLayout.java')
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/LectureListWindowLayout.java16
1 files changed, 9 insertions, 7 deletions
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/LectureListWindowLayout.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/LectureListWindowLayout.java
index 7aee0f30..a2c1e46a 100644
--- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/LectureListWindowLayout.java
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/LectureListWindowLayout.java
@@ -16,6 +16,7 @@ import javax.swing.JTextField;
import javax.swing.UIManager;
import javax.swing.border.TitledBorder;
+import org.openslx.dozmod.gui.Gui;
import org.openslx.dozmod.gui.control.QLabel;
import org.openslx.dozmod.gui.control.table.LectureTable;
import org.openslx.dozmod.gui.control.table.QScrollPane;
@@ -25,10 +26,12 @@ import org.openslx.dozmod.gui.window.LectureListWindow.FilterType;
@SuppressWarnings("serial")
public abstract class LectureListWindowLayout extends CompositePage {
+
+ private static final int ICON_SIZE_Y = 24;
private static final String infoTitleString = "Übersicht Veranstaltungen";
private static final String newButtonLabel = "Neue Veranstaltung";
- private static final String editButtonLabel = "Detailansicht";
+ private static final String editButtonLabel = "Detailansicht / Bearbeiten";
private static final String deleteButtonLabel = "Löschen";
private static final String switchViewButtonLabel = "Zu 'Images' wechseln";
private static final String filterPanelLabel = "Suchen";
@@ -102,16 +105,15 @@ public abstract class LectureListWindowLayout extends CompositePage {
buttonPanel.setLayout(new BoxLayout(buttonPanel, BoxLayout.LINE_AXIS));
buttonPanel.setBorder(BorderFactory.createEmptyBorder(5, 0, 0, 0));
- btnNewLecture = new JButton(newButtonLabel);
+ btnNewLecture = new JButton(newButtonLabel, Gui.getScaledIconResource("/img/new-lecture-icon.png", "New Lecture", ICON_SIZE_Y, buttonPanel));
+ btnEditLecture = new JButton(editButtonLabel, Gui.getScaledIconResource("/img/edit-icon.png", "Edit Lecture", ICON_SIZE_Y, buttonPanel));
+ btnDeleteLecture = new JButton(deleteButtonLabel, Gui.getScaledIconResource("/img/red-cross.png", "Delete Lecture", ICON_SIZE_Y, buttonPanel));
+ btnSwitchView = new JButton(switchViewButtonLabel, Gui.getScaledIconResource("/img/switch-icon.png", "Switch", ICON_SIZE_Y, buttonPanel));
buttonPanel.add(btnNewLecture);
- buttonPanel.add(Box.createRigidArea(new Dimension(5, 0)));
- btnEditLecture = new JButton(editButtonLabel);
buttonPanel.add(btnEditLecture);
- buttonPanel.add(Box.createRigidArea(new Dimension(5, 0)));
- btnDeleteLecture = new JButton(deleteButtonLabel);
+ buttonPanel.add(Box.createHorizontalStrut(5));
buttonPanel.add(btnDeleteLecture);
buttonPanel.add(Box.createHorizontalGlue());
- btnSwitchView = new JButton(switchViewButtonLabel);
buttonPanel.add(btnSwitchView);
// ----------------- end group for table -------------------------