Exemple #1
0
 public void neuesGutachten(
     String berid,
     String bertype,
     String verfasser,
     String erstellt,
     String empfang,
     String patintern,
     String bertitel) {
   Vector<String> xvec = new Vector<String>();
   xvec.add(berid);
   xvec.add(bertype);
   xvec.add(verfasser);
   xvec.add(erstellt);
   xvec.add(empfang);
   xvec.add("");
   xvec.add("0");
   xvec.add(patintern);
   if (Reha.thisClass.patpanel.aktPatID.equals(patintern)) {
     dtblm.addRow((Vector<?>) xvec.clone());
     tabbericht.setRowSelectionInterval(
         tabbericht.getRowCount() - 1, tabbericht.getRowCount() - 1);
   }
   Reha.thisClass
       .patpanel
       .getTab()
       .setTitleAt(4, macheHtmlTitel(tabbericht.getRowCount(), "Gutachten"));
   anzahlGutachten.setText("Anzahl Gutachten: " + Integer.toString(tabbericht.getRowCount()));
 }
  public void propertyChange(PropertyChangeEvent event) {
    String prop = event.getPropertyName();

    if (prop.equalsIgnoreCase(SequiturMessage.MAIN_CHART_CLICKED_MESSAGE)) {
      String rule = (String) event.getNewValue();
      System.out.println("CombinedRulesPanel.propertyChange.rule:     " + rule);
      for (int row = 0; row <= combinedRulesTable.getRowCount() - 1; row++) {
        for (int col = 0; col <= combinedRulesTable.getColumnCount() - 1; col++) {
          if (rule.equals(
              chartData.convert2OriginalSAXAlphabet(
                  '1', combinedRulesTable.getValueAt(row, col).toString()))) {
            combinedRulesTable.scrollRectToVisible(combinedRulesTable.getCellRect(row, 0, true));
            combinedRulesTable.setRowSelectionInterval(row, row);
          }
        }
      }
    }
  }
  private void okActionPerformed(java.awt.event.ActionEvent evt) {
    if (smtp.getText().trim().isEmpty()) {
      CommonFunctions.showErrorMessage(this, "You must enter a SMTP server.");
      return;
    } else if (smtpUsername.getText().trim().isEmpty()) {
      CommonFunctions.showErrorMessage(this, "You must enter the SMTP username.");
      return;
    } else {
      try {
        int port = Integer.parseInt(smtpPort.getText());
        if (port <= 0) throw new NumberFormatException();

        new InternetAddress(email.getText()).validate();
      } catch (NumberFormatException e) {
        CommonFunctions.showErrorMessage(this, "You must enter a valid SMTP port.");
        return;
      } catch (AddressException e) {
        CommonFunctions.showErrorMessage(this, "You must enter a valid source email address.");
        return;
      }
    }

    retval = 0;

    List<Student> selectedStudents = new ArrayList();
    for (int i = 0; i < studentsTbl.getRowCount(); i++) {
      if ((boolean) studentsTbl.getValueAt(i, 0)) {
        selectedStudents.add(students.get(studentsTbl.convertRowIndexToModel(i)));
      }
    }

    output =
        new Object[] {
          email.getText(),
          smtp.getText(),
          smtpPort.getText(),
          smtpUsername.getText(),
          new String(smtpPassword.getPassword()),
          selectedStudents
        };

    setVisible(false);
  }
Exemple #4
0
  @Override
  public void actionPerformed(ActionEvent arg0) {
    String cmd = arg0.getActionCommand();
    if (cmd.equals("gutneu")) {
      if (!Rechte.hatRecht(Rechte.Gutachten_anlegen, true)) {
        return;
      }
      final JComponent comp = ((JComponent) arg0.getSource());
      new SwingWorker<Void, Void>() {
        @Override
        protected Void doInBackground() throws Exception {
          try {
            JRtaTextField tf = new JRtaTextField("nix", false);
            // System.out.println("in GutachtenWahl");
            GutachtenWahl gwahl =
                new GutachtenWahl(
                    (Point) comp.getLocationOnScreen(), tf, "Neues Gutachten erstellen");
            // System.out.println("Aufruf des Focus***********");
            gwahl.setzeFocus();
            gwahl.setVisible(true);
            // gwahl.setModal(true);

            // System.out.println("Der Rückgabewert der Auswahl = "+tf.getText() );
            if (tf.getText().equalsIgnoreCase("ebericht")) {
              Reha.thisClass.progLoader.GutachenFenster(
                  1, Reha.thisClass.patpanel.aktPatID, -1, "E-Bericht", true, "", -1);
              // ProgLoader.GutachenFenster(1,Reha.thisClass.patpanel.aktPatID
              // ,-1,"E-Bericht",true,"" );
              return null;
            }
            if (tf.getText().equalsIgnoreCase("nachsorge")) {
              Reha.thisClass.progLoader.GutachenFenster(
                  1, Reha.thisClass.patpanel.aktPatID, -1, "Nachsorge", true, "", -1);
              // ProgLoader.GutachenFenster(1,Reha.thisClass.patpanel.aktPatID
              // ,-1,"Nachsorge",true,"" );
              return null;
            }
            gwahl = null;
          } catch (Exception ex) {
            ex.printStackTrace();
          }

          return null;
        }
      }.execute();
      return;
    }
    if (cmd.equals("gutedit")) {
      if (!Rechte.hatRecht(Rechte.Gutachten_editvoll, true)) {
        return;
      }
      doBerichtEdit();
      return;
    }
    if (cmd.equals("gutdelete")) {
      if (aktPanel.equals("leerPanel")) {
        JOptionPane.showMessageDialog(
            null,
            "Oh Herr laß halten...\n\n"
                + "....und welches der nicht vorhandenen Gutachten möchten Sie bitteschön löschen....");
        return;
      }
      if (!Rechte.hatRecht(Rechte.Gutachten_delete, true)) {
        return;
      }
      int currow = tabbericht.getSelectedRow();
      // int anzrow = tabbericht.getRowCount();
      if (currow == -1) {
        JOptionPane.showMessageDialog(null, "Kein Gutachten zum -> löschen <- ausgewählt");
        return;
      }
      String berichtid = (String) tabbericht.getValueAt(currow, 0);
      int frage =
          JOptionPane.showConfirmDialog(
              null,
              "Wollen Sie das Gutachten mit der ID:" + berichtid + " wirklich löschen?",
              "Wichtige Benutzeranfrage",
              JOptionPane.YES_NO_OPTION);
      if (frage == JOptionPane.NO_OPTION) {
        return;
      }
      String sqlcmd = "delete from berhist where berichtid='" + berichtid + "'";
      new ExUndHop().setzeStatement(sqlcmd);
      sqlcmd = "delete from bericht2 where berichtid='" + berichtid + "'";
      new ExUndHop().setzeStatement(sqlcmd);
      sqlcmd = "delete from bericht2ktl where berichtid='" + berichtid + "'";
      new ExUndHop().setzeStatement(sqlcmd);

      currow = TableTool.loescheRow(tabbericht, Integer.valueOf(currow));
      int uebrig = tabbericht.getRowCount();

      anzahlGutachten.setText("Anzahl Gutachten: " + Integer.toString(uebrig));
      Reha.thisClass.patpanel.getTab().setTitleAt(4, macheHtmlTitel(uebrig, "Gutachten"));
      if (uebrig <= 0) {
        holeGutachten(Reha.thisClass.patpanel.patDaten.get(29), "");
      } else {
      }

      return;
    }
    if (cmd.equals("guttools")) {
      new ToolsDlgGutachten("", gutbut[3].getLocationOnScreen());
      return;
    }
  }