Package ar.com.fdvs.dj.domain

Examples of ar.com.fdvs.dj.domain.AutoText


    /**
     * Adding many autotexts in the same position (header/footer and
     * aligment) makes them to be one on top of the other
     */

    AutoText created = new AutoText(Labels.getLabel("common.Created") + ": " + ZksampleDateFormat.getDateTimeFormater().format(new Date()), AutoText.POSITION_HEADER, HorizontalBandAlignment.RIGHT);
    created.setWidth(new Integer(120));
    created.setStyle(atStyle);
    drb.addAutoText(created);

    AutoText autoText = new AutoText(AutoText.AUTOTEXT_PAGE_X_SLASH_Y, AutoText.POSITION_HEADER, HorizontalBandAlignment.RIGHT);
    autoText.setWidth(new Integer(20));
    autoText.setStyle(atStyle);
    drb.addAutoText(autoText);

    AutoText name1 = new AutoText("The Zksample2 Ltd.", AutoText.POSITION_HEADER, HorizontalBandAlignment.LEFT);
    name1.setPrintWhenExpression(ExpressionHelper.printInFirstPage());
    AutoText name2 = new AutoText("Software Consulting", AutoText.POSITION_HEADER, HorizontalBandAlignment.LEFT);
    name2.setPrintWhenExpression(ExpressionHelper.printInFirstPage());
    AutoText street = new AutoText("256, ZK Direct RIA Street ", AutoText.POSITION_HEADER, HorizontalBandAlignment.LEFT);
    street.setPrintWhenExpression(ExpressionHelper.printInFirstPage());
    AutoText city = new AutoText("ZKoss City", AutoText.POSITION_HEADER, HorizontalBandAlignment.LEFT);
    city.setPrintWhenExpression(ExpressionHelper.printInFirstPage());
    drb.addAutoText(name1).addAutoText(name2).addAutoText(street).addAutoText(city);
    // Footer
    AutoText footerText = new AutoText("Help to prevent the global warming by writing cool software.", AutoText.POSITION_FOOTER, HorizontalBandAlignment.CENTER);
    footerText.setStyle(footerStyle);
    drb.addAutoText(footerText);

    /**
     * ADD ALL USED BUT NOT DIRECT PRINTED FIELDS to the report. We replace
     * the field 'rigType' with a customExpression
View Full Code Here


    /**
     * Adding many autotexts in the same position (header/footer and
     * aligment) makes them to be one on top of the other
     */

    AutoText created = new AutoText(Labels.getLabel("common.Created") + ": " + ZksampleDateFormat.getDateTimeFormater().format(new Date()), AutoText.POSITION_HEADER, HorizontalBandAlignment.RIGHT);
    created.setWidth(new Integer(120));
    created.setStyle(atStyle);
    rb.addAutoText(created);

    AutoText autoText = new AutoText(AutoText.AUTOTEXT_PAGE_X_SLASH_Y, AutoText.POSITION_HEADER, HorizontalBandAlignment.RIGHT);
    autoText.setWidth(new Integer(20));
    autoText.setStyle(atStyle);
    rb.addAutoText(autoText);

    AutoText name1 = new AutoText("The Zksample2 Ltd.", AutoText.POSITION_HEADER, HorizontalBandAlignment.LEFT);
    name1.setPrintWhenExpression(ExpressionHelper.printInFirstPage());
    AutoText name2 = new AutoText("Software Consulting", AutoText.POSITION_HEADER, HorizontalBandAlignment.LEFT);
    name2.setPrintWhenExpression(ExpressionHelper.printInFirstPage());
    AutoText street = new AutoText("256, ZK Direct RIA Street ", AutoText.POSITION_HEADER, HorizontalBandAlignment.LEFT);
    street.setPrintWhenExpression(ExpressionHelper.printInFirstPage());
    AutoText city = new AutoText("ZKoss City", AutoText.POSITION_HEADER, HorizontalBandAlignment.LEFT);
    city.setPrintWhenExpression(ExpressionHelper.printInFirstPage());
    rb.addAutoText(name1).addAutoText(name2).addAutoText(street).addAutoText(city);
    // Footer
    AutoText footerText = new AutoText("Help to prevent the global warming by writing cool software.", AutoText.POSITION_FOOTER, HorizontalBandAlignment.CENTER);
    footerText.setStyle(getDjReportStyles().getFooterStyle());
    rb.addAutoText(footerText);

    DynamicReport dr = new DynamicReport();
    dr = rb.build();

View Full Code Here

     * Adding many autotexts in the same position (header/footer and
     * aligment) makes them to be one on top of the other
     */
    Style atStyle = new StyleBuilder(true).setFont(Font.COMIC_SANS_SMALL).setTextColor(Color.red).build();

    AutoText created = new AutoText(Labels.getLabel("common.Created") + ": " + ZksampleDateFormat.getDateTimeFormater().format(new Date()), AutoText.POSITION_HEADER, HorizontalBandAlignment.RIGHT);
    created.setWidth(new Integer(120));
    created.setStyle(atStyle);
    drb.addAutoText(created);

    AutoText autoText = new AutoText(AutoText.AUTOTEXT_PAGE_X_SLASH_Y, AutoText.POSITION_HEADER, HorizontalBandAlignment.RIGHT);
    autoText.setWidth(new Integer(20));
    autoText.setStyle(atStyle);
    drb.addAutoText(autoText);

    AutoText atCustomerHeader = new AutoText(Labels.getLabel("orderDialogWindow.title") + " :  " + getOrder().getAufBezeichnung(), AutoText.POSITION_HEADER, HorizontalBandAlignment.LEFT);
    atCustomerHeader.setPrintWhenExpression(ExpressionHelper.printInFirstPage());
    atCustomerHeader.setStyle(subtitleStyleUL);
    AutoText name1 = new AutoText(getCustomer().getKunName1(), AutoText.POSITION_HEADER, HorizontalBandAlignment.LEFT);
    name1.setPrintWhenExpression(ExpressionHelper.printInFirstPage());
    AutoText name2 = new AutoText(getCustomer().getKunName2(), AutoText.POSITION_HEADER, HorizontalBandAlignment.LEFT);
    name2.setPrintWhenExpression(ExpressionHelper.printInFirstPage());
    AutoText city = new AutoText(getCustomer().getKunOrt(), AutoText.POSITION_HEADER, HorizontalBandAlignment.LEFT);
    city.setPrintWhenExpression(ExpressionHelper.printInFirstPage());
    AutoText emptyLine = new AutoText("", AutoText.POSITION_HEADER, HorizontalBandAlignment.LEFT);
    emptyLine.setPrintWhenExpression(ExpressionHelper.printInFirstPage());
    drb.addAutoText(atCustomerHeader).addAutoText(emptyLine).addAutoText(name1).addAutoText(name2).addAutoText(city).addAutoText(emptyLine);

    // Footer
    AutoText footerText = new AutoText("Help to prevent the global warming by writing cool software.", AutoText.POSITION_FOOTER, HorizontalBandAlignment.CENTER);
    footerText.setStyle(footerStyle);
    drb.addAutoText(footerText);

    /**
     * Columns Definitions. A new ColumnBuilder instance for each column.
     */
 
View Full Code Here

   * @param pattern   only for dates:  <br>PATTERN_DATE_DATE_ONLY <br> PATTERN_DATE_TIME_ONLY <br> PATTERN_DATE_DATE_TIME
   * @return
   */
  public DynamicReportBuilder addAutoText(byte type, byte position, byte alignment,byte pattern) {
    HorizontalBandAlignment alignment_ = HorizontalBandAlignment.buildAligment(alignment);
    AutoText text = new AutoText(type,position,alignment_,pattern);
    addAutoText(text);

    return this;
  }
View Full Code Here

   * @param width2  If autotext is of the type AUTOTEXT_PAGE_X_OF_Y or AUTOTEXT_PAGE_X_SLASH_Y, this defines the width given to the "total page" variable
   * @return
   */
  public DynamicReportBuilder addAutoText(byte type, byte position, byte alignment,byte pattern, int width, int width2) {
    HorizontalBandAlignment alignment_ = HorizontalBandAlignment.buildAligment(alignment);
    AutoText text = new AutoText(type,position,alignment_,pattern,width,width2);
    addAutoText(text);

    return this;
  }
View Full Code Here

   * @param alignment <br>ALIGMENT_LEFT <br> ALIGMENT_CENTER <br> ALIGMENT_RIGHT
   * @return
   */
  public DynamicReportBuilder addAutoText(String message, byte position, byte alignment) {
    HorizontalBandAlignment alignment_ = HorizontalBandAlignment.buildAligment(alignment);
    AutoText text = new AutoText(message,position,alignment_);
    text.setWidth(AutoText.WIDTH_NOT_SET);
    addAutoText(text);
    return this;
  }
View Full Code Here

   * @param width the width of the message
   * @return
   */
  public DynamicReportBuilder addAutoText(String message, byte position, byte alignment, int width) {
    HorizontalBandAlignment alignment_ = HorizontalBandAlignment.buildAligment(alignment);
    AutoText text = new AutoText(message,position,alignment_,new Integer(width));
    addAutoText(text);
    return this;
  }
View Full Code Here

   * @param alignment  <br>ALIGMENT_LEFT <br> ALIGMENT_CENTER <br> ALIGMENT_RIGHT
   * @return
   */
  public DynamicReportBuilder addAutoText(byte type, byte position, byte alignment, int width, int width2) {
    HorizontalBandAlignment alignment_ = HorizontalBandAlignment.buildAligment(alignment);
    AutoText text = new AutoText(type,position,alignment_);
    text.setWidth(new Integer(width));
    text.setWidth2(new Integer(width2));
    addAutoText(text);
    return this;
  }
View Full Code Here

   * @param alignment  <br>ALIGMENT_LEFT <br> ALIGMENT_CENTER <br> ALIGMENT_RIGHT
   * @return
   */
  public DynamicReportBuilder addAutoText(byte type, byte position, byte alignment) {
    HorizontalBandAlignment alignment_ = HorizontalBandAlignment.buildAligment(alignment);
    AutoText text = new AutoText(type,position,alignment_);
    text.setWidth(AutoText.WIDTH_NOT_SET);
    text.setWidth2(AutoText.WIDTH_NOT_SET);
    addAutoText(text);
    return this;
  }
View Full Code Here

    for (Iterator iterator = positions.iterator(); iterator.hasNext();) {
      HorizontalBandAlignment currentAlignment = (HorizontalBandAlignment) iterator.next();
      int yOffset = 0;

      for (Iterator iter = getReport().getAutoTexts().iterator(); iter.hasNext();) {
        AutoText text = (AutoText) iter.next();
        if (text.getPosition() == AutoText.POSITION_HEADER && text.getAlignment().equals(currentAlignment)) {
          CommonExpressionsHelper.add(yOffset,getDesign(), getReport(), headerband, text);
          yOffset += text.getHeight().intValue();
        }
      }
    }

    /** END */
 
View Full Code Here

TOP

Related Classes of ar.com.fdvs.dj.domain.AutoText

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.