예제 #1
0
  private JXPanel getContent() {
    JLabel lab =
        null; //   1                 2     3    4     5     6     7     8     9    10      11  12
              //   13
    FormLayout lay =
        new FormLayout(
            "fill:0:grow(0.5),5dlu,20dlu,60dlu,20dlu,20dlu,60dlu,25dlu,60dlu,25dlu,60dlu,5dlu,5dlu,fill:0:grow(0.5),",
            // 1   2   3    4       5    6  7   8  9   10 11 12 13  14 15  16  17  18 19  20  21
            "15dlu,p,15dlu,80dlu:g,10dlu,p,2dlu,p,2dlu,p,2dlu,p,2dlu,p,2dlu,p,2dlu,p,5dlu,p,15dlu,p,15dlu");
    CellConstraints cc = new CellConstraints();
    this.content = new JXPanel();
    this.content.setOpaque(false);
    this.content.setLayout(lay);

    lab = new JLabel("von..");
    this.content.add(lab, cc.xy(3, 2));
    this.tfs[0] = new JRtaTextField("DATUM", false);
    this.tfs[0].setText(DatFunk.sHeute());
    this.content.add(this.tfs[0], cc.xy(4, 2));

    lab = new JLabel("bis..");
    this.content.add(lab, cc.xy(6, 2));
    this.tfs[1] = new JRtaTextField("DATUM", false);
    this.tfs[1].setText(DatFunk.sHeute());
    this.content.add(this.tfs[1], cc.xy(7, 2));

    this.content.add(
        (this.buts[0] = ButtonTools.macheButton("ermitteln", "ermitteln", al)), cc.xyw(11, 2, 2));

    anmeldemod = new MyAnmeldeTableModel();
    String[] cols = {"angelegt am", "RezeptNr.", "Behandl.Beginn", "angelegt von", "", ""};
    anmeldemod.setColumnIdentifiers(cols);
    anmeldetbl = new JXTable(anmeldemod);
    anmeldetbl.getColumn(4).setMinWidth(0);
    anmeldetbl.getColumn(4).setMaxWidth(0);
    anmeldetbl.getColumn(5).setMinWidth(0);
    anmeldetbl.getColumn(5).setMaxWidth(0);
    anmeldetbl.getColumn(5).setMaxWidth(0);

    anmeldetbl.setEditable(false);
    anmeldetbl.addMouseListener(tblmouse);

    JScrollPane jscr = JCompTools.getTransparentScrollPane(anmeldetbl);
    jscr.validate();
    this.content.add(jscr, cc.xyw(3, 4, 10, CellConstraints.FILL, CellConstraints.DEFAULT));

    lab = new JLabel("Anzahl");
    lab.setForeground(Color.BLUE);
    this.content.add(lab, cc.xy(4, 6, CellConstraints.RIGHT, CellConstraints.DEFAULT));
    lab = new JLabel("Beh.Einheiten");
    lab.setForeground(Color.BLUE);
    this.content.add(lab, cc.xy(7, 6, CellConstraints.RIGHT, CellConstraints.DEFAULT));
    lab = new JLabel("Umsätze");
    lab.setForeground(Color.BLUE);
    this.content.add(lab, cc.xyw(9, 6, 2, CellConstraints.RIGHT, CellConstraints.DEFAULT));
    lab = new JLabel("Minuten");
    lab.setForeground(Color.RED);
    this.content.add(lab, cc.xyw(11, 6, 2, CellConstraints.RIGHT, CellConstraints.DEFAULT));

    this.content.add(
        (kglab[0] = new JLabel("Physio")),
        cc.xyw(3, 8, 2, CellConstraints.LEFT, CellConstraints.DEFAULT));
    this.content.add(
        (kglab[1] = new JLabel("0")), cc.xy(4, 8, CellConstraints.RIGHT, CellConstraints.DEFAULT));
    this.content.add(
        (kglab[2] = new JLabel("0")), cc.xy(7, 8, CellConstraints.RIGHT, CellConstraints.DEFAULT));
    this.content.add(
        (kglab[3] = new JLabel("0,00")),
        cc.xyw(9, 8, 2, CellConstraints.RIGHT, CellConstraints.DEFAULT));
    this.content.add(
        (kglab[4] = new JLabel("0")),
        cc.xyw(11, 8, 2, CellConstraints.RIGHT, CellConstraints.DEFAULT));

    this.content.add(
        (malab[0] = new JLabel("Massage")),
        cc.xyw(3, 10, 2, CellConstraints.LEFT, CellConstraints.DEFAULT));
    this.content.add(
        (malab[1] = new JLabel("0")), cc.xy(4, 10, CellConstraints.RIGHT, CellConstraints.DEFAULT));
    this.content.add(
        (malab[2] = new JLabel("0")), cc.xy(7, 10, CellConstraints.RIGHT, CellConstraints.DEFAULT));
    this.content.add(
        (malab[3] = new JLabel("0,00")),
        cc.xyw(9, 10, 2, CellConstraints.RIGHT, CellConstraints.DEFAULT));
    this.content.add(
        (malab[4] = new JLabel("0")),
        cc.xyw(11, 10, 2, CellConstraints.RIGHT, CellConstraints.DEFAULT));

    this.content.add(
        (erlab[0] = new JLabel("Ergo")),
        cc.xyw(3, 12, 2, CellConstraints.LEFT, CellConstraints.DEFAULT));
    this.content.add(
        (erlab[1] = new JLabel("0")), cc.xy(4, 12, CellConstraints.RIGHT, CellConstraints.DEFAULT));
    this.content.add(
        (erlab[2] = new JLabel("0")), cc.xy(7, 12, CellConstraints.RIGHT, CellConstraints.DEFAULT));
    this.content.add(
        (erlab[3] = new JLabel("0,00")),
        cc.xyw(9, 12, 2, CellConstraints.RIGHT, CellConstraints.DEFAULT));
    this.content.add(
        (erlab[4] = new JLabel("0")),
        cc.xyw(11, 12, 2, CellConstraints.RIGHT, CellConstraints.DEFAULT));

    this.content.add(
        (lolab[0] = new JLabel("Logo")),
        cc.xyw(3, 14, 2, CellConstraints.LEFT, CellConstraints.DEFAULT));
    this.content.add(
        (lolab[1] = new JLabel("0")), cc.xy(4, 14, CellConstraints.RIGHT, CellConstraints.DEFAULT));
    this.content.add(
        (lolab[2] = new JLabel("0")), cc.xy(7, 14, CellConstraints.RIGHT, CellConstraints.DEFAULT));
    this.content.add(
        (lolab[3] = new JLabel("0,00")),
        cc.xyw(9, 14, 2, CellConstraints.RIGHT, CellConstraints.DEFAULT));
    this.content.add(
        (lolab[4] = new JLabel("0")),
        cc.xyw(11, 14, 2, CellConstraints.RIGHT, CellConstraints.DEFAULT));

    this.content.add(
        (rhlab[0] = new JLabel("Reha")),
        cc.xyw(3, 16, 2, CellConstraints.LEFT, CellConstraints.DEFAULT));
    this.content.add(
        (rhlab[1] = new JLabel("0")), cc.xy(4, 16, CellConstraints.RIGHT, CellConstraints.DEFAULT));
    this.content.add(
        (rhlab[2] = new JLabel("0")), cc.xy(7, 16, CellConstraints.RIGHT, CellConstraints.DEFAULT));
    this.content.add(
        (rhlab[3] = new JLabel("0,00")),
        cc.xyw(9, 16, 2, CellConstraints.RIGHT, CellConstraints.DEFAULT));
    this.content.add(
        (rhlab[4] = new JLabel("0")),
        cc.xyw(11, 16, 2, CellConstraints.RIGHT, CellConstraints.DEFAULT));

    this.content.add(
        (polab[0] = new JLabel("Podo")),
        cc.xyw(3, 18, 2, CellConstraints.LEFT, CellConstraints.DEFAULT));
    this.content.add(
        (polab[1] = new JLabel("0")), cc.xy(4, 18, CellConstraints.RIGHT, CellConstraints.DEFAULT));
    this.content.add(
        (polab[2] = new JLabel("0")), cc.xy(7, 18, CellConstraints.RIGHT, CellConstraints.DEFAULT));
    this.content.add(
        (polab[3] = new JLabel("0,00")),
        cc.xyw(9, 18, 2, CellConstraints.RIGHT, CellConstraints.DEFAULT));
    this.content.add(
        (polab[4] = new JLabel("0")),
        cc.xyw(11, 18, 2, CellConstraints.RIGHT, CellConstraints.DEFAULT));

    summenlab[0] = new JLabel("Summen");
    summenlab[0].setForeground(Color.RED);
    summenlab[1] = new JLabel("0");
    summenlab[1].setForeground(Color.RED);
    summenlab[2] = new JLabel("0");
    summenlab[2].setForeground(Color.RED);
    summenlab[3] = new JLabel("0,00");
    summenlab[3].setForeground(Color.RED);
    summenlab[4] = new JLabel("0");
    summenlab[4].setForeground(Color.RED);

    this.content.add(summenlab[0], cc.xyw(3, 20, 2, CellConstraints.LEFT, CellConstraints.DEFAULT));
    this.content.add(summenlab[1], cc.xy(4, 20, CellConstraints.RIGHT, CellConstraints.DEFAULT));
    this.content.add(summenlab[2], cc.xy(7, 20, CellConstraints.RIGHT, CellConstraints.DEFAULT));
    this.content.add(
        summenlab[3], cc.xyw(9, 20, 2, CellConstraints.RIGHT, CellConstraints.DEFAULT));
    this.content.add(
        summenlab[4], cc.xyw(11, 20, 2, CellConstraints.RIGHT, CellConstraints.DEFAULT));

    this.content.add(
        (this.buts[1] =
            ButtonTools.macheButton("komplette Rezeptdaten in OO-Calc übertragen", "calc", al)),
        cc.xyw(3, 22, 10, CellConstraints.FILL, CellConstraints.DEFAULT));

    return this.content;
  }
예제 #2
0
  private JXPanel getContent() {
    //                 1     2     3     4      5     6    7     8      9
    String xwerte = "10dlu,200dlu,40dlu,120dlu,40dlu,65dlu,2dlu,60dlu,10dlu";
    //                1    2   3  4   5  6  7   8  9  10  11   12   13
    String ywerte = "10dlu,p,2dlu,p,2dlu,p,2dlu,p,2dlu,p,2dlu:g,2dlu,p,10dlu";
    FormLayout lay = new FormLayout(xwerte, ywerte);
    CellConstraints cc = new CellConstraints();
    JXPanel jpan = new JXPanel();
    jpan.setLayout(lay);
    /** * rechte Seite ** */
    tfs[0] = new JRtaTextField("DATUM", true);
    tfs[0].setText(DatFunk.sHeute());
    tfs[1] = new JRtaTextField("DATUM", true);
    tfs[1].setText(DatFunk.sHeute());
    tfs[2] = new JRtaTextField("nix", true);
    JLabel lab = new JLabel("neues Kassenbuch erzeugen");
    jpan.add(lab, cc.xyw(6, 2, 3));
    lab = new JLabel("von Datum");
    jpan.add(lab, cc.xy(6, 4));
    jpan.add(tfs[0], cc.xy(8, 4));
    lab = new JLabel("bis Datum");
    jpan.add(lab, cc.xy(6, 6));
    jpan.add(tfs[1], cc.xy(8, 6));
    lab = new JLabel("Name d. Kassenbuches");
    jpan.add(lab, cc.xy(6, 8));
    jpan.add(tfs[2], cc.xy(8, 8));
    buts[1] = ButtonTools.macheButton("erzeugen", "newtable", al);
    jpan.add(buts[1], cc.xy(8, 10));
    /** **Mitte*** */
    lab = new JLabel("bislang vorhandene Kassenbücher");
    jpan.add(lab, cc.xy(4, 2));

    kbvorhanden = new JList();
    JScrollPane jscr = JCompTools.getTransparentScrollPane(kbvorhanden);
    jscr.validate();
    jpan.add(jscr, cc.xywh(4, 4, 1, 8, CellConstraints.DEFAULT, CellConstraints.FILL));
    new SwingWorker<Void, Void>() {
      @Override
      protected Void doInBackground() throws Exception {
        long zeit = System.currentTimeMillis();
        while (!RehaKassenbuch.DbOk) {
          Thread.sleep(50);
          if (System.currentTimeMillis() - zeit > 10000) {
            break;
          }
        }
        if (RehaKassenbuch.DbOk) {
          doKBErmitteln();
        } else {
          System.exit(0);
        }
        return null;
      }
    }.execute();
    buts[0] = ButtonTools.macheButton("löschen", "deletetable", al);
    jpan.add(buts[0], cc.xy(4, 13));

    /** * Linke Seite ** */
    lab = new JLabel("");
    lab.setIcon(new ImageIcon(RehaKassenbuch.progHome + "icons/GutenbergBibel.png"));
    jpan.add(lab, cc.xywh(2, 2, 1, 11, CellConstraints.DEFAULT, CellConstraints.CENTER));

    jpan.validate();
    return jpan;
  }