diff options
| author | Nino Breuer | 2014-11-18 17:45:10 +0100 |
|---|---|---|
| committer | Nino Breuer | 2014-11-18 17:45:10 +0100 |
| commit | 6916dd363f978873e61f853adfe1161b14f6fa90 (patch) | |
| tree | d9ff0167cc858122eee9d40044286b5945d5c004 /dozentenmodul/src/main/java/gui/image/SearchImage_GUI.java | |
| parent | • fixed tooltip-texts for radio buttons (diff) | |
| download | tutor-module-6916dd363f978873e61f853adfe1161b14f6fa90.tar.gz tutor-module-6916dd363f978873e61f853adfe1161b14f6fa90.tar.xz tutor-module-6916dd363f978873e61f853adfe1161b14f6fa90.zip | |
• added restriction as students are only allowed to download images without licensed software
Diffstat (limited to 'dozentenmodul/src/main/java/gui/image/SearchImage_GUI.java')
| -rw-r--r-- | dozentenmodul/src/main/java/gui/image/SearchImage_GUI.java | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/dozentenmodul/src/main/java/gui/image/SearchImage_GUI.java b/dozentenmodul/src/main/java/gui/image/SearchImage_GUI.java index ba57605f..f63ed9ed 100644 --- a/dozentenmodul/src/main/java/gui/image/SearchImage_GUI.java +++ b/dozentenmodul/src/main/java/gui/image/SearchImage_GUI.java @@ -95,6 +95,7 @@ public class SearchImage_GUI extends JFrame { JTable tablePublicVorlagen;
private JTextField textFieldName;
JTabbedPane tabbedPane;
+ JButton btnDownload;
boolean activeSearch = false;
Component c = null;
String[] titles = { "Name", "Lizenzpflichtig", "OS", "Veranstaltung",
@@ -571,7 +572,8 @@ public class SearchImage_GUI extends JFrame { .getSelectedRow()), 7)
.toString();
writeImageData(imageid, version);
- }
+
+ }
}
@@ -606,7 +608,7 @@ public class SearchImage_GUI extends JFrame { tabbedPane.addTab("bwLehrpool", null, scrollPaneCoopImages, null);
tabbedPane.setEnabledAt(3, false);
- JButton btnDownload = new JButton("Download");
+ btnDownload = new JButton("Download");
btnDownload.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent arg0) {
// oeffnet den Downloader
@@ -1161,6 +1163,15 @@ public class SearchImage_GUI extends JFrame { }
labelWeitereVerantwortliche.setToolTipText(labelWeitereVerantwortliche.getText());
+ if(person.verantwortlicher.getRole() == "Student" && labelLizenzSoftware.getText().trim() == "Ja")
+ {
+ btnDownload.setEnabled(false);
+ }
+ else
+ {
+ btnDownload.setEnabled(true);
+ }
+
} catch (TException | ParseException e1) {
e1.printStackTrace();
|
