Package net.sf.paperclips

Examples of net.sf.paperclips.NoBreakPrint


      LineBorder border = new LineBorder(new RGB(100,100,100));
      border.setGapSize(3);
      look.setCellBorder(border);
     
      GridPrint table = new GridPrint("l:p:n, l:d:n, l:p:g, r:p:n, r:p:n",look);
      table.addHeader(new NoBreakPrint(new TextPrint(i18n.tr("Valuta/Datum"),fontTinyBold)));
      table.addHeader(new TextPrint(i18n.tr("Gegenkonto"),fontTinyBold));
      table.addHeader(new TextPrint(i18n.tr("Verwendungszweck"),fontTinyBold));
      table.addHeader(new TextPrint(i18n.tr("Betrag"),fontTinyBold));
      table.addHeader(new TextPrint(i18n.tr("Saldo"),fontTinyBold));

      // Iteration pro Konto
      Iterator<String> konten = groups.keySet().iterator();
     
      while (konten.hasNext())
      {
        String id = konten.next();
        List<Umsatz> umsaetze = groups.get(id);
       
        // Header mit dem Konto
        Konto k = (Konto) Settings.getDBService().createObject(Konto.class,id);
        table.add(new TextPrint(k.getLongName(),fontTinyBold),GridPrint.REMAINDER);
       
       
        // Liste der Umsaetze im Konto
        for (Umsatz u:umsaetze)
        {
          String usage = VerwendungszweckUtil.toString(u,"\n");
          StringBuffer sb = new StringBuffer();
          {
            String name = u.getGegenkontoName();
            if (name != null && name.length() > 0)
              sb.append(name + "\n");
           
            String kto = u.getGegenkontoNummer();
            String blz = u.getGegenkontoBLZ();
            if (kto != null && kto.length() > 0 && blz != null && blz.length() > 0)
            {
              String gi = HBCIProperties.getNameForBank(blz);
              if (gi != null && gi.length() > 0)
                sb.append(i18n.tr("Kto. {0}, {1}",kto,gi));
              else
                sb.append(i18n.tr("Kto. {0}, BLZ {1}",kto,blz));
            }
          }

          TextStyle typeHaben = new TextStyle().font(fontTiny).foreground(new RGB(0,0,0));
          TextStyle typeSoll = new TextStyle().font(fontTiny).foreground(new RGB(200,0,0));

          table.add(new TextPrint(HBCI.DATEFORMAT.format(u.getValuta()) + "\n" + HBCI.DATEFORMAT.format(u.getDatum()),fontTiny));
          table.add(new TextPrint(sb.toString(),fontTiny));
          table.add(new TextPrint(notNull(usage),fontTiny));
          table.add(new NoBreakPrint(new TextPrint(HBCI.DECIMALFORMAT.format(u.getBetrag()) + " " + k.getWaehrung(),u.getBetrag() >= 0 ? typeHaben : typeSoll)));
          table.add(new NoBreakPrint(new TextPrint(HBCI.DECIMALFORMAT.format(u.getSaldo()) + " " + k.getWaehrung(),fontTiny)));
        }
      }
      grid.add(table);
     
      return grid;
View Full Code Here

TOP

Related Classes of net.sf.paperclips.NoBreakPrint

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.