@Override
  protected Control createDialogArea(Composite parent) {
    Composite comp = new Composite(parent, 0);
    comp.setLayout(new GridLayout(2, false));

    new Label(comp, SWT.NONE).setText("Patient");
    new Label(comp, SWT.NONE).setText(fall.getPatient().getLabel());

    new Label(comp, SWT.NONE).setText("Fall");
    new Label(comp, SWT.NONE).setText(fall.getLabel());

    new Label(comp, SWT.NONE).setText("Datum");
    datum = new DatePickerCombo(comp, SWT.NONE);

    new Label(comp, SWT.NONE).setText("Zeit");
    zeit = SWTHelper.createText(comp, 1, SWT.BORDER);

    new Label(comp, SWT.NONE).setText("Typ");
    typ = new Combo(comp, SWT.DROP_DOWN);
    for (String s : typenS) {
      typ.add(s);
    }

    // Datum- und Zeitfelder initialisieren
    if (kons == null) {
      setTitle("Neue Konsultation erstellen");
      datum.setDate(new Date());
      zeit.setText(new TimeTool().toString(TimeTool.TIME_SMALL));
    } else {
      setTitle("Konsultation modifizieren");
      TimeTool tt = new TimeTool(kons.getDatum());
      datum.setDate(tt.getTime());
      zeit.setText(data.getKonsBeginn());
      neuTyp = data.getKonsTyp();
    }

    for (int i = 0; i < typenI.length; i++) {
      if (neuTyp == typenI[i]) {
        typ.select(i);
        break;
      }
    }

    return comp;
  }
Ejemplo n.º 2
0
 public static Date getDate(String elexisDate) {
   timeTool.set(elexisDate);
   return timeTool.getTime();
 }