Package net.sf.jasperreports.engine

Examples of net.sf.jasperreports.engine.JRPrintText


    JRGenericPrintElement element
    )
  {
    JRXml4SwfExporter exporter = (JRXml4SwfExporter)exporterContext.getExporter();
   
    JRPrintText text = getTextElementReplacement(exporterContext, element);
   
    try
    {
      exporter.exportText(text);
    }
View Full Code Here


{
  public void exportElement(JRPdfExporterContext exporterContext, JRGenericPrintElement element)
  {
    JRPdfExporter exporter = (JRPdfExporter)exporterContext.getExporter();
   
    JRPrintText text = getTextElementReplacement(exporterContext, element);
   
    try
    {
      exporter.exportText(text);
    }
View Full Code Here

          String token = tokenizer.nextToken();
          offsets[i] = Short.parseShort(token);
        }
      }
     
      JRPrintText printText = (JRPrintText) getDigester().peek();
      printText.setLineBreakOffsets(offsets);
    }
  }
View Full Code Here

        JRLoader.loadBytesFromLocation("jasperreports.png")
        )
      );
    page.addElement(image);

    JRPrintText text = new JRBasePrintText(jasperPrint.getDefaultStyleProvider());
    text.setX(210);
    text.setY(55);
    text.setWidth(345);
    text.setHeight(30);
    text.setTextHeight(text.getHeight());
    text.setHorizontalAlignment(HorizontalAlignEnum.RIGHT);
    text.setLineSpacingFactor(1.3133681f);
    text.setLeadingOffset(-4.955078f);
    text.setStyle(boldStyle);
    text.setFontSize(18);
    text.setText("JasperReports Project Description");
    page.addElement(text);

    text = new JRBasePrintText(jasperPrint.getDefaultStyleProvider());
    text.setX(210);
    text.setY(85);
    text.setWidth(325);
    text.setHeight(15);
    text.setTextHeight(text.getHeight());
    text.setHorizontalAlignment(HorizontalAlignEnum.RIGHT);
    text.setLineSpacingFactor(1.329241f);
    text.setLeadingOffset(-4.076172f);
    text.setStyle(italicStyle);
    text.setFontSize(12);
    text.setText((new SimpleDateFormat("EEE, MMM d, yyyy")).format(new Date()));
    page.addElement(text);

    text = new JRBasePrintText(jasperPrint.getDefaultStyleProvider());
    text.setX(40);
    text.setY(150);
    text.setWidth(515);
    text.setHeight(200);
    text.setTextHeight(text.getHeight());
    text.setHorizontalAlignment(HorizontalAlignEnum.JUSTIFIED);
    text.setLineSpacingFactor(1.329241f);
    text.setLeadingOffset(-4.076172f);
    text.setStyle(normalStyle);
    text.setFontSize(14);
    text.setText(
      "JasperReports is a powerful report-generating tool that has the ability to deliver rich content onto the screen, to the printer or into PDF, HTML, XLS, CSV or XML files.\n\n" +
      "It is entirely written in Java and can be used in a variety of Java enabled applications, including J2EE or Web applications, to generate dynamic content.\n\n" +
      "Its main purpose is to help creating page oriented, ready to print documents in a simple and flexible manner."
      );
    page.addElement(text);
View Full Code Here

        JRLoader.loadBytesFromLocation("jasperreports.png")
        )
      );
    page.addElement(image);

    JRPrintText text = new JRBasePrintText(jasperPrint.getDefaultStyleProvider());
    text.setX(210);
    text.setY(55);
    text.setWidth(345);
    text.setHeight(30);
    text.setTextHeight(text.getHeight());
    text.setHorizontalAlignment(HorizontalAlignEnum.RIGHT);
    text.setLineSpacingFactor(1.3133681f);
    text.setLeadingOffset(-4.955078f);
    text.setStyle(boldStyle);
    text.setFontSize(18);
    text.setText("JasperReports Project Description");
    page.addElement(text);

    text = new JRBasePrintText(jasperPrint.getDefaultStyleProvider());
    text.setX(210);
    text.setY(85);
    text.setWidth(325);
    text.setHeight(15);
    text.setTextHeight(text.getHeight());
    text.setHorizontalAlignment(HorizontalAlignEnum.RIGHT);
    text.setLineSpacingFactor(1.329241f);
    text.setLeadingOffset(-4.076172f);
    text.setStyle(italicStyle);
    text.setFontSize(12);
    text.setText((new SimpleDateFormat("EEE, MMM d, yyyy")).format(new Date()));
    page.addElement(text);

    text = new JRBasePrintText(jasperPrint.getDefaultStyleProvider());
    text.setX(40);
    text.setY(150);
    text.setWidth(515);
    text.setHeight(200);
    text.setTextHeight(text.getHeight());
    text.setHorizontalAlignment(HorizontalAlignEnum.JUSTIFIED);
    text.setLineSpacingFactor(1.329241f);
    text.setLeadingOffset(-4.076172f);
    text.setStyle(normalStyle);
    text.setFontSize(14);
    text.setText(
      "JasperReports is a powerful report-generating tool that has the ability to deliver rich content onto the screen, to the printer or into PDF, HTML, XLS, CSV or XML files.\n\n" +
      "It is entirely written in Java and can be used in a variety of Java enabled applications, including J2EE or Web applications, to generate dynamic content.\n\n" +
      "Its main purpose is to help creating page oriented, ready to print documents in a simple and flexible manner."
      );
    page.addElement(text);
View Full Code Here

  /**
   *
   */
  public void exportProps(JRStyle style, Locale locale)
  {
    JRPrintText text = new JRBasePrintText(null);
    text.setStyle(style);
    Map styledTextAttributes = new HashMap();
    JRFontUtil.getAttributesWithoutAwtFont(styledTextAttributes, text);
    styledTextAttributes.put(TextAttribute.FOREGROUND, text.getForecolor());
    if (style.getModeValue() == null || style.getModeValue() == ModeEnum.OPAQUE)
    {
      styledTextAttributes.put(TextAttribute.BACKGROUND, style.getBackcolor());
    }

View Full Code Here

  /**
   *
   */
  private Map getAttributes(JRStyle style)//FIXMEDOCX put this in util?
  {
    JRPrintText text = new JRBasePrintText(null);
    text.setStyle(style);
   
    Map styledTextAttributes = new HashMap();
    //JRFontUtil.getAttributes(styledTextAttributes, text, (Locale)null);//FIXMEDOCX getLocale());
    JRFontUtil.getAttributesWithoutAwtFont(styledTextAttributes, text);
    styledTextAttributes.put(TextAttribute.FOREGROUND, text.getForecolor());
    if (text.getModeValue() == ModeEnum.OPAQUE)
    {
      styledTextAttributes.put(TextAttribute.BACKGROUND, text.getBackcolor());
    }

    return styledTextAttributes;
  }
View Full Code Here

                   
                    JRPrintPage page = new JRBasePrintPage();
                   
                    page.addElement(image);
                   
                    JRPrintText text = new JRBasePrintText(jasperPrint.getDefaultStyleProvider());
                    text.setText("Prezad"+genderChar+" alun"+genderChar+"\n"+person.getName());
                    text.setX(200);
                    text.setY(250);
                    text.setWidth(470);
                    text.setHeight(50);
                    text.setHorizontalAlignment(JRAlignment.HORIZONTAL_ALIGN_LEFT);
                    text.setLineSpacingFactor(2.0f);
                    text.setLeadingOffset(-4.0f);
                    text.setStyle(bodyStyle);
                    page.addElement(text);
                   
                    text = new JRBasePrintText(jasperPrint.getDefaultStyleProvider());
                    text.setText("Ficamos muito felizes em receber a sua matricula e t�-l"+genderChar+" como cliente. Voc� agora faz parte de um TIME animado, altamente profissional e que est� aqui para ensin�-l"+genderChar+", tirar suas d�vidas, ajuda-l"+genderChar+" a alcan�ar os seus resultados e tamb�m para um bom relacionamento de amizade e companheirismo.\n\n" +
                            "Saiba que faremos o poss�vel para tornar o seu curso em um aprendizado de qualidade e excel�ncia, de forma a atender  suas expectativas e necessidades.\n\n" +
                    "Juntos seremos respons�veis por tornar todos os momentos em que voc� estiver aqui conosco, nos mais agrad�veis poss�veis. Portanto, n�o hesite em nos comunicar ou expressar suas opini�es, informando-nos sobre qualquer acontecimento que n�o lhe agrade, ou para sugest�es, elogios e cr�ticas.");
                    text.setX(95);
                    text.setY(350);
                    text.setWidth(470);
                    text.setHeight(200);
                    text.setHorizontalAlignment(JRAlignment.HORIZONTAL_ALIGN_JUSTIFIED);
                    text.setLineSpacingFactor(10.0f);
                    text.setLeadingOffset(-4.0f);
                    text.setStyle(bodyStyle);
                    page.addElement(text);
                   
                    text = new JRBasePrintText(jasperPrint.getDefaultStyleProvider());
                    text.setText("Sua opini�o � muito importante para n�s!\nE teremos um imenso prazer em atend�-lo.");
                    text.setX(95);
                    text.setY(600);
                    text.setWidth(470);
                    text.setHeight(50);
                    text.setHorizontalAlignment(JRAlignment.HORIZONTAL_ALIGN_CENTER);
                    text.setLineSpacingFactor(2.0f);
                    text.setLeadingOffset(-4.0f);
                    text.setStyle(boldStyle);
                    page.addElement(text);
                   
                    text = new JRBasePrintText(jasperPrint.getDefaultStyleProvider());
                    text.setText("Um abra�o,");
                    text.setX(95);
                    text.setY(670);
                    text.setWidth(470);
                    text.setHeight(50);
                    text.setHorizontalAlignment(JRAlignment.HORIZONTAL_ALIGN_RIGHT);
                    text.setLineSpacingFactor(2.0f);
                    text.setLeadingOffset(-4.0f);
                    text.setStyle(bodyStyle);
                    page.addElement(text);
                   
                    text = new JRBasePrintText(jasperPrint.getDefaultStyleProvider());
                    text.setText( gd.get("namefancy").toString());
                    text.setX(95);
                    text.setY(685);
                    text.setWidth(470);
                    text.setHeight(50);
                    text.setHorizontalAlignment(JRAlignment.HORIZONTAL_ALIGN_RIGHT);
                    text.setLineSpacingFactor(2.0f);
                    text.setLeadingOffset(-4.0f);
                    text.setStyle(boldStyle);
                    page.addElement(text);
                   
//                    text = new JRBasePrintText(jasperPrint.getDefaultStyleProvider());
//                    text.setText("\"Preparar todos os alunos de forma r�pida e eficiente para atuarem no mercado de trabalho, possibilitando-lhes alcan�ar seus objetos pessoais e profissionais.\"");
//                    text.setX(185);
View Full Code Here

           
            if(isSimpleCertifyd){
               
                JRPrintPage page = new JRBasePrintPage();
               
                JRPrintText text = new JRBasePrintText(jasperPrint.getDefaultStyleProvider());
                text.setText("Certificamos que "+genderChar+" alun"+genderChar);
                text.setX(convert(20));
                text.setY(convert(65) + 10);
                text.setWidth(730);
                text.setHeight(27);
                text.setHorizontalAlignment(JRAlignment.HORIZONTAL_ALIGN_CENTER);
                text.setLineSpacingFactor(2.0f);
                text.setLeadingOffset(-4.0f);
                text.setStyle(bodyStyle);
                page.addElement(text);
               
                text = new JRBasePrintText(jasperPrint.getDefaultStyleProvider());
                text.setText(person.getName());
                text.setX(convert(20));
                text.setY(convert(65) + 43);
                text.setWidth(730);
                text.setHeight(53);
                text.setHorizontalAlignment(JRAlignment.HORIZONTAL_ALIGN_CENTER);
                text.setLineSpacingFactor(2.0f);
                text.setLeadingOffset(-4.0f);
                text.setStyle(nameStyle);
                page.addElement(text);
               
                text = new JRBasePrintText(jasperPrint.getDefaultStyleProvider());
                text.setText("concluiu o  programa de cursos OPERADOR DE COMPUTADOR e est� apto para ocupar e exercer atividades relacionadas aos treinamentos descritos abaixo:");
                text.setX(convert(20));
                text.setY(convert(65) + 120);
                text.setWidth(730);
                text.setHeight(65);
                text.setHorizontalAlignment(JRAlignment.HORIZONTAL_ALIGN_CENTER);
                text.setLineSpacingFactor(2.0f);
                text.setLeadingOffset(-4.0f);
                text.setStyle(bodyStyle);
                page.addElement(text);
               
                String listCourses = "";
                for (int i = 0; i < courses.size(); i++) {
                  system.execute(new SetCourseAsPrinted(registration, courses.get(i)));
                  listCourses += courses.get(i);
                    if(i != courses.size() - 1) {
                        listCourses += ", ";
                    }
                }
               
                text = new JRBasePrintText(jasperPrint.getDefaultStyleProvider());
                text.setText(listCourses);
                text.setX(convert(20));
                text.setY(convert(65) + 210);
                text.setWidth(730);
                text.setHeight(75);
                text.setHorizontalAlignment(JRAlignment.HORIZONTAL_ALIGN_CENTER);
                text.setLineSpacingFactor(2.0f);
                text.setLeadingOffset(-4.0f);
                text.setStyle(boldStyle);
                page.addElement(text);
               
                jasperPrint.addPage(page);
            }
            else {
               
                JRPrintPage page = new JRBasePrintPage();
               
                JRPrintText text = new JRBasePrintText(jasperPrint.getDefaultStyleProvider());
                text.setText(person.getName());
                text.setX(convert(20));
                text.setY(convert(45) + 6);
                text.setWidth(730);
                text.setHeight(53);
                text.setHorizontalAlignment(JRAlignment.HORIZONTAL_ALIGN_CENTER);
                text.setLineSpacingFactor(2.0f);
                text.setLeadingOffset(-4.0f);
                text.setStyle(nameStyle);
                page.addElement(text);
               
                text = new JRBasePrintText(jasperPrint.getDefaultStyleProvider());
                text.setText("Certificamos que o aluno acima descrito, concluiu e alcan�ou \no mais alto grau de Qualifica��o Profissional durante o Programa de cursos:");
                text.setX(convert(20));
                text.setY(convert(45) + 63);
                text.setWidth(730);
                text.setHeight(63);
                text.setHorizontalAlignment(JRAlignment.HORIZONTAL_ALIGN_CENTER);
                text.setLineSpacingFactor(2.0f);
                text.setLeadingOffset(-4.0f);
                text.setStyle(bodyStyle);
                page.addElement(text);
               
                JRPrintRectangle rectangle = new JRBasePrintRectangle(jasperPrint.getDefaultStyleProvider());
                rectangle.setX(convert(20)+65);
                rectangle.setY(convert(45)+130);
                rectangle.setWidth(600);
                rectangle.setHeight(62);
                page.addElement(rectangle);
               
                text = new JRBasePrintText(jasperPrint.getDefaultStyleProvider());
                text.setText("T�cnico de Computa��o Junior");
                text.setX(convert(20));
                text.setY(convert(45) + 132);
                text.setWidth(730);
                text.setHeight(62);
                text.setHorizontalAlignment(JRAlignment.HORIZONTAL_ALIGN_CENTER);
                text.setLineSpacingFactor(2.0f);
                text.setLeadingOffset(-4.0f);
                text.setStyle(titleStyle);
                page.addElement(text);
               
                text = new JRBasePrintText(jasperPrint.getDefaultStyleProvider());
                text.setText("M�dulo Profissionalizante");
                text.setX(convert(20));
                text.setY(convert(45) + 166);
                text.setWidth(730);
                text.setHeight(24);
                text.setHorizontalAlignment(JRAlignment.HORIZONTAL_ALIGN_CENTER);
                text.setLineSpacingFactor(2.0f);
                text.setLeadingOffset(-4.0f);
                text.setStyle(bodyStyle);
                page.addElement(text);
               
                text = new JRBasePrintText(jasperPrint.getDefaultStyleProvider());
                text.setText("Estando apto � ocupar e exercer atividades relacionadas aos seguintes treinamentos:");
                text.setX(convert(20));
                text.setY(convert(45) + 200);
                text.setWidth(730);
                text.setHeight(23);
                text.setHorizontalAlignment(JRAlignment.HORIZONTAL_ALIGN_CENTER);
                text.setLineSpacingFactor(2.0f);
                text.setLeadingOffset(-4.0f);
                text.setStyle(bodyStyle);
                page.addElement(text);
               
                String listCourses = "";
                for (int i = 0; i < courses.size(); i++) {
                    listCourses += courses.get(i);
                    if(i != courses.size() - 1) {
                        listCourses += ", ";
                    }
                }
               
                text = new JRBasePrintText(jasperPrint.getDefaultStyleProvider());
                text.setText(listCourses);
                text.setX(convert(20));
                text.setY(convert(45) + 232);
                text.setWidth(730);
                text.setHeight(65);
                text.setHorizontalAlignment(JRAlignment.HORIZONTAL_ALIGN_CENTER);
                text.setLineSpacingFactor(2.0f);
                text.setLeadingOffset(-4.0f);
                text.setStyle(boldStyle);
                page.addElement(text);
               
                jasperPrint.addPage(page);
            }
        } catch (Exception e) {
View Full Code Here

            int posY = convert(10);
            int posX = convert(10);
           
            JRPrintImage imageBkg = printImage("titleReport.gif", posX, posY, 535, 45);
            JRPrintImage logoImage = printImage("corporateLogo.jpg", posX+11, posY, 65, 45);
            JRPrintText titleText = insertTitle("Quadro de Hor�rios", posX+200, posY+11, 330);
           
            for (String date : listDate) {
                posX = convert(10);
               
                GDDate actualDate = new GDDate(date);
                RegistrationMap registrationMap = system.getRegistratioMap();
                page.addElement(imageBkg);
                page.addElement(logoImage);
                page.addElement(titleText);
               
                posY += 50;
               
                JRPrintText text = new JRBasePrintText(jasperPrint.getDefaultStyleProvider());
                text.setText("Data: "+date);
                text.setX(posX);
                text.setY(posY);
                text.setWidth(150);
                text.setHeight(12);
                text.setHorizontalAlignment(JRAlignment.HORIZONTAL_ALIGN_LEFT);
                text.setLineSpacingFactor(2.0f);
                text.setLeadingOffset(-4.0f);
                text.setStyle(normalStyle);
                page.addElement(text);
               
                text = new JRBasePrintText(jasperPrint.getDefaultStyleProvider());
                text.setText("Dia da Semana: "+new SimpleDateFormat("EEEEE").format(new GDDate(date).getDate()));
                text.setX(posX+300);
                text.setY(posY);
                text.setWidth(220);
                text.setHeight(12);
                text.setHorizontalAlignment(JRAlignment.HORIZONTAL_ALIGN_LEFT);
                text.setLineSpacingFactor(2.0f);
                text.setLeadingOffset(-4.0f);
                text.setStyle(normalStyle);
                page.addElement(text);
               
                posY += 17;
               
                text = new JRBasePrintText(jasperPrint.getDefaultStyleProvider());
                text.setText("Funcionamento: das " + startWorkTime + ":00 �s " + endWorkTime + ":00");
                text.setX(posX);
                text.setY(posY);
                text.setWidth(290);
                text.setHeight(12);
                text.setHorizontalAlignment(JRAlignment.HORIZONTAL_ALIGN_LEFT);
                text.setLineSpacingFactor(2.0f);
                text.setLeadingOffset(-4.0f);
                text.setStyle(normalStyle);
                page.addElement(text);
               
                text = new JRBasePrintText(jasperPrint.getDefaultStyleProvider());
                text.setText("Impresso em: "+new GDDate().getFormatedDate());
                text.setX(posX+300);
                text.setY(posY);
                text.setWidth(220);
                text.setHeight(12);
                text.setHorizontalAlignment(JRAlignment.HORIZONTAL_ALIGN_LEFT);
                text.setLineSpacingFactor(2.0f);
                text.setLeadingOffset(-4.0f);
                text.setStyle(normalStyle);
                page.addElement(text);
               
                posY += 16;
               
                text = new JRBasePrintText(jasperPrint.getDefaultStyleProvider());
                text.setText("Obs. Marque com \"X\" os alunos faltantes.\n* Aluno de Reposi��o");
                text.setX(posX);
                text.setY(posY);
                text.setWidth(530);
                text.setHeight(26);
                text.setHorizontalAlignment(JRAlignment.HORIZONTAL_ALIGN_LEFT);
                text.setLineSpacingFactor(2.0f);
                text.setLeadingOffset(-4.0f);
                text.setStyle(normalStyle);
                page.addElement(text);
               
                posY += 23;
                for(int periods=0; periods<3; periods++){
                    String weekDay = new SimpleDateFormat("EEEEE").format(new GDDate(date).getDate()).replace("-feira", "");
                    if(getHourVacancy(weekDay, ((periods+1)*6)+1, ((2+periods)*6))>0){
                        posX = convert(10);
                       
                        JRPrintRectangle rectangle = new JRBasePrintRectangle(jasperPrint.getDefaultStyleProvider());
                        rectangle.setX(posX);
                        rectangle.setY(posY);
                        rectangle.setWidth(535);
                        rectangle.setHeight(14);
                        rectangle.setBackcolor(new Color(153, 153, 153));
                        page.addElement(rectangle);
                       
                        text = new JRBasePrintText(jasperPrint.getDefaultStyleProvider());
                        text.setText(period.get(periods));
                        text.setX(posX);
                        text.setY(posY);
                        text.setWidth(535);
                        text.setHeight(14);
                        text.setHorizontalAlignment(JRAlignment.HORIZONTAL_ALIGN_CENTER);
                        text.setLineSpacingFactor(2.0f);
                        text.setLeadingOffset(-4.0f);
                        text.setStyle(boldStyle);
                        page.addElement(text);
                       
                        posY += 14;
                        int posYTemp = 0;
                       
                        for(int hour=(((periods+1)*6)+1); hour<=((2+periods)*6); hour++){
                            if(getMaxVacancy(weekDay, hour)>0){
    //                      if(!isHourVacancy(j)){
                                int numberOfColumns = getHourVacancy(weekDay, ((periods+1)*6)+1, ((2+periods)*6));
                                int width = Math.round(535/numberOfColumns);
                               
                                rectangle = new JRBasePrintRectangle(jasperPrint.getDefaultStyleProvider());
                                rectangle.setX(posX);
                                rectangle.setY(posY);
                                rectangle.setWidth(width);
                                rectangle.setHeight(14);
                                rectangle.setBackcolor(new Color(204, 204, 204));
                                page.addElement(rectangle);
                               
                                text = new JRBasePrintText(jasperPrint.getDefaultStyleProvider());
                                text.setText(String.valueOf(hour));
                                text.setX(posX);
                                text.setY(posY);
                                text.setWidth(width);
                                text.setHeight(14);
                                text.setHorizontalAlignment(JRAlignment.HORIZONTAL_ALIGN_CENTER);
                                text.setLineSpacingFactor(2.0f);
                                text.setLeadingOffset(-4.0f);
                                text.setStyle(boldStyle);
                                page.addElement(text);
                               
                                posYTemp =posY;
                                for (int box = 0; box < numberTotalComputers; box++) {
                                    posYTemp +=14;
                                    rectangle = new JRBasePrintRectangle(jasperPrint.getDefaultStyleProvider());
                                    rectangle.setX(posX);
                                    rectangle.setY(posYTemp);
                                    rectangle.setWidth(width);
                                    rectangle.setHeight(14);
                                    page.addElement(rectangle);
                                   
                                    JRPrintLine line = new JRBasePrintLine(jasperPrint.getDefaultStyleProvider());
                                    line.setX(posX+14);
                                    line.setY(posYTemp);
                                    line.setWidth(0);
                                    line.setHeight(14);
                                    page.addElement(line);
                                   
                                }
                               
                                actualDate.setHourOfDay(hour);
                               
                                MergeSortAlgorithm sortAlgorithm = new MergeSortAlgorithm();
                               
                                List<RegistrationAppointment> registrationList = registrationMap.getAppointmentsOnThatWeekDay(actualDate);
                                if(registrationList.size() > 1)
                                    sortAlgorithm.sortRegistrationAppointmentByName(registrationList);
                               
                                posYTemp =posY+2;
                                for (int studentIndex = 0; studentIndex < registrationList.size(); studentIndex++) {
                                    posYTemp +=14;
                                    text = new JRBasePrintText(jasperPrint.getDefaultStyleProvider());
                                    text.setText(registrationList.get(studentIndex).getRegistration().getStudent().getName());
                                    text.setX(posX+16);
                                    text.setY(posYTemp);
                                    text.setWidth(width-16);
                                    text.setHeight(12);
                                    text.setHorizontalAlignment(JRAlignment.HORIZONTAL_ALIGN_LEFT);
                                    text.setLineSpacingFactor(2.0f);
                                    text.setLeadingOffset(-4.0f);
                                    text.setStyle(studentNameStyle);
                                    page.addElement(text);
                                }
                               
                                List<RegistrationAppointment> replacementList = registrationMap.getReplacementsOnThatDay(actualDate);
                                if(replacementList.size() > 1)
                                    sortAlgorithm.sortRegistrationAppointmentByName(replacementList);
                               
                                for (int studentIndex = 0; studentIndex < replacementList.size(); studentIndex++) {
                                    posYTemp +=14;
                                    text = new JRBasePrintText(jasperPrint.getDefaultStyleProvider());
                                    text.setText("* "+replacementList.get(studentIndex).getRegistration().getStudent().getName());
                                    text.setX(posX+16);
                                    text.setY(posYTemp);
                                    text.setWidth(width-16);
                                    text.setHeight(12);
                                    text.setHorizontalAlignment(JRAlignment.HORIZONTAL_ALIGN_LEFT);
                                    text.setLineSpacingFactor(2.0f);
                                    text.setLeadingOffset(-4.0f);
                                    text.setStyle(studentNameStyle);
                                    page.addElement(text);
                                }
                               
                                posX += width;
                            }
View Full Code Here

TOP

Related Classes of net.sf.jasperreports.engine.JRPrintText

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.