Package ar.com.fdvs.dj.domain.entities.columns

Examples of ar.com.fdvs.dj.domain.entities.columns.AbstractColumn


  }

  protected void registerEntity(Entity entity) {
//    log.debug("registering column...");
    //A default name is setted if the user didn't specify one.
    AbstractColumn column = (AbstractColumn)entity;
    if (column.getName() == null){
      column.setName(COLUMN_NAME_PREFIX + colCounter++ );
    }
    if (column.getConditionalStyles() != null && !column.getConditionalStyles().isEmpty()){
      new ConditionalStylesRegistrationManager(getDjd(),getDynamicReport(),column.getName()).registerEntities(column.getConditionalStyles());
    }
    if (column.getTextFormatter() != null) {
      JRDesignParameter parameter = new JRDesignParameter();
      parameter.setName(ExpressionUtils.createParameterName("formatter_", column.getTextFormatter()));
      parameter.setValueClassName(Object.class.getName());
      getDjd().getParametersWithValues().put(parameter.getName(), column.getTextFormatter());
      try {
        getDjd().addParameter(parameter);
      } catch (JRException e) {
        log.debug("repeated parameter: " + parameter.getName());
      }
    }

    if (entity instanceof PropertyColumn) {
      try {
        //addField() will throw an exception only if the column has already been registered.
        PropertyColumn propertyColumn = ((PropertyColumn)entity);
        log.debug("registering column " + column.getName());
        if ( propertyColumn.getColumnProperty() != null && !(entity instanceof ExpressionColumn)){
          getDjd().addField((JRField)transformEntity(entity));
        }
        if (entity instanceof ExpressionColumn) {
          //The Custom Expression parameter must be registered
View Full Code Here


    return super.build();
  }

    public FastReportBuilder addColumn(String title, String property, String className, int width, Style style) throws ColumnBuilderException, ClassNotFoundException {
    AbstractColumn column = ColumnBuilder.getInstance()
      .setColumnProperty(new ColumnProperty(property, className))
      .setWidth(new Integer(width))
      .setTitle(title)
      .build();

    column.setStyle(style);

    addColumn(column);

    return this;
  }
View Full Code Here

    return this;
  }
   
    public FastReportBuilder addColumn(String title, String property, String className, int width, Style style, Style headerStyle) throws ColumnBuilderException, ClassNotFoundException {
      AbstractColumn column = ColumnBuilder.getInstance()
      .setColumnProperty(new ColumnProperty(property, className))
      .setWidth(new Integer(width))
      .setTitle(title)
      .build();
     
      if (style != null)
        column.setStyle(style);
      if (headerStyle != null)
        column.setHeaderStyle(headerStyle);
     
      addColumn(column);
     
      return this;
    }
View Full Code Here

     
      return this;
    }

    public FastReportBuilder addColumn(String title, String property, String className, int width) throws ColumnBuilderException, ClassNotFoundException {
    AbstractColumn column = ColumnBuilder.getInstance()
      .setColumnProperty(new ColumnProperty(property, className))
      .setWidth(new Integer(width))
      .setTitle(title)
      .build();
View Full Code Here

    return this;
  }

  public FastReportBuilder addColumn(String title, String property, String className, int width, boolean fixedWidth) throws ColumnBuilderException, ClassNotFoundException {
    AbstractColumn column = ColumnBuilder.getInstance()
      .setColumnProperty(property, className)
      .setWidth(new Integer(width))
      .setTitle(title)
      .setFixedWidth(Boolean.valueOf(fixedWidth))
      .build();
View Full Code Here

    return this;
  }

  public FastReportBuilder addImageColumn(String title, String property, int width, boolean fixedWidth, ImageScaleMode imageScaleMode) throws ColumnBuilderException, ClassNotFoundException {
    String className = InputStream.class.getName();
    AbstractColumn column = ColumnBuilder.getInstance()
      .setColumnProperty(property, className)
      .setWidth(new Integer(width))
      .setTitle(title)
      .setFixedWidth(Boolean.valueOf(fixedWidth))
      .setColumnType(ColumnBuilder.COLUMN_TYPE_IMAGE)
View Full Code Here

   * @throws ColumnBuilderException
   * @throws ClassNotFoundException
   */
  public FastReportBuilder addImageColumn(String title, String property, int width, boolean fixedWidth,ImageScaleMode imageScaleMode, Style style) throws ColumnBuilderException, ClassNotFoundException {
    String className = InputStream.class.getName();
    AbstractColumn column = ColumnBuilder.getInstance()
    .setColumnProperty(property, className)
    .setWidth(new Integer(width))
    .setTitle(title)
    .setFixedWidth(Boolean.valueOf(fixedWidth))
    .setColumnType(ColumnBuilder.COLUMN_TYPE_IMAGE)
View Full Code Here

   * @return
   * @throws ColumnBuilderException
   * @throws ClassNotFoundException
   */
  public FastReportBuilder addImageColumn(String title, String property, String className, int width, boolean fixedWidth,ImageScaleMode imageScaleMode, Style style) throws ColumnBuilderException, ClassNotFoundException {
    AbstractColumn column = ColumnBuilder.getInstance()
    .setColumnProperty(property, className)
    .setWidth(new Integer(width))
    .setTitle(title)
    .setFixedWidth(Boolean.valueOf(fixedWidth))
    .setColumnType(ColumnBuilder.COLUMN_TYPE_IMAGE)
View Full Code Here

    return this;
  }

  public FastReportBuilder addBarcodeColumn(String title, String property, String className, int barcodeType, boolean showText, int width, boolean fixedWidth, ImageScaleMode imageScaleMode) throws ColumnBuilderException, ClassNotFoundException {
    AbstractColumn column = ColumnBuilder.getInstance()
    .setColumnProperty(property, className)
    .setWidth(new Integer(width))
    .setTitle(title)
    .setFixedWidth(Boolean.valueOf(fixedWidth))
    .setColumnType(ColumnBuilder.COLUMN_TYPE_BARCODE)
View Full Code Here

   * @return
   * @throws ColumnBuilderException
   * @throws ClassNotFoundException
   */
  public FastReportBuilder addBarcodeColumn(String title, String property,String className, int  barcodeType,boolean showText, int width, boolean fixedWidth,ImageScaleMode imageScaleMode, Style style) throws ColumnBuilderException, ClassNotFoundException {
    AbstractColumn column = ColumnBuilder.getInstance()
    .setColumnProperty(property, className)
    .setWidth(new Integer(width))
    .setTitle(title)
    .setFixedWidth(Boolean.valueOf(fixedWidth))
    .setColumnType(ColumnBuilder.COLUMN_TYPE_BARCODE)
View Full Code Here

TOP

Related Classes of ar.com.fdvs.dj.domain.entities.columns.AbstractColumn

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.