summaryrefslogtreecommitdiffstats
path: root/dozentenmodul/src/main/java/gui/lecture/EditLectureSearch_GUI.java
diff options
context:
space:
mode:
Diffstat (limited to 'dozentenmodul/src/main/java/gui/lecture/EditLectureSearch_GUI.java')
-rw-r--r--dozentenmodul/src/main/java/gui/lecture/EditLectureSearch_GUI.java132
1 files changed, 40 insertions, 92 deletions
diff --git a/dozentenmodul/src/main/java/gui/lecture/EditLectureSearch_GUI.java b/dozentenmodul/src/main/java/gui/lecture/EditLectureSearch_GUI.java
index ab72cf11..9282ccd8 100644
--- a/dozentenmodul/src/main/java/gui/lecture/EditLectureSearch_GUI.java
+++ b/dozentenmodul/src/main/java/gui/lecture/EditLectureSearch_GUI.java
@@ -80,10 +80,8 @@ public class EditLectureSearch_GUI extends JFrame {
JTextArea labelimage;
JTextArea labeldesc;
JLabel labelVerantwortlicher;
- JTable tableAllLectures;
JTable tablemyLectures;
private JTextField textFieldName;
- JTabbedPane tabbedPane;
boolean activeSearch = false;
String[] titles = { "Veranstaltungsname", "Beschreibung",
"Gültigkeitsdatum", "Aktiv", "Letzte Benutzung",
@@ -156,6 +154,7 @@ public class EditLectureSearch_GUI extends JFrame {
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);
@@ -174,6 +173,7 @@ public class EditLectureSearch_GUI extends JFrame {
tableAllLectures.getColumnModel().getColumn(8).setWidth(0);
tableAllLectures.getColumnModel().getColumn(8).setMinWidth(0);
tableAllLectures.getColumnModel().getColumn(8).setMaxWidth(0);
+ */
}
});
// Verhindert das Vergroessern Des Fensters
@@ -304,94 +304,41 @@ public class EditLectureSearch_GUI extends JFrame {
JLabel lblNewLabel_1 = new JLabel("Veranstaltungsauswahl");
lblNewLabel_1.setBounds(166, 11, 128, 14);
contentPanel.add(lblNewLabel_1);
-
- tabbedPane = new JTabbedPane(JTabbedPane.TOP);
- tabbedPane.addChangeListener(new ChangeListener() {
- public void stateChanged(ChangeEvent arg0) {
- if (tabbedPane.getSelectedIndex() == 0) {
-
- String username = person.verantwortlicher.getName() + " "
- + person.verantwortlicher.getVorname();
- rowSorterMyLectures.setRowFilter(RowFilter.regexFilter(
- username, 5));
- } else if (tabbedPane.getSelectedIndex() == 1) {
- rowSorterAll.setRowFilter(null);
- }
-
- }
- });
-
- 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
+
+ JScrollPane scrollPaneMyImage = new JScrollPane();
+ scrollPaneMyImage.setBounds(10, 120, 552, 369);
+ contentPanel.add(scrollPaneMyImage);
+ tablemyLectures = new JTable();
+ tablemyLectures.getSelectionModel().addListSelectionListener(
+ new ListSelectionListener() {
+ public void valueChanged(ListSelectionEvent e) {
+ String imageid = modelMyLectures.getValueAt(
+ tablemyLectures
+ .convertRowIndexToModel(tablemyLectures
.getSelectedRow()), 8)
- .toString();
-
- 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
- .convertRowIndexToModel(tablemyLectures
- .getSelectedRow()), 8)
- .toString();
-
- 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();
- tablemyLectures.getColumnModel().getColumn(2).sizeWidthToFit();
- tablemyLectures.getColumnModel().getColumn(3).sizeWidthToFit();
- tablemyLectures.getColumnModel().getColumn(4).sizeWidthToFit();
- tablemyLectures.getColumnModel().getColumn(5).sizeWidthToFit();
- tablemyLectures.setRowSorter(rowSorterMyLectures);
-
- scrollPaneMyImage.setViewportView(tablemyLectures);
- tabbedPane.addTab("Meine Veranstaltungen", null, scrollPaneMyImage,
- null);
- tableAllLectures.setRowSorter(rowSorterAll);
-
- scrollPaneAllImages.setViewportView(tableAllLectures);
- tabbedPane.addTab("Alle", null, scrollPaneAllImages, null);
+ .toString();
+
+ 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();
+ tablemyLectures.getColumnModel().getColumn(2).sizeWidthToFit();
+ tablemyLectures.getColumnModel().getColumn(3).sizeWidthToFit();
+ tablemyLectures.getColumnModel().getColumn(4).sizeWidthToFit();
+ tablemyLectures.getColumnModel().getColumn(5).sizeWidthToFit();
+ tablemyLectures.setRowSorter(rowSorterMyLectures);
+
+ scrollPaneMyImage.setViewportView(tablemyLectures);
{
JPanel buttonPane = new JPanel();
buttonPane.setBounds(0, 640, 826, 33);
@@ -502,7 +449,8 @@ public class EditLectureSearch_GUI extends JFrame {
EditLectureAllgemein_GUI el = new EditLectureAllgemein_GUI();
el.setVisible(true);
dispose();
- } else if (tableAllLectures.getSelectedRow() != -1
+ }
+ /*else if (tableAllLectures.getSelectedRow() != -1
&& tableAllLectures
.getValueAt(
tableAllLectures
@@ -593,8 +541,8 @@ public class EditLectureSearch_GUI extends JFrame {
"Bitte wählen Sie ein eigenes Image aus.",
"Message",
JOptionPane.INFORMATION_MESSAGE);
- } // End Else
- } // Action
+ } // End Else */
+ } // end action
});
btnContinue.setActionCommand("Cancel");