Examples of JRPrintRectangle


Examples of net.sf.jasperreports.engine.JRPrintRectangle

    return willOverflow;
  }

  protected JRPrintElement fill()
  {
    JRPrintRectangle printRectangle = null;
   
    printRectangle = new JRTemplatePrintRectangle(getJRTemplateRectangle());
    printRectangle.setX(getX());
    printRectangle.setY(getRelativeY());
    printRectangle.setWidth(getWidth());
    printRectangle.setHeight(getStretchHeight());

    fillElements = crosstabFiller.getPrintElements();

    if (ignoreWidth && !fillElements.isEmpty())
    {
      int xLimit = getXLimit(fillElements);
      // if the elements exceed the design crosstab width
      if (xLimit > getWidth())
      {
        // increase the rectangle width
        printRectangle.setWidth(xLimit);
        if (getRunDirectionValue() == RunDirectionEnum.RTL)
        {
          // if RTL filling, move the rectangle to the left
          printRectangle.setX(getX() + getWidth() - xLimit);
        }
      }
    }
   
    if (getRunDirectionValue() == RunDirectionEnum.RTL)
View Full Code Here

Examples of net.sf.jasperreports.engine.JRPrintRectangle

  /**
   *
   */
  protected JRPrintElement fill()
  {
    JRPrintRectangle printRectangle = null;

    printRectangle = new JRTemplatePrintRectangle(this.getJRTemplateRectangle());
    printRectangle.setX(this.getX());
    printRectangle.setY(this.getRelativeY());
    printRectangle.setWidth(getWidth());
    printRectangle.setHeight(this.getStretchHeight());
    transferProperties(printRectangle);
   
    return printRectangle;
  }
View Full Code Here

Examples of net.sf.jasperreports.engine.JRPrintRectangle

  /**
   *
   */
  protected JRPrintElement fill()
  {
    JRPrintRectangle printRectangle = new JRTemplatePrintRectangle(getJRTemplateRectangle());

    printRectangle.setX(getX());
    printRectangle.setY(getRelativeY());
    printRectangle.setWidth(getWidth());
    printRectangle.setHeight(getStretchHeight());
   
    return printRectangle;
  }
View Full Code Here

Examples of net.sf.jasperreports.engine.JRPrintRectangle

                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));
View Full Code Here

Examples of net.sf.jasperreports.engine.JRPrintRectangle

                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);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.