diff options
| author | Nino Breuer | 2014-10-07 10:16:49 +0200 |
|---|---|---|
| committer | Nino Breuer | 2014-10-07 10:16:49 +0200 |
| commit | 5a1a0930d7893f4479ff48177b13e4554173c677 (patch) | |
| tree | 10c6e39bb4ff9d281ade38f40e0837c8d6657709 /dozentenmodul/src/main/java/gui/lecture/DeleteLecture_GUI.java | |
| parent | Removed (now) unused GUIs (diff) | |
| parent | [client] now also remember the "technisch-info" wenn going back a page (diff) | |
| download | tutor-module-5a1a0930d7893f4479ff48177b13e4554173c677.tar.gz tutor-module-5a1a0930d7893f4479ff48177b13e4554173c677.tar.xz tutor-module-5a1a0930d7893f4479ff48177b13e4554173c677.zip | |
Merge branch 'master' of ssh://git.openslx.org/openslx-ng/tutor-module
Conflicts:
dozentenmodul/src/main/java/gui/image/FTPCreateUploader_GUI.java
dozentenmodul/src/main/java/gui/lecture/DeleteLecture_GUI.java
dozentenmodul/src/main/java/gui/lecture/EditLectureLink_GUI.java
g
Diffstat (limited to 'dozentenmodul/src/main/java/gui/lecture/DeleteLecture_GUI.java')
| -rw-r--r-- | dozentenmodul/src/main/java/gui/lecture/DeleteLecture_GUI.java | 119 |
1 files changed, 29 insertions, 90 deletions
diff --git a/dozentenmodul/src/main/java/gui/lecture/DeleteLecture_GUI.java b/dozentenmodul/src/main/java/gui/lecture/DeleteLecture_GUI.java index 131acd97..014b9f71 100644 --- a/dozentenmodul/src/main/java/gui/lecture/DeleteLecture_GUI.java +++ b/dozentenmodul/src/main/java/gui/lecture/DeleteLecture_GUI.java @@ -82,14 +82,13 @@ public class DeleteLecture_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", "Verantwortlicher", "Image", "Schlagwort", "ID" }; + ThriftConnection con = new ThriftConnection(); Client client = models.Client.clientcon.getClient(); final DefaultTableModel modelAll = new DefaultTableModel(titles, 0); @@ -99,6 +98,7 @@ public class DeleteLecture_GUI extends JFrame { final TableRowSorter<TableModel> rowSorterMyLectures = new TableRowSorter<TableModel>( modelMyLectures); private JButton button; + private JTextField textField; private static final String HELP_MESSAGE = "<html><div align=\"center\">" + @@ -107,6 +107,7 @@ public class DeleteLecture_GUI extends JFrame { "Veraltet bedeutet, dass Veranstaltungen, die drei Monate lang nicht augerufen wurden, vorerst deaktiviert werden." + "</div></html>"; + /** * Create the dialog. @@ -157,6 +158,7 @@ public class DeleteLecture_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); @@ -175,6 +177,7 @@ public class DeleteLecture_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 @@ -232,8 +235,8 @@ public class DeleteLecture_GUI extends JFrame { contentPanel.add(panel_1); panel_1.setLayout(null); - JLabel lblNewLabel_2 = new JLabel("Name:"); - lblNewLabel_2.setBounds(10, 30, 80, 20); + JLabel lblNewLabel_2 = new JLabel("Volltextsuche:"); + lblNewLabel_2.setBounds(30, 30, 80, 20); panel_1.add(lblNewLabel_2); textFieldName = new JTextField(); @@ -263,18 +266,9 @@ public class DeleteLecture_GUI extends JFrame { } }); - textFieldName.setBounds(96, 30, 166, 20); + textFieldName.setBounds(133, 30, 400, 20); panel_1.add(textFieldName); textFieldName.setColumns(10); - - JLabel label = new JLabel("Beschreibung:"); - label.setBounds(291, 30, 80, 20); - panel_1.add(label); - - textField = new JTextField(); - textField.setColumns(10); - textField.setBounds(381, 30, 166, 20); - panel_1.add(textField); JLabel lblHauptmen = new JLabel("Hauptmenü"); lblHauptmen.addMouseListener(new MouseAdapter() { @@ -307,72 +301,22 @@ public class DeleteLecture_GUI extends JFrame { JLabel lblNewLabel_1 = new JLabel("Veranstaltung löschen"); 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 - .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(); - tableAllLectures.setRowSorter(rowSorterAll); 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 + tablemyLectures.getSelectionModel().addListSelectionListener( new ListSelectionListener() + { + public void valueChanged(ListSelectionEvent e) + { + String imageid = modelMyLectures .getValueAt( tablemyLectures .convertRowIndexToModel(tablemyLectures .getSelectedRow()), 8) .toString(); - try { + try { writeLectureData(imageid); } catch (TException e1) { // TODO Auto-generated catch block @@ -381,24 +325,18 @@ public class DeleteLecture_GUI extends JFrame { // 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); - - scrollPaneAllImages.setViewportView(tableAllLectures); - tabbedPane.addTab("Alle", null, scrollPaneAllImages, null); + 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); @@ -527,6 +465,7 @@ public class DeleteLecture_GUI extends JFrame { getContentPane().add(button); button.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { + String lectureID=""; int eingabe; String username = person.verantwortlicher.getName() + " " @@ -568,7 +507,7 @@ public class DeleteLecture_GUI extends JFrame { }//end ask for confirmation }//end check if a row is selected - else if (tableAllLectures.getSelectedRowCount() !=0 && tableAllLectures.getValueAt(tableAllLectures.getSelectedRow(), 5).toString().equals(username)){ + /* else if (tableAllLectures.getSelectedRowCount() !=0 && tableAllLectures.getValueAt(tableAllLectures.getSelectedRow(), 5).toString().equals(username)){ //a row is selected //ask for confirmation eingabe = JOptionPane.showConfirmDialog(null, @@ -610,7 +549,7 @@ public class DeleteLecture_GUI extends JFrame { "Bitte wählen Sie ein eigenes Image aus.", "Message", JOptionPane.INFORMATION_MESSAGE); - } + } */ } }); |
