diff options
| author | Michael Wilson | 2014-09-04 10:09:55 +0200 |
|---|---|---|
| committer | Michael Wilson | 2014-09-04 10:09:55 +0200 |
| commit | e57ff11badf2cbf1341388f03281f25333516b69 (patch) | |
| tree | da5d8b26d99fafa8a2e71530791f82d49b5d7255 | |
| parent | Merge branch 'master' of ssh://git.openslx.org/openslx-ng/tutor-module (diff) | |
| download | tutor-module-e57ff11badf2cbf1341388f03281f25333516b69.tar.gz tutor-module-e57ff11badf2cbf1341388f03281f25333516b69.tar.xz tutor-module-e57ff11badf2cbf1341388f03281f25333516b69.zip | |
-Spalte "Veranstaltung" wurd bei allen Image-Suchen entfernt
15 files changed, 503 insertions, 405 deletions
diff --git a/Dozentenmodul/bin/ftp/DownloadTask.class b/Dozentenmodul/bin/ftp/DownloadTask.class Binary files differindex bb492684..3c5b428e 100644 --- a/Dozentenmodul/bin/ftp/DownloadTask.class +++ b/Dozentenmodul/bin/ftp/DownloadTask.class diff --git a/Dozentenmodul/bin/ftp/UploadTask.class b/Dozentenmodul/bin/ftp/UploadTask.class Binary files differindex 14019ffd..dd120af3 100644 --- a/Dozentenmodul/bin/ftp/UploadTask.class +++ b/Dozentenmodul/bin/ftp/UploadTask.class diff --git a/Dozentenmodul/bin/gui/image/CreateImageAllgemein_GUI.class b/Dozentenmodul/bin/gui/image/CreateImageAllgemein_GUI.class Binary files differindex d4c6242c..500bfac4 100644 --- a/Dozentenmodul/bin/gui/image/CreateImageAllgemein_GUI.class +++ b/Dozentenmodul/bin/gui/image/CreateImageAllgemein_GUI.class diff --git a/Dozentenmodul/bin/gui/image/DeleteImage_GUI.class b/Dozentenmodul/bin/gui/image/DeleteImage_GUI.class Binary files differindex ab70d486..5c249692 100644 --- a/Dozentenmodul/bin/gui/image/DeleteImage_GUI.class +++ b/Dozentenmodul/bin/gui/image/DeleteImage_GUI.class diff --git a/Dozentenmodul/bin/gui/image/EditImageAllgemein_GUI.class b/Dozentenmodul/bin/gui/image/EditImageAllgemein_GUI.class Binary files differindex 01b969b1..bfe5671b 100644 --- a/Dozentenmodul/bin/gui/image/EditImageAllgemein_GUI.class +++ b/Dozentenmodul/bin/gui/image/EditImageAllgemein_GUI.class diff --git a/Dozentenmodul/bin/gui/image/SearchEditImage_GUI.class b/Dozentenmodul/bin/gui/image/SearchEditImage_GUI.class Binary files differindex a7630ef5..1c5776ea 100644 --- a/Dozentenmodul/bin/gui/image/SearchEditImage_GUI.class +++ b/Dozentenmodul/bin/gui/image/SearchEditImage_GUI.class diff --git a/Dozentenmodul/bin/gui/image/SearchImage_GUI.class b/Dozentenmodul/bin/gui/image/SearchImage_GUI.class Binary files differindex dba5ac5c..6372b9e4 100644 --- a/Dozentenmodul/bin/gui/image/SearchImage_GUI.class +++ b/Dozentenmodul/bin/gui/image/SearchImage_GUI.class diff --git a/Dozentenmodul/bin/gui/intro/Login_GUI.class b/Dozentenmodul/bin/gui/intro/Login_GUI.class Binary files differindex aeeb9b6d..ebb8146c 100644 --- a/Dozentenmodul/bin/gui/intro/Login_GUI.class +++ b/Dozentenmodul/bin/gui/intro/Login_GUI.class diff --git a/Dozentenmodul/bin/gui/lecture/CreateLectureAllgemein_GUI.class b/Dozentenmodul/bin/gui/lecture/CreateLectureAllgemein_GUI.class Binary files differindex d1cdfdee..02f6877a 100644 --- a/Dozentenmodul/bin/gui/lecture/CreateLectureAllgemein_GUI.class +++ b/Dozentenmodul/bin/gui/lecture/CreateLectureAllgemein_GUI.class diff --git a/Dozentenmodul/src/gui/image/SearchEditImage_GUI.java b/Dozentenmodul/src/gui/image/SearchEditImage_GUI.java index 3ba6033d..df36e4a4 100644 --- a/Dozentenmodul/src/gui/image/SearchEditImage_GUI.java +++ b/Dozentenmodul/src/gui/image/SearchEditImage_GUI.java @@ -92,8 +92,17 @@ public class SearchEditImage_GUI extends JFrame { boolean activeSearch = false; private JTextField textFieldName; JTabbedPane tabbedPane; - String[] titles = { "Name", "Lizenzpflichtig", "OS", "Veranstaltung","Verantwortlicher", "Letztes Update", "ID", "Version", "Template" }; - //String[] titles = { "Name", "Lizenzpflichtig", "OS", "Verantwortlicher", "Letztes Update", "ID", "Version", "Template" }; + String[] titles = { "Name", "Lizenzpflichtig", "OS", "Veranstaltung", + "Verantwortlicher", "Letztes Update", "ID", "Version", "Template" };// Angezeigt + // werden + // aber + // nur + // Name (0), + // OS (2), + // Verantwortlicher (4), + // Letztes + // Update (5) + ThriftConnection con = new ThriftConnection(); Client client = models.Client.clientcon.getClient(); final DefaultTableModel modelAll = new DefaultTableModel(titles, 0) { @@ -136,9 +145,19 @@ public class SearchEditImage_GUI extends JFrame { initTableModel(modelMyImages); initTableModel(modelAll); initTableModel(modelPublicVorlagen); + + //auszublendende Angaben + //1=Lizenzpflichtig + //3=Veranstaltung + //6=ID + //7=Version + //8=Template tablemyImages.getColumnModel().getColumn(1).setWidth(0); tablemyImages.getColumnModel().getColumn(1).setMinWidth(0); tablemyImages.getColumnModel().getColumn(1).setMaxWidth(0); + tablemyImages.getColumnModel().getColumn(3).setWidth(0); + tablemyImages.getColumnModel().getColumn(3).setMinWidth(0); + tablemyImages.getColumnModel().getColumn(3).setMaxWidth(0); tablemyImages.getColumnModel().getColumn(8).setWidth(0); tablemyImages.getColumnModel().getColumn(8).setMinWidth(0); tablemyImages.getColumnModel().getColumn(8).setMaxWidth(0); @@ -148,11 +167,17 @@ public class SearchEditImage_GUI extends JFrame { tablemyImages.getColumnModel().getColumn(7).setWidth(0); tablemyImages.getColumnModel().getColumn(7).setMinWidth(0); tablemyImages.getColumnModel().getColumn(7).setMaxWidth(0); + tablePublicVorlagen.getColumnModel().getColumn(1).setWidth(0); tablePublicVorlagen.getColumnModel().getColumn(1) .setMinWidth(0); tablePublicVorlagen.getColumnModel().getColumn(1) .setMaxWidth(0); + tablePublicVorlagen.getColumnModel().getColumn(3).setWidth(0); + tablePublicVorlagen.getColumnModel().getColumn(3) + .setMinWidth(0); + tablePublicVorlagen.getColumnModel().getColumn(3) + .setMaxWidth(0); tablePublicVorlagen.getColumnModel().getColumn(8).setWidth(0); tablePublicVorlagen.getColumnModel().getColumn(8) .setMinWidth(0); @@ -168,9 +193,13 @@ public class SearchEditImage_GUI extends JFrame { .setMinWidth(0); tablePublicVorlagen.getColumnModel().getColumn(7) .setMaxWidth(0); + tableAllImages.getColumnModel().getColumn(1).setWidth(0); tableAllImages.getColumnModel().getColumn(1).setMinWidth(0); tableAllImages.getColumnModel().getColumn(1).setMaxWidth(0); + tableAllImages.getColumnModel().getColumn(3).setWidth(0); + tableAllImages.getColumnModel().getColumn(3).setMinWidth(0); + tableAllImages.getColumnModel().getColumn(3).setMaxWidth(0); tableAllImages.getColumnModel().getColumn(8).setWidth(0); tableAllImages.getColumnModel().getColumn(8).setMinWidth(0); tableAllImages.getColumnModel().getColumn(8).setMaxWidth(0); diff --git a/Dozentenmodul/src/gui/image/SearchImage_GUI.java b/Dozentenmodul/src/gui/image/SearchImage_GUI.java index 2e808c42..5232dc06 100644 --- a/Dozentenmodul/src/gui/image/SearchImage_GUI.java +++ b/Dozentenmodul/src/gui/image/SearchImage_GUI.java @@ -96,7 +96,19 @@ public class SearchImage_GUI extends JFrame { JTabbedPane tabbedPane;
boolean activeSearch = false;
String[] titles = { "Name", "Lizenzpflichtig", "OS", "Veranstaltung",
- "Verantwortlicher", "Letztes Update", "ID", "Version", "Template" };
+ "Verantwortlicher", "Letztes Update", "ID", "Version", "Template" }; // Angezeigt
+ // werden
+ // aber
+ // nur
+ // Name
+ // (0),
+ // OS
+ // (2),
+ // Verantwortlicher
+ // (4),
+ // Letztes
+ // Update
+ // (5)
ThriftConnection con = new ThriftConnection();
Client client = models.Client.clientcon.getClient();
final DefaultTableModel modelAll = new DefaultTableModel(titles, 0) {
@@ -121,7 +133,6 @@ public class SearchImage_GUI extends JFrame { modelMyImages);
final TableRowSorter<TableModel> rowSorterPublicVorlagen = new TableRowSorter<TableModel>(
modelPublicVorlagen);
-
/**
* Create the dialog.
@@ -140,9 +151,19 @@ public class SearchImage_GUI extends JFrame { initTableModel(modelAll);
initTableModel(modelMyImages);
initTableModel(modelPublicVorlagen);
+
+ // auszublendende Angaben
+ // 1=Lizenzpflichtig
+ // 3=Veranstaltung
+ // 6=ID
+ // 7=Version
+ // 8=Template
tablemyImages.getColumnModel().getColumn(1).setWidth(0);
tablemyImages.getColumnModel().getColumn(1).setMinWidth(0);
tablemyImages.getColumnModel().getColumn(1).setMaxWidth(0);
+ tablemyImages.getColumnModel().getColumn(3).setWidth(0);
+ tablemyImages.getColumnModel().getColumn(3).setMinWidth(0);
+ tablemyImages.getColumnModel().getColumn(3).setMaxWidth(0);
tablemyImages.getColumnModel().getColumn(8).setWidth(0);
tablemyImages.getColumnModel().getColumn(8).setMinWidth(0);
tablemyImages.getColumnModel().getColumn(8).setMaxWidth(0);
@@ -152,21 +173,39 @@ public class SearchImage_GUI extends JFrame { tablemyImages.getColumnModel().getColumn(7).setWidth(0);
tablemyImages.getColumnModel().getColumn(7).setMinWidth(0);
tablemyImages.getColumnModel().getColumn(7).setMaxWidth(0);
+
tablePublicVorlagen.getColumnModel().getColumn(1).setWidth(0);
- tablePublicVorlagen.getColumnModel().getColumn(1).setMinWidth(0);
- tablePublicVorlagen.getColumnModel().getColumn(1).setMaxWidth(0);
+ tablePublicVorlagen.getColumnModel().getColumn(1)
+ .setMinWidth(0);
+ tablePublicVorlagen.getColumnModel().getColumn(1)
+ .setMaxWidth(0);
+ tablePublicVorlagen.getColumnModel().getColumn(3).setWidth(0);
+ tablePublicVorlagen.getColumnModel().getColumn(3)
+ .setMinWidth(0);
+ tablePublicVorlagen.getColumnModel().getColumn(3)
+ .setMaxWidth(0);
tablePublicVorlagen.getColumnModel().getColumn(8).setWidth(0);
- tablePublicVorlagen.getColumnModel().getColumn(8).setMinWidth(0);
- tablePublicVorlagen.getColumnModel().getColumn(8).setMaxWidth(0);
+ tablePublicVorlagen.getColumnModel().getColumn(8)
+ .setMinWidth(0);
+ tablePublicVorlagen.getColumnModel().getColumn(8)
+ .setMaxWidth(0);
tablePublicVorlagen.getColumnModel().getColumn(6).setWidth(0);
- tablePublicVorlagen.getColumnModel().getColumn(6).setMinWidth(0);
- tablePublicVorlagen.getColumnModel().getColumn(6).setMaxWidth(0);
+ tablePublicVorlagen.getColumnModel().getColumn(6)
+ .setMinWidth(0);
+ tablePublicVorlagen.getColumnModel().getColumn(6)
+ .setMaxWidth(0);
tablePublicVorlagen.getColumnModel().getColumn(7).setWidth(0);
- tablePublicVorlagen.getColumnModel().getColumn(7).setMinWidth(0);
- tablePublicVorlagen.getColumnModel().getColumn(7).setMaxWidth(0);
+ tablePublicVorlagen.getColumnModel().getColumn(7)
+ .setMinWidth(0);
+ tablePublicVorlagen.getColumnModel().getColumn(7)
+ .setMaxWidth(0);
+
tableAllImages.getColumnModel().getColumn(1).setWidth(0);
tableAllImages.getColumnModel().getColumn(1).setMinWidth(0);
tableAllImages.getColumnModel().getColumn(1).setMaxWidth(0);
+ tableAllImages.getColumnModel().getColumn(3).setWidth(0);
+ tableAllImages.getColumnModel().getColumn(3).setMinWidth(0);
+ tableAllImages.getColumnModel().getColumn(3).setMaxWidth(0);
tableAllImages.getColumnModel().getColumn(8).setWidth(0);
tableAllImages.getColumnModel().getColumn(8).setMinWidth(0);
tableAllImages.getColumnModel().getColumn(8).setMaxWidth(0);
@@ -384,29 +423,26 @@ public class SearchImage_GUI extends JFrame { JScrollPane scrollPaneAllImages = new JScrollPane();
tableAllImages = new JTable();
- tableAllImages.getSelectionModel().addListSelectionListener( new ListSelectionListener()
- {
- public void valueChanged(ListSelectionEvent e)
- {
+ tableAllImages.getSelectionModel().addListSelectionListener(
+ new ListSelectionListener() {
+ public void valueChanged(ListSelectionEvent e) {
- String imageid = modelAll
- .getValueAt(
+ String imageid = modelAll.getValueAt(
tableAllImages
.convertRowIndexToModel(tableAllImages
.getSelectedRow()), 6)
- .toString();
- System.out.println(imageid);
- String version = modelAll
- .getValueAt(
+ .toString();
+ System.out.println(imageid);
+ String version = modelAll.getValueAt(
tableAllImages
.convertRowIndexToModel(tableAllImages
.getSelectedRow()), 7)
- .toString();
- System.out.println(version);
- writeImageData(imageid, version);
+ .toString();
+ System.out.println(version);
+ writeImageData(imageid, version);
- }
- });
+ }
+ });
tableAllImages.setModel(modelAll);
tableAllImages.getColumnModel().getColumn(1).sizeWidthToFit();
tableAllImages.getColumnModel().getColumn(2).sizeWidthToFit();
@@ -416,27 +452,24 @@ public class SearchImage_GUI extends JFrame { JScrollPane scrollPaneMyImage = new JScrollPane();
tablemyImages = new JTable();
- tablemyImages.getSelectionModel().addListSelectionListener( new ListSelectionListener()
- {
- public void valueChanged(ListSelectionEvent e)
- {
- String imageid = modelMyImages
- .getValueAt(
+ tablemyImages.getSelectionModel().addListSelectionListener(
+ new ListSelectionListener() {
+ public void valueChanged(ListSelectionEvent e) {
+ String imageid = modelMyImages.getValueAt(
tablemyImages
.convertRowIndexToModel(tablemyImages
.getSelectedRow()), 6)
- .toString();
- System.out.println(imageid);
- String version = modelMyImages
- .getValueAt(
+ .toString();
+ System.out.println(imageid);
+ String version = modelMyImages.getValueAt(
tablemyImages
.convertRowIndexToModel(tablemyImages
.getSelectedRow()), 7)
- .toString();
- System.out.println(version);
- writeImageData(imageid, version);
- }
- });
+ .toString();
+ System.out.println(version);
+ writeImageData(imageid, version);
+ }
+ });
tablemyImages.setModel(modelMyImages);
tablemyImages.getColumnModel().getColumn(1).sizeWidthToFit();
tablemyImages.getColumnModel().getColumn(2).sizeWidthToFit();
@@ -450,27 +483,26 @@ public class SearchImage_GUI extends JFrame { JScrollPane scrollPanePublicVorlagen = new JScrollPane();
tablePublicVorlagen = new JTable();
- tablePublicVorlagen.getSelectionModel().addListSelectionListener( new ListSelectionListener()
- {
- public void valueChanged(ListSelectionEvent e)
- {
- String imageid = modelPublicVorlagen
- .getValueAt(
- tablePublicVorlagen
- .convertRowIndexToModel(tablePublicVorlagen
- .getSelectedRow()), 6)
- .toString();
- System.out.println(imageid);
- String version = modelPublicVorlagen
- .getValueAt(
- tablePublicVorlagen
- .convertRowIndexToModel(tablePublicVorlagen
- .getSelectedRow()), 7)
- .toString();
- System.out.println(version);
- writeImageData(imageid, version);
- }
- });
+ tablePublicVorlagen.getSelectionModel().addListSelectionListener(
+ new ListSelectionListener() {
+ public void valueChanged(ListSelectionEvent e) {
+ String imageid = modelPublicVorlagen
+ .getValueAt(
+ tablePublicVorlagen
+ .convertRowIndexToModel(tablePublicVorlagen
+ .getSelectedRow()), 6)
+ .toString();
+ System.out.println(imageid);
+ String version = modelPublicVorlagen
+ .getValueAt(
+ tablePublicVorlagen
+ .convertRowIndexToModel(tablePublicVorlagen
+ .getSelectedRow()), 7)
+ .toString();
+ System.out.println(version);
+ writeImageData(imageid, version);
+ }
+ });
tablePublicVorlagen.setModel(modelPublicVorlagen);
tablePublicVorlagen.getColumnModel().getColumn(1).sizeWidthToFit();
tablePublicVorlagen.getColumnModel().getColumn(2).sizeWidthToFit();
@@ -479,8 +511,7 @@ public class SearchImage_GUI extends JFrame { tablePublicVorlagen.getColumnModel().getColumn(5).sizeWidthToFit();
tablePublicVorlagen.setRowSorter(rowSorterPublicVorlagen);
scrollPanePublicVorlagen.setViewportView(tablePublicVorlagen);
- tabbedPane.addTab("Vorlagen", null,
- scrollPanePublicVorlagen, null);
+ tabbedPane.addTab("Vorlagen", null, scrollPanePublicVorlagen, null);
tableAllImages.setRowSorter(rowSorterAll);
scrollPaneAllImages.setViewportView(tableAllImages);
@@ -496,8 +527,7 @@ public class SearchImage_GUI extends JFrame { tableCoopImages.getColumnModel().getColumn(5).sizeWidthToFit();
scrollPaneCoopImages.setViewportView(tableCoopImages);
- tabbedPane.addTab("bwLehrpool", null, scrollPaneCoopImages,
- null);
+ tabbedPane.addTab("bwLehrpool", null, scrollPaneCoopImages, null);
tabbedPane.setEnabledAt(3, false);
JButton btnDownload = new JButton("Download");
@@ -534,7 +564,7 @@ public class SearchImage_GUI extends JFrame { //
// Vorlagen Images
//
-
+
if (tablePublicVorlagen.getSelectedRow() != -1
// && modelPublicVorlagen
// .getValueAt(
@@ -580,9 +610,13 @@ public class SearchImage_GUI extends JFrame { tableAllImages
.convertRowIndexToModel(tableAllImages
.getSelectedRow()), 4).equals(
- username) == true ||modelAll.getValueAt(tableAllImages.convertRowIndexToModel(tableAllImages
- .getSelectedRow()), 8).equals(
- "true") == true ) {
+ username) == true
+ || modelAll
+ .getValueAt(
+ tableAllImages
+ .convertRowIndexToModel(tableAllImages
+ .getSelectedRow()),
+ 8).equals("true") == true) {
String imageid = modelAll
.getValueAt(
tableAllImages
@@ -658,123 +692,125 @@ public class SearchImage_GUI extends JFrame { JSeparator separator_1 = new JSeparator();
separator_1.setBounds(0, 627, 912, 2);
getContentPane().add(separator_1);
-
+
JPanel panel = new JPanel();
panel.setLayout(null);
- panel.setBorder(new TitledBorder(null, "Detailinformationen",
- TitledBorder.LEADING, TitledBorder.TOP, null, null));
+ panel.setBorder(new TitledBorder(null, "Detailinformationen",
+
+ TitledBorder.LEADING, TitledBorder.TOP, null, null));
panel.setBackground(SystemColor.menu);
panel.setBounds(586, 85, 316, 531);
getContentPane().add(panel);
-
+
JLabel lblName = new JLabel("Name:");
lblName.setBounds(10, 87, 130, 14);
panel.add(lblName);
-
+
labelName = new JLabel("");
labelName.setBounds(10, 102, 296, 14);
panel.add(labelName);
-
+
JLabel lblVerantwortlicher = new JLabel("Verantwortlicher:");
lblVerantwortlicher.setBounds(10, 259, 130, 14);
panel.add(lblVerantwortlicher);
-
+
labelOS = new JLabel("");
labelOS.setBounds(10, 216, 296, 14);
panel.add(labelOS);
-
+
JLabel lblWeitereVerantwortliche = new JLabel("Betriebssystem:");
lblWeitereVerantwortliche.setBounds(10, 202, 130, 14);
panel.add(lblWeitereVerantwortliche);
-
+
labelVerantwortlicher = new JLabel("");
labelVerantwortlicher.setBounds(10, 272, 296, 14);
panel.add(labelVerantwortlicher);
-
+
JLabel label = new JLabel("Weitere Verantwortliche:");
label.setBounds(10, 284, 130, 14);
panel.add(label);
-
+
labelWeitereVerantwortliche = new JLabel("");
labelWeitereVerantwortliche.setBounds(10, 297, 296, 14);
panel.add(labelWeitereVerantwortliche);
-
+
labelUpdate = new JLabel("");
labelUpdate.setBounds(10, 245, 296, 14);
panel.add(labelUpdate);
-
+
JLabel lblLetztesUpdate = new JLabel("Letztes Update:");
lblLetztesUpdate.setBounds(10, 231, 130, 14);
panel.add(lblLetztesUpdate);
-
+
JLabel lblImageIstVorlage = new JLabel("Image ist Vorlage:");
lblImageIstVorlage.setBounds(10, 336, 130, 14);
panel.add(lblImageIstVorlage);
-
+
labelVorlage = new JLabel("");
labelVorlage.setBounds(10, 350, 296, 14);
panel.add(labelVorlage);
-
+
labelLizenzSoftware = new JLabel("");
labelLizenzSoftware.setBounds(10, 383, 296, 14);
panel.add(labelLizenzSoftware);
-
- JLabel lblLizenzpflichtigeSoftware = new JLabel("Lizenzpflichtige Software:");
+
+ JLabel lblLizenzpflichtigeSoftware = new JLabel(
+ "Lizenzpflichtige Software:");
lblLizenzpflichtigeSoftware.setBounds(10, 367, 130, 14);
panel.add(lblLizenzpflichtigeSoftware);
-
+
JLabel lblInternet = new JLabel("Internetsperre vorhanden:");
lblInternet.setBounds(10, 400, 130, 14);
panel.add(lblInternet);
-
+
labelInternet = new JLabel("");
labelInternet.setBounds(10, 417, 296, 14);
panel.add(labelInternet);
-
+
JLabel lblEmpfehlungRam = new JLabel("Empfehlung RAM:");
lblEmpfehlungRam.setBounds(10, 432, 130, 14);
panel.add(lblEmpfehlungRam);
-
+
labelRam = new JLabel("");
labelRam.setBounds(10, 455, 296, 14);
panel.add(labelRam);
-
+
JLabel lblEmpfehlungCpu = new JLabel("Empfehlung CPU:");
lblEmpfehlungCpu.setBounds(10, 469, 130, 14);
panel.add(lblEmpfehlungCpu);
-
+
labelCPU = new JLabel("");
labelCPU.setBounds(10, 487, 296, 14);
panel.add(labelCPU);
-
+
JLabel lblTechnischeDaten = new JLabel("Technische Daten:");
lblTechnischeDaten.setBounds(10, 322, 296, 14);
panel.add(lblTechnischeDaten);
-
+
JLabel lblId = new JLabel("ID:");
lblId.setBounds(10, 23, 296, 14);
panel.add(lblId);
-
+
labelID = new JLabel("");
labelID.setBounds(10, 37, 296, 14);
panel.add(labelID);
-
+
labelVersion = new JLabel("");
labelVersion.setBounds(10, 73, 296, 14);
panel.add(labelVersion);
-
+
JLabel lblVersion = new JLabel("Version:");
lblVersion.setBounds(10, 57, 296, 14);
panel.add(lblVersion);
-
+
JLabel lblBeschreibung = new JLabel("Beschreibung:");
lblBeschreibung.setBounds(10, 119, 130, 14);
panel.add(lblBeschreibung);
-
+
JScrollPane scrollPane = new JScrollPane();
scrollPane.setBounds(10, 135, 296, 65);
panel.add(scrollPane);
-
+
textAreadesc = new JTextArea();
textAreadesc.setEditable(false);
textAreadesc.setFont(new Font("Tahoma", Font.PLAIN, 11));
@@ -849,8 +885,8 @@ public class SearchImage_GUI extends JFrame { images = client.getImageList();
Iterator<server.Image> i = images.iterator();
- SimpleDateFormat in=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
- SimpleDateFormat out=new SimpleDateFormat("dd.MM.yyyy HH:mm:ss");
+ SimpleDateFormat in = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+ SimpleDateFormat out = new SimpleDateFormat("dd.MM.yyyy HH:mm:ss");
int x = 0;
while (i.hasNext()) {
@@ -860,8 +896,8 @@ public class SearchImage_GUI extends JFrame { images.get(x).getOsName(),
images.get(x).getLectureName(),
images.get(x).getUserData(),
- out.format(in.parse(images.get(x).updateTime)), images.get(x).id,
- images.get(x).getVersion(),
+ out.format(in.parse(images.get(x).updateTime)),
+ images.get(x).id, images.get(x).getVersion(),
images.get(x).getIsTemplate() };
// Fuege diese Objekte der Tabelle hinzu
model.addRow(obj);
@@ -880,34 +916,30 @@ public class SearchImage_GUI extends JFrame { }
return model;
}
-
- public void writeImageData(String id, String version){
- try {
- SimpleDateFormat in=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
- SimpleDateFormat out=new SimpleDateFormat("dd.MM.yyyy HH:mm:ss");
- Map<String,String> res=client.getImageData(id,version);
+
+ public void writeImageData(String id, String version) {
+ try {
+ SimpleDateFormat in = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+ SimpleDateFormat out = new SimpleDateFormat("dd.MM.yyyy HH:mm:ss");
+ Map<String, String> res = client.getImageData(id, version);
labelName.setText(res.get("name"));
labelOS.setText(res.get("os"));
labelUpdate.setText(out.format(in.parse(res.get("lastupdate"))));
labelVerantwortlicher.setText(res.get("owner"));
labelWeitereVerantwortliche.setText("Noch nicht Verf\u00fcgbar");
- if(res.get("template").equals("true")){
+ if (res.get("template").equals("true")) {
labelVorlage.setText("Ja");
- }else{
+ } else {
labelVorlage.setText("Nein");
}
- if(res.get("license").equals("1")){
+ if (res.get("license").equals("1")) {
labelLizenzSoftware.setText("Ja");
- }
- else
- {
+ } else {
labelLizenzSoftware.setText("Nein");
}
- if(res.get("internet").equals("1")){
+ if (res.get("internet").equals("1")) {
labelInternet.setText("Ja");
- }
- else
- {
+ } else {
labelInternet.setText("Nein");
}
labelRam.setText(res.get("ram"));
diff --git a/Dozentenmodul/src/gui/lecture/CreateLectureLink_GUI.java b/Dozentenmodul/src/gui/lecture/CreateLectureLink_GUI.java index a01d2bdc..20c0278e 100644 --- a/Dozentenmodul/src/gui/lecture/CreateLectureLink_GUI.java +++ b/Dozentenmodul/src/gui/lecture/CreateLectureLink_GUI.java @@ -144,9 +144,18 @@ public class CreateLectureLink_GUI extends JFrame { e.printStackTrace(); } + // auszublendende Angaben + // 1=Lizenzpflichtig + // 3=Veranstaltung + // 6=ID + // 7=Version + // 8=Template tablemyImages.getColumnModel().getColumn(1).setWidth(0); tablemyImages.getColumnModel().getColumn(1).setMinWidth(0); tablemyImages.getColumnModel().getColumn(1).setMaxWidth(0); + tablemyImages.getColumnModel().getColumn(3).setWidth(0); + tablemyImages.getColumnModel().getColumn(3).setMinWidth(0); + tablemyImages.getColumnModel().getColumn(3).setMaxWidth(0); tablemyImages.getColumnModel().getColumn(8).setWidth(0); tablemyImages.getColumnModel().getColumn(8).setMinWidth(0); tablemyImages.getColumnModel().getColumn(8).setMaxWidth(0); @@ -156,9 +165,13 @@ public class CreateLectureLink_GUI extends JFrame { tablemyImages.getColumnModel().getColumn(7).setWidth(0); tablemyImages.getColumnModel().getColumn(7).setMinWidth(0); tablemyImages.getColumnModel().getColumn(7).setMaxWidth(0); + tablePublicVorlagen.getColumnModel().getColumn(1).setWidth(0); tablePublicVorlagen.getColumnModel().getColumn(1).setMinWidth(0); tablePublicVorlagen.getColumnModel().getColumn(1).setMaxWidth(0); + tablePublicVorlagen.getColumnModel().getColumn(3).setWidth(0); + tablePublicVorlagen.getColumnModel().getColumn(3).setMinWidth(0); + tablePublicVorlagen.getColumnModel().getColumn(3).setMaxWidth(0); tablePublicVorlagen.getColumnModel().getColumn(8).setWidth(0); tablePublicVorlagen.getColumnModel().getColumn(8).setMinWidth(0); tablePublicVorlagen.getColumnModel().getColumn(8).setMaxWidth(0); @@ -168,9 +181,13 @@ public class CreateLectureLink_GUI extends JFrame { tablePublicVorlagen.getColumnModel().getColumn(7).setWidth(0); tablePublicVorlagen.getColumnModel().getColumn(7).setMinWidth(0); tablePublicVorlagen.getColumnModel().getColumn(7).setMaxWidth(0); + tableAllImages.getColumnModel().getColumn(1).setWidth(0); tableAllImages.getColumnModel().getColumn(1).setMinWidth(0); tableAllImages.getColumnModel().getColumn(1).setMaxWidth(0); + tableAllImages.getColumnModel().getColumn(3).setWidth(0); + tableAllImages.getColumnModel().getColumn(3).setMinWidth(0); + tableAllImages.getColumnModel().getColumn(3).setMaxWidth(0); tableAllImages.getColumnModel().getColumn(8).setWidth(0); tableAllImages.getColumnModel().getColumn(8).setMinWidth(0); tableAllImages.getColumnModel().getColumn(8).setMaxWidth(0); diff --git a/Dozentenmodul/src/gui/lecture/EditLectureLink_GUI.java b/Dozentenmodul/src/gui/lecture/EditLectureLink_GUI.java index 29fc58bf..5fe33b0d 100644 --- a/Dozentenmodul/src/gui/lecture/EditLectureLink_GUI.java +++ b/Dozentenmodul/src/gui/lecture/EditLectureLink_GUI.java @@ -143,9 +143,18 @@ public class EditLectureLink_GUI extends JFrame { e.printStackTrace(); } + // auszublendende Angaben + // 1=Lizenzpflichtig + // 3=Veranstaltung + // 6=ID + // 7=Version + // 8=Template tablemyImages.getColumnModel().getColumn(1).setWidth(0); tablemyImages.getColumnModel().getColumn(1).setMinWidth(0); tablemyImages.getColumnModel().getColumn(1).setMaxWidth(0); + tablemyImages.getColumnModel().getColumn(3).setWidth(0); + tablemyImages.getColumnModel().getColumn(3).setMinWidth(0); + tablemyImages.getColumnModel().getColumn(3).setMaxWidth(0); tablemyImages.getColumnModel().getColumn(8).setWidth(0); tablemyImages.getColumnModel().getColumn(8).setMinWidth(0); tablemyImages.getColumnModel().getColumn(8).setMaxWidth(0); @@ -155,9 +164,13 @@ public class EditLectureLink_GUI extends JFrame { tablemyImages.getColumnModel().getColumn(7).setWidth(0); tablemyImages.getColumnModel().getColumn(7).setMinWidth(0); tablemyImages.getColumnModel().getColumn(7).setMaxWidth(0); + tablePublicVorlagen.getColumnModel().getColumn(1).setWidth(0); tablePublicVorlagen.getColumnModel().getColumn(1).setMinWidth(0); tablePublicVorlagen.getColumnModel().getColumn(1).setMaxWidth(0); + tablePublicVorlagen.getColumnModel().getColumn(3).setWidth(0); + tablePublicVorlagen.getColumnModel().getColumn(3).setMinWidth(0); + tablePublicVorlagen.getColumnModel().getColumn(3).setMaxWidth(0); tablePublicVorlagen.getColumnModel().getColumn(8).setWidth(0); tablePublicVorlagen.getColumnModel().getColumn(8).setMinWidth(0); tablePublicVorlagen.getColumnModel().getColumn(8).setMaxWidth(0); @@ -167,9 +180,13 @@ public class EditLectureLink_GUI extends JFrame { tablePublicVorlagen.getColumnModel().getColumn(7).setWidth(0); tablePublicVorlagen.getColumnModel().getColumn(7).setMinWidth(0); tablePublicVorlagen.getColumnModel().getColumn(7).setMaxWidth(0); + tableAllImages.getColumnModel().getColumn(1).setWidth(0); tableAllImages.getColumnModel().getColumn(1).setMinWidth(0); tableAllImages.getColumnModel().getColumn(1).setMaxWidth(0); + tableAllImages.getColumnModel().getColumn(3).setWidth(0); + tableAllImages.getColumnModel().getColumn(3).setMinWidth(0); + tableAllImages.getColumnModel().getColumn(3).setMaxWidth(0); tableAllImages.getColumnModel().getColumn(8).setWidth(0); tableAllImages.getColumnModel().getColumn(8).setMinWidth(0); tableAllImages.getColumnModel().getColumn(8).setMaxWidth(0); diff --git a/Dozentenmodul/src/gui/lecture/EditLectureSearch_GUI.java b/Dozentenmodul/src/gui/lecture/EditLectureSearch_GUI.java index 7484915e..f6a381c3 100644 --- a/Dozentenmodul/src/gui/lecture/EditLectureSearch_GUI.java +++ b/Dozentenmodul/src/gui/lecture/EditLectureSearch_GUI.java @@ -84,29 +84,27 @@ public class EditLectureSearch_GUI extends JFrame { JTable tablemyLectures; private JTextField textFieldName; JTabbedPane tabbedPane; - boolean activeSearch=false; + boolean activeSearch = false; String[] titles = { "Veranstaltungsname", "Beschreibung", "G\u00fcltigkeitsdatum", "Aktiv", "Letzte Benutzung", "Verantwortlicher", "Image", "Schlagwort", "ID" }; ThriftConnection con = new ThriftConnection(); Client client = models.Client.clientcon.getClient(); - final DefaultTableModel modelAll = new DefaultTableModel(titles, 0){ - public boolean isCellEditable(int rowIndex, int mColIndex) { - return false; - } + final DefaultTableModel modelAll = new DefaultTableModel(titles, 0) { + public boolean isCellEditable(int rowIndex, int mColIndex) { + return false; + } }; - final DefaultTableModel modelMyLectures = new DefaultTableModel(titles, 0){ - public boolean isCellEditable(int rowIndex, int mColIndex) { - return false; - } + final DefaultTableModel modelMyLectures = new DefaultTableModel(titles, 0) { + public boolean isCellEditable(int rowIndex, int mColIndex) { + return false; + } }; final TableRowSorter<TableModel> rowSorterAll = new TableRowSorter<TableModel>( modelAll); final TableRowSorter<TableModel> rowSorterMyLectures = new TableRowSorter<TableModel>( modelMyLectures); - - /** * Create the dialog. */ @@ -118,6 +116,7 @@ public class EditLectureSearch_GUI extends JFrame { con.closeThriftConnection(); System.exit(0); } + @Override public void windowOpened(WindowEvent arg0) { textFieldName.requestFocusInWindow(); @@ -129,6 +128,14 @@ public class EditLectureSearch_GUI extends JFrame { // TODO Auto-generated catch block e.printStackTrace(); } + + // auszublendende Angaben + // 1=Beschreibung + // 2=G\u00fcltigkeitsdatum + // 3=Aktiv + // 6=Image + // 7=Schlagwort + // 8=ID tablemyLectures.getColumnModel().getColumn(1).setWidth(0); tablemyLectures.getColumnModel().getColumn(1).setMinWidth(0); tablemyLectures.getColumnModel().getColumn(1).setMaxWidth(0); @@ -147,6 +154,7 @@ public class EditLectureSearch_GUI extends JFrame { tablemyLectures.getColumnModel().getColumn(8).setWidth(0); tablemyLectures.getColumnModel().getColumn(8).setMinWidth(0); tablemyLectures.getColumnModel().getColumn(8).setMaxWidth(0); + tableAllLectures.getColumnModel().getColumn(1).setWidth(0); tableAllLectures.getColumnModel().getColumn(1).setMinWidth(0); tableAllLectures.getColumnModel().getColumn(1).setMaxWidth(0); @@ -233,15 +241,15 @@ public class EditLectureSearch_GUI extends JFrame { String stext = textFieldName.getText(); // Wenn Textfield nicht leer if (stext != "") { - activeSearch=true; + activeSearch = true; // Filtere nach der Eingabe rowSorterAll.setRowFilter(RowFilter.regexFilter( textFieldName.getText(), 0)); rowSorterMyLectures.setRowFilter(RowFilter.regexFilter( textFieldName.getText(), 0)); - }else{ - activeSearch=false; + } else { + activeSearch = false; String username = person.verantwortlicher.getName() + " " + person.verantwortlicher.getVorname(); rowSorterMyLectures.setRowFilter(RowFilter.regexFilter( @@ -260,7 +268,7 @@ public class EditLectureSearch_GUI extends JFrame { @Override public void mouseClicked(MouseEvent arg0) { // oeffnet das Hauptmenue - + EditLectureSearch_GUI.this.setVisible(false); MainMenue_GUI main = new MainMenue_GUI(); main.setVisible(true); @@ -305,66 +313,61 @@ public class EditLectureSearch_GUI extends JFrame { tabbedPane.setBounds(10, 123, 557, 397); contentPanel.add(tabbedPane); - JScrollPane scrollPaneAllImages = new JScrollPane(); tableAllLectures = new JTable(); - tableAllLectures.getSelectionModel().addListSelectionListener( new ListSelectionListener() - { - public void valueChanged(ListSelectionEvent e) - { - String imageid = modelAll - .getValueAt( - tableAllLectures - .convertRowIndexToModel(tableAllLectures - .getSelectedRow()), 8) - .toString(); - System.out.println(imageid); - - try { - writeLectureData(imageid); - } catch (TException e1) { - // TODO Auto-generated catch block - e1.printStackTrace(); - } catch (ParseException e1) { - // TODO Auto-generated catch block - e1.printStackTrace(); - } - } - }); + tableAllLectures.getSelectionModel().addListSelectionListener( + new ListSelectionListener() { + public void valueChanged(ListSelectionEvent e) { + String imageid = modelAll + .getValueAt( + tableAllLectures + .convertRowIndexToModel(tableAllLectures + .getSelectedRow()), 8) + .toString(); + System.out.println(imageid); + + try { + writeLectureData(imageid); + } catch (TException e1) { + // TODO Auto-generated catch block + e1.printStackTrace(); + } catch (ParseException e1) { + // TODO Auto-generated catch block + e1.printStackTrace(); + } + } + }); tableAllLectures.setModel(modelAll); tableAllLectures.getColumnModel().getColumn(1).sizeWidthToFit(); tableAllLectures.getColumnModel().getColumn(2).sizeWidthToFit(); tableAllLectures.getColumnModel().getColumn(3).sizeWidthToFit(); tableAllLectures.getColumnModel().getColumn(4).sizeWidthToFit(); tableAllLectures.getColumnModel().getColumn(5).sizeWidthToFit(); - JScrollPane scrollPaneMyImage = new JScrollPane(); tablemyLectures = new JTable(); - tablemyLectures.getSelectionModel().addListSelectionListener( new ListSelectionListener() - { - public void valueChanged(ListSelectionEvent e) - { - String imageid = modelMyLectures - .getValueAt( + tablemyLectures.getSelectionModel().addListSelectionListener( + new ListSelectionListener() { + public void valueChanged(ListSelectionEvent e) { + String imageid = modelMyLectures.getValueAt( tablemyLectures .convertRowIndexToModel(tablemyLectures .getSelectedRow()), 8) - .toString(); - System.out.println(imageid); - - try { - writeLectureData(imageid); - } catch (TException e1) { - // TODO Auto-generated catch block - e1.printStackTrace(); - } catch (ParseException e1) { - // TODO Auto-generated catch block - e1.printStackTrace(); - } - } - }); + .toString(); + System.out.println(imageid); + + try { + writeLectureData(imageid); + } catch (TException e1) { + // TODO Auto-generated catch block + e1.printStackTrace(); + } catch (ParseException e1) { + // TODO Auto-generated catch block + e1.printStackTrace(); + } + } + }); tablemyLectures.setModel(modelMyLectures); tablemyLectures.getColumnModel().getColumn(1).sizeWidthToFit(); @@ -392,7 +395,7 @@ public class EditLectureSearch_GUI extends JFrame { btnBack.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { // oeffnet das Hauptmenue - + MainMenue_GUI main = new MainMenue_GUI(); main.setVisible(true); dispose(); @@ -406,186 +409,185 @@ public class EditLectureSearch_GUI extends JFrame { JButton btnContinue = new JButton("Weiter"); btnContinue.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { - String username = person.verantwortlicher.getName() + " " - + person.verantwortlicher.getVorname(); + String username = person.verantwortlicher.getName() + + " " + person.verantwortlicher.getVorname(); // check if a row is selected if (tablemyLectures.getSelectedRow() != -1) { // a row is selected, do operations - - - Lecture.lecture.setid(modelMyLectures - .getValueAt( - tablemyLectures - .convertRowIndexToModel(tablemyLectures - .getSelectedRow()), - 8).toString()); - Lecture.lecture.setName(modelMyLectures - .getValueAt( - tablemyLectures - .convertRowIndexToModel(tablemyLectures - .getSelectedRow()), - 0).toString()); - Lecture.lecture.setDesc(modelMyLectures + Lecture.lecture.setid(modelMyLectures + .getValueAt( + tablemyLectures + .convertRowIndexToModel(tablemyLectures + .getSelectedRow()), + 8).toString()); + Lecture.lecture.setName(modelMyLectures + .getValueAt( + tablemyLectures + .convertRowIndexToModel(tablemyLectures + .getSelectedRow()), + 0).toString()); + Lecture.lecture.setDesc(modelMyLectures + .getValueAt( + tablemyLectures + .convertRowIndexToModel(tablemyLectures + .getSelectedRow()), + 1).toString()); + String date = modelMyLectures + .getValueAt( + tablemyLectures + .convertRowIndexToModel(tablemyLectures + .getSelectedRow()), + 2).toString(); + + Lecture.lecture.setLinkedImagename(modelMyLectures + .getValueAt( + tablemyLectures + .convertRowIndexToModel(tablemyLectures + .getSelectedRow()), + 6).toString()); + + int zweitesLeerzeichen = date.indexOf(" ", + date.indexOf(" ") + 1); + + String startdate = date.substring(0, + zweitesLeerzeichen); + String enddate = date.substring(zweitesLeerzeichen); + SimpleDateFormat out = new SimpleDateFormat( + "yyyy-MM-dd HH:mm:ss"); + SimpleDateFormat in = new SimpleDateFormat( + "dd.MM.yyyy HH:mm:ss"); + try { + enddate = out.format(in.parse(enddate)); + startdate = out.format(in.parse(startdate)); + } catch (ParseException e2) { + // TODO Auto-generated catch block + e2.printStackTrace(); + } + + DateFormat df = new SimpleDateFormat( + "yyyy-MM-dd HH:mm:ss"); + + try { + // Format has to be "yyyy-MM-dd HH:mm:ss" + Lecture.lecture.setEnddate(df.parse(enddate)); + Lecture.lecture.setStartdate(df + .parse(startdate)); + } catch (ParseException e1) { + // TODO Auto-generated catch block + e1.printStackTrace(); + } + if (modelMyLectures + .getValueAt( + tablemyLectures + .convertRowIndexToModel(tablemyLectures + .getSelectedRow()), + 3).toString().equals("1")) { + Lecture.lecture.setActive(true); + } else { + Lecture.lecture.setActive(false); + } + + // EditImageAllgemein_GUI ea=new + // EditImageAllgemein_GUI(); + EditLectureAllgemein_GUI el = new EditLectureAllgemein_GUI(); + el.setVisible(true); + dispose(); + } else if (tableAllLectures.getSelectedRow() != -1 + && tableAllLectures .getValueAt( - tablemyLectures - .convertRowIndexToModel(tablemyLectures - .getSelectedRow()), - 1).toString()); - String date = modelMyLectures - .getValueAt( - tablemyLectures - .convertRowIndexToModel(tablemyLectures - .getSelectedRow()), - 2).toString(); - - Lecture.lecture.setLinkedImagename(modelMyLectures - .getValueAt( - tablemyLectures - .convertRowIndexToModel(tablemyLectures - .getSelectedRow()), - 6).toString()); - - int zweitesLeerzeichen = date.indexOf(" ", - date.indexOf(" ") + 1); - - String startdate = date.substring(0, - zweitesLeerzeichen); - String enddate = date - .substring(zweitesLeerzeichen); - SimpleDateFormat out=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); - SimpleDateFormat in=new SimpleDateFormat("dd.MM.yyyy HH:mm:ss"); - try { - enddate=out.format(in.parse(enddate)); - startdate=out.format(in.parse(startdate)); - } catch (ParseException e2) { - // TODO Auto-generated catch block - e2.printStackTrace(); - } - - DateFormat df = new SimpleDateFormat( - "yyyy-MM-dd HH:mm:ss"); - - try { - // Format has to be "yyyy-MM-dd HH:mm:ss" - Lecture.lecture.setEnddate(df - .parse(enddate)); - Lecture.lecture.setStartdate(df - .parse(startdate)); - } catch (ParseException e1) { - // TODO Auto-generated catch block - e1.printStackTrace(); - } - if (modelMyLectures - .getValueAt( - tablemyLectures - .convertRowIndexToModel(tablemyLectures - .getSelectedRow()), - 3).toString().equals("1")) { - Lecture.lecture.setActive(true); - } else { - Lecture.lecture.setActive(false); - } - - - // EditImageAllgemein_GUI ea=new - // EditImageAllgemein_GUI(); - EditLectureAllgemein_GUI el = new EditLectureAllgemein_GUI(); - el.setVisible(true); - dispose(); - } else if (tableAllLectures.getSelectedRow() != -1 && tableAllLectures.getValueAt(tableAllLectures.getSelectedRow(), 5).toString().equals(username)) { - - // a row is selected, do operations - - - - Lecture.lecture.setid(modelAll - .getValueAt( - tableAllLectures - .convertRowIndexToModel(tableAllLectures - .getSelectedRow()), - 8).toString()); - Lecture.lecture.setName(modelAll - .getValueAt( - tableAllLectures - .convertRowIndexToModel(tableAllLectures - .getSelectedRow()), - 0).toString()); - Lecture.lecture.setDesc(modelAll - .getValueAt( - tableAllLectures - .convertRowIndexToModel(tableAllLectures - .getSelectedRow()), - 1).toString()); - String date = modelAll - .getValueAt( - tableAllLectures - .convertRowIndexToModel(tableAllLectures - .getSelectedRow()), - 2).toString(); - - Lecture.lecture.setLinkedImagename(modelAll - .getValueAt( - tableAllLectures - .convertRowIndexToModel(tableAllLectures - .getSelectedRow()), - 6).toString()); - - int zweitesLeerzeichen = date.indexOf(" ", - date.indexOf(" ") + 1); - - String startdate = date.substring(0, - zweitesLeerzeichen); - String enddate = date - .substring(zweitesLeerzeichen); - SimpleDateFormat out=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); - SimpleDateFormat in=new SimpleDateFormat("dd.MM.yyyy HH:mm:ss"); - try { - enddate=out.format(in.parse(enddate)); - startdate=out.format(in.parse(startdate)); - } catch (ParseException e2) { - // TODO Auto-generated catch block - e2.printStackTrace(); - } - DateFormat df = new SimpleDateFormat( - "yyyy-MM-dd HH:mm:ss"); - - try { - // Format has to be "yyyy-MM-dd HH:mm:ss" - Lecture.lecture.setEnddate(df - .parse(enddate)); - Lecture.lecture.setStartdate(df - .parse(startdate)); - } catch (ParseException e1) { - // TODO Auto-generated catch block - e1.printStackTrace(); - } - if (modelAll - .getValueAt( - tableAllLectures - .convertRowIndexToModel(tableAllLectures - .getSelectedRow()), - 3).toString().equals("1")) { - Lecture.lecture.setActive(true); - } else { - Lecture.lecture.setActive(false); - } - - EditLectureAllgemein_GUI el = new EditLectureAllgemein_GUI(); - el.setVisible(true); - dispose(); - }else { - JOptionPane - .showMessageDialog( - null, - "Bitte w\u00e4hlen Sie ein eigenes Image aus.", - "Message", - JOptionPane.INFORMATION_MESSAGE); - } //End Else - } //Action - - + tableAllLectures + .getSelectedRow(), 5) + .toString().equals(username)) { + + // a row is selected, do operations + + Lecture.lecture.setid(modelAll + .getValueAt( + tableAllLectures + .convertRowIndexToModel(tableAllLectures + .getSelectedRow()), + 8).toString()); + Lecture.lecture.setName(modelAll + .getValueAt( + tableAllLectures + .convertRowIndexToModel(tableAllLectures + .getSelectedRow()), + 0).toString()); + Lecture.lecture.setDesc(modelAll + .getValueAt( + tableAllLectures + .convertRowIndexToModel(tableAllLectures + .getSelectedRow()), + 1).toString()); + String date = modelAll + .getValueAt( + tableAllLectures + .convertRowIndexToModel(tableAllLectures + .getSelectedRow()), + 2).toString(); + + Lecture.lecture.setLinkedImagename(modelAll + .getValueAt( + tableAllLectures + .convertRowIndexToModel(tableAllLectures + .getSelectedRow()), + 6).toString()); + + int zweitesLeerzeichen = date.indexOf(" ", + date.indexOf(" ") + 1); + + String startdate = date.substring(0, + zweitesLeerzeichen); + String enddate = date.substring(zweitesLeerzeichen); + SimpleDateFormat out = new SimpleDateFormat( + "yyyy-MM-dd HH:mm:ss"); + SimpleDateFormat in = new SimpleDateFormat( + "dd.MM.yyyy HH:mm:ss"); + try { + enddate = out.format(in.parse(enddate)); + startdate = out.format(in.parse(startdate)); + } catch (ParseException e2) { + // TODO Auto-generated catch block + e2.printStackTrace(); + } + DateFormat df = new SimpleDateFormat( + "yyyy-MM-dd HH:mm:ss"); + + try { + // Format has to be "yyyy-MM-dd HH:mm:ss" + Lecture.lecture.setEnddate(df.parse(enddate)); + Lecture.lecture.setStartdate(df + .parse(startdate)); + } catch (ParseException e1) { + // TODO Auto-generated catch block + e1.printStackTrace(); + } + if (modelAll + .getValueAt( + tableAllLectures + .convertRowIndexToModel(tableAllLectures + .getSelectedRow()), + 3).toString().equals("1")) { + Lecture.lecture.setActive(true); + } else { + Lecture.lecture.setActive(false); + } + + EditLectureAllgemein_GUI el = new EditLectureAllgemein_GUI(); + el.setVisible(true); + dispose(); + } else { + JOptionPane + .showMessageDialog( + null, + "Bitte w\u00e4hlen Sie ein eigenes Image aus.", + "Message", + JOptionPane.INFORMATION_MESSAGE); + } // End Else + } // Action + }); btnContinue.setActionCommand("Cancel"); buttonPane.add(btnContinue); @@ -604,64 +606,63 @@ public class EditLectureSearch_GUI extends JFrame { panel.setLayout(null); panel.setBorder(new TitledBorder(null, "Detailinformationen", - TitledBorder.LEADING, TitledBorder.TOP, null, null)); + TitledBorder.LEADING, TitledBorder.TOP, null, null)); panel.setBackground(SystemColor.menu); panel.setBounds(591, 85, 235, 518); getContentPane().add(panel); - + JLabel lblNewLabel_3 = new JLabel("Name:"); lblNewLabel_3.setBounds(10, 27, 104, 14); panel.add(lblNewLabel_3); - + JLabel lblAktiv = new JLabel("Aktiv:"); lblAktiv.setBounds(10, 98, 104, 14); panel.add(lblAktiv); - + labelAktiv = new JLabel(""); labelAktiv.setBounds(10, 114, 218, 14); panel.add(labelAktiv); - + labelstartdate = new JLabel(""); labelstartdate.setBounds(10, 147, 218, 14); panel.add(labelstartdate); - + JLabel lblStartdatum = new JLabel("Startdatum:"); lblStartdatum.setBounds(10, 129, 104, 14); panel.add(lblStartdatum); - + labelenddate = new JLabel(""); labelenddate.setBounds(10, 175, 218, 14); panel.add(labelenddate); - + JLabel lblEnddatum = new JLabel("Enddatum:"); lblEnddatum.setBounds(10, 161, 104, 14); panel.add(lblEnddatum); - + JLabel lblBeschreibung = new JLabel("Beschreibung:"); lblBeschreibung.setBounds(10, 189, 104, 14); panel.add(lblBeschreibung); - + JLabel lblImage = new JLabel("Image:"); lblImage.setBounds(10, 293, 104, 14); panel.add(lblImage); - + labelVerantwortlicher = new JLabel(""); labelVerantwortlicher.setBounds(10, 426, 218, 14); panel.add(labelVerantwortlicher); - + JLabel lblVerantwortlicher = new JLabel("Verantwortlicher:"); lblVerantwortlicher.setBounds(10, 411, 104, 14); panel.add(lblVerantwortlicher); - + JLabel lblImageversion = new JLabel("Imageversion:"); lblImageversion.setBounds(10, 381, 104, 14); panel.add(lblImageversion); - + labelimageversion = new JLabel(""); labelimageversion.setBounds(10, 399, 218, 14); panel.add(labelimageversion); - - + labeldesc = new JTextArea(); labeldesc.setFont(new Font("Tahoma", Font.PLAIN, 11)); labeldesc.setEditable(false); @@ -671,8 +672,8 @@ public class EditLectureSearch_GUI extends JFrame { JScrollPane scrollPane = new JScrollPane(labeldesc); scrollPane.setBounds(10, 209, 218, 81); panel.add(scrollPane); - //panel.add(labeldesc); - + // panel.add(labeldesc); + labelimage = new JTextArea(); labelimage.setLineWrap(true); labelimage.setFont(new Font("Tahoma", Font.PLAIN, 11)); @@ -682,7 +683,7 @@ public class EditLectureSearch_GUI extends JFrame { JScrollPane scrollPaneImage = new JScrollPane(labelimage); scrollPaneImage.setBounds(10, 309, 215, 69); panel.add(scrollPaneImage); - + labelName = new JTextArea(); labelName.setEditable(false); labelName.setFont(new Font("Tahoma", Font.PLAIN, 11)); @@ -691,8 +692,8 @@ public class EditLectureSearch_GUI extends JFrame { JScrollPane scrollPaneName = new JScrollPane(labelName); scrollPaneName.setBounds(10, 40, 218, 55); panel.add(scrollPaneName); - //panel.add(labelName); - //panel.add(labelimage); + // panel.add(labelName); + // panel.add(labelimage); JMenuBar menuBar = new JMenuBar(); setJMenuBar(menuBar); @@ -703,15 +704,15 @@ public class EditLectureSearch_GUI extends JFrame { mntmFaq.addMouseListener(new MouseAdapter() { @Override public void mousePressed(MouseEvent arg0) { - + OpenLinks open = new OpenLinks(); - + URI windows; try { windows = new URI(Links.getFAQ()); - + open.openWebpage(windows); - + } catch (URISyntaxException e) { // TODO Auto-generated catch block e.printStackTrace(); @@ -719,7 +720,6 @@ public class EditLectureSearch_GUI extends JFrame { } }); mnNewMenu_1.add(mntmFaq); - JMenuItem mntmOtrs = new JMenuItem("OTRS"); mntmOtrs.addMouseListener(new MouseAdapter() { @@ -727,22 +727,22 @@ public class EditLectureSearch_GUI extends JFrame { public void mousePressed(MouseEvent arg0) { OpenLinks open = new OpenLinks(); - + URI windows; try { windows = new URI(Links.getOTRS()); - + open.openWebpage(windows); - + } catch (URISyntaxException e) { // TODO Auto-generated catch block e.printStackTrace(); } - + } }); mnNewMenu_1.add(mntmOtrs); - + JMenuItem mntmAbout = new JMenuItem("About"); mntmAbout.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { @@ -755,30 +755,32 @@ public class EditLectureSearch_GUI extends JFrame { } // Initiale Beffuelung eines Table models - public DefaultTableModel initTableModel(DefaultTableModel model) throws ParseException { + public DefaultTableModel initTableModel(DefaultTableModel model) + throws ParseException { List<server.Lecture> lectures; try { // Hole eine Liste der Images lectures = client.getLectureList(); Iterator<server.Lecture> i = lectures.iterator(); - SimpleDateFormat in=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); - SimpleDateFormat out=new SimpleDateFormat("dd.MM.yyyy HH:mm:ss"); + SimpleDateFormat in = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + SimpleDateFormat out = new SimpleDateFormat("dd.MM.yyyy HH:mm:ss"); int x = 0; while (i.hasNext()) { // erzeuge Objekte fuer die Tabelle - + Object[] obj = { lectures.get(x).lecturename, lectures.get(x).desc, out.format(in.parse(lectures.get(x).starttime)) + " " + out.format(in.parse(lectures.get(x).endtime)), - lectures.get(x).isActive, out.format(in.parse(lectures.get(x).lastused)), - lectures.get(x).username, - lectures.get(x).imagename," " ,lectures.get(x).id }; + lectures.get(x).isActive, + out.format(in.parse(lectures.get(x).lastused)), + lectures.get(x).username, lectures.get(x).imagename, + " ", lectures.get(x).id }; // Fuege diese Objekte der Tabelle hinzu model.addRow(obj); - + x++; i.next(); @@ -791,21 +793,22 @@ public class EditLectureSearch_GUI extends JFrame { } return model; } - public void writeLectureData(String id) throws TException, ParseException{ - - SimpleDateFormat in=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); - SimpleDateFormat out=new SimpleDateFormat("dd.MM.yyyy HH:mm:ss"); - Map<String,String> res=client.getLectureData(id); + + public void writeLectureData(String id) throws TException, ParseException { + + SimpleDateFormat in = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + SimpleDateFormat out = new SimpleDateFormat("dd.MM.yyyy HH:mm:ss"); + Map<String, String> res = client.getLectureData(id); labelName.setText(res.get("name")); labelAktiv.setText(res.get("isActive")); labeldesc.setText(res.get("desc")); labelVerantwortlicher.setText(res.get("owner")); labelstartdate.setText(out.format(in.parse(res.get("startTime")))); labelenddate.setText(out.format(in.parse(res.get("endTime")))); - labelimage.setText(res.get("imagepath").substring(res.get("imagepath").indexOf("/")+1)); + labelimage.setText(res.get("imagepath").substring( + res.get("imagepath").indexOf("/") + 1)); labelimageversion.setText(res.get("imageversion")); - -} + } } diff --git a/Dozentenmodulserver/bin/util/XMLCreator.class b/Dozentenmodulserver/bin/util/XMLCreator.class Binary files differindex a7df178c..8afce682 100644 --- a/Dozentenmodulserver/bin/util/XMLCreator.class +++ b/Dozentenmodulserver/bin/util/XMLCreator.class |
