diff options
author | Mürsel Türk | 2020-07-07 12:05:21 +0200 |
---|---|---|
committer | Mürsel Türk | 2020-07-07 12:05:21 +0200 |
commit | a9413eba86f5de4e478c26de5ddc525abe5fc71d (patch) | |
tree | 32981f407569dd039bf90d2d5d44bc70b873b713 /dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/LectureListWindowLayout.java | |
parent | [client] Add resource bundle files for helper classes. Update the helper clas... (diff) | |
download | tutor-module-a9413eba86f5de4e478c26de5ddc525abe5fc71d.tar.gz tutor-module-a9413eba86f5de4e478c26de5ddc525abe5fc71d.tar.xz tutor-module-a9413eba86f5de4e478c26de5ddc525abe5fc71d.zip |
[client] Add resource bundle files for window/layout classes. Update the window/layout classes accordingly.
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.java | 38 |
1 files changed, 22 insertions, 16 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 03847488..31ccf5b5 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 @@ -21,6 +21,7 @@ import org.openslx.dozmod.gui.control.table.LectureTable; import org.openslx.dozmod.gui.control.table.QScrollPane; import org.openslx.dozmod.gui.helper.CompositePage; import org.openslx.dozmod.gui.helper.GridManager; +import org.openslx.dozmod.gui.helper.I18n; import org.openslx.dozmod.gui.window.LectureListWindow.FilterType; @SuppressWarnings("serial") @@ -28,14 +29,6 @@ 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 = "Bearbeiten"; - private static final String deleteButtonLabel = "Löschen"; - private static final String switchViewButtonLabel = "VMs zeigen"; - private static final String filterPanelLabel = "Suchen"; - private static final String infoTextString = "Hier können Sie Veranstaltungen anlegen, bearbeiten und löschen."; - // buttons protected final JButton btnNewLecture; protected final JButton btnDeleteLecture; @@ -56,9 +49,9 @@ public abstract class LectureListWindowLayout extends CompositePage { // --------- info group with title and text ------------------------- JPanel infoPanel = new JPanel(new BorderLayout()); - QLabel infoTitle = new QLabel(infoTitleString); + QLabel infoTitle = new QLabel(I18n.WINDOW_LAYOUT.getString("LectureList.Label.title.text")); infoTitle.setFont(infoTitle.getFont().deriveFont(Font.BOLD)); - QLabel infoText = new QLabel(infoTextString); + QLabel infoText = new QLabel(I18n.WINDOW_LAYOUT.getString("LectureList.Label.info.text")); infoPanel.add(infoTitle, BorderLayout.NORTH); infoPanel.add(infoText, BorderLayout.CENTER); // ---------------- end group of title ------------------------------ @@ -69,7 +62,8 @@ public abstract class LectureListWindowLayout extends CompositePage { // filterPanel with filter text field and filter combo JPanel filterPanel = new JPanel(); - filterPanel.setBorder(new TitledBorder(filterPanelLabel)); + filterPanel.setBorder(new TitledBorder( + I18n.WINDOW_LAYOUT.getString("LectureList.TitledBorder.filterPanel.title"))); filterPanel.setLayout(new BoxLayout(filterPanel, BoxLayout.LINE_AXIS)); txtSearch = new JTextField(); cboFilter = new JComboBox<FilterType>(); @@ -82,7 +76,7 @@ public abstract class LectureListWindowLayout extends CompositePage { // Panel for itemCount JPanel lectureCountPanel = new JPanel(); lblVisibleLectureCount = new QLabel(); - lectureCountPanel.add(new JLabel("Sichtbar:")); + lectureCountPanel.add(new JLabel(I18n.WINDOW_LAYOUT.getString("LectureList.Label.visibleLectureCount.text"))); lectureCountPanel.add(lblVisibleLectureCount); filterPanel.add(lectureCountPanel); @@ -104,10 +98,22 @@ 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, 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/delete-icon.png", "Delete Lecture", ICON_SIZE_Y, buttonPanel)); - btnSwitchView = new JButton(switchViewButtonLabel, Gui.getScaledIconResource("/img/switch-icon.png", "Switch", ICON_SIZE_Y, buttonPanel)); + btnNewLecture = new JButton(I18n.WINDOW_LAYOUT.getString("LectureList.Button.newLecture.text"), + Gui.getScaledIconResource("/img/new-lecture-icon.png", + I18n.WINDOW_LAYOUT.getString("LectureList.Button.newLecture.description"), + ICON_SIZE_Y, buttonPanel)); + btnEditLecture = new JButton(I18n.WINDOW_LAYOUT.getString("LectureList.Button.editLecture.text"), + Gui.getScaledIconResource("/img/edit-icon.png", + I18n.WINDOW_LAYOUT.getString("LectureList.Button.editLecture.description"), + ICON_SIZE_Y, buttonPanel)); + btnDeleteLecture = new JButton(I18n.WINDOW_LAYOUT.getString("LectureList.Button.deleteLecture.text"), + Gui.getScaledIconResource("/img/delete-icon.png", + I18n.WINDOW_LAYOUT.getString("LectureList.Button.deleteLecture.description"), + ICON_SIZE_Y, buttonPanel)); + btnSwitchView = new JButton(I18n.WINDOW_LAYOUT.getString("LectureList.Button.switchView.text"), + Gui.getScaledIconResource("/img/switch-icon.png", + I18n.WINDOW_LAYOUT.getString("LectureList.Button.switchView.description"), + ICON_SIZE_Y, buttonPanel)); buttonPanel.add(btnNewLecture); buttonPanel.add(btnEditLecture); buttonPanel.add(Box.createHorizontalStrut(5)); |