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

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


* @return
* @throws ColumnBuilderException
* @throws ClassNotFoundException
*/
  public FastReportBuilder addBarcodeColumn(String title, String property, String className, int barcodeType, boolean showText, boolean checkSum, String applicationIdentifier, 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


    return this;
  }

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

    return this;
  }

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

    return this;
  }
 
  public FastReportBuilder addColumn(String title, String property, String className, int width, boolean fixedWidth, String pattern, Style style, String fieldDescription) throws ColumnBuilderException, ClassNotFoundException {
    AbstractColumn column = ColumnBuilder.getInstance()
    .setColumnProperty(new ColumnProperty(property, className))
    .setWidth(new Integer(width))
    .setTitle(title)
    .setFixedWidth(Boolean.valueOf(fixedWidth))
    .setPattern(pattern)
View Full Code Here

      header.setHeight(columnsGroup.getHeaderHeight().intValue());
      footer.setHeight(columnsGroup.getFooterHeight().intValue());

      if (columnsGroup.getLayout().isPrintHeaders()) {
        for (Iterator iterator =  getVisibleColumns().iterator(); iterator.hasNext();) {
          AbstractColumn col = (AbstractColumn) iterator.next();

          JRDesignTextField designTextField = createColumnNameTextField(columnsGroup, col);
          designTextField.setPositionType(JRDesignElement.POSITION_TYPE_FLOAT); //XXX changed to see what happens  (must come from the column position property)
          designTextField.setStretchType(JRDesignElement.STRETCH_TYPE_NO_STRETCH); //XXX changeg to see what happens (must come from the column property)
          header.addElement(designTextField);
View Full Code Here

    log.debug("Placing variables in "+type+" band...");
    if ((variables != null) && (!variables.isEmpty())) {
      Iterator it = variables.iterator();
      while (it.hasNext()) {
        ColumnsGroupVariable var = (ColumnsGroupVariable) it.next();
        AbstractColumn col = var.getColumnToApplyOperation();

        String variableName = col.getGroupVariableName(type, columnsGroup.getColumnToGroupBy().getColumnProperty().getProperty());

        JRDesignExpression expression = new JRDesignExpression();
        JRDesignTextField textField = new JRDesignTextField();
        expression.setText("$V{" + variableName + "}");
        expression.setValueClassName(col.getVariableClassName(var.getOperation()));
        if (var.getOperation() != ColumnsGroupVariableOperation.COUNT)
          textField.setPattern(col.getPattern());

        textField.setKey(variableName);
        textField.setExpression(expression);

        if (DJConstants.FOOTER.equals(type)){
          textField.setPositionType(JRDesignElement.POSITION_TYPE_FIX_RELATIVE_TO_TOP);
        }

        textField.setX(col.getPosX().intValue());
        if (yOffset!=0)
          textField.setY(yOffset);

//        textField.setHeight(columnsGroup.getHeaderHeight().intValue());
        textField.setHeight(2 + getReport().getOptions().getDetailHeight().intValue()); //XXX be carefull with the "2+ ..."
        textField.setWidth(col.getWidth().intValue());

        textField.setEvaluationTime(JRExpression.EVALUATION_TIME_GROUP);

        textField.setEvaluationGroup(jgroup);
        //Assign the style to the element.
        //First we look for the specific element style, then the default style for the group variables
        //and finally the column style.
        Style defStyle = DJConstants.HEADER.equals(type)?columnsGroup.getDefaulHeaderStyle():columnsGroup.getDefaulFooterStyle();

        if (var.getStyle() != null)
          applyStyleToElement(var.getStyle(), textField);
        else if (defStyle != null)
          applyStyleToElement(defStyle, textField);
        else {
          //Last resource is tu use the column style, but a copy of it because
          //the one in the internal cache can get modified by the layout manager (like in the odd row case)
          Style style = col.getStyle();
          try {
            style = (Style) BeanUtils.cloneBean(style);
            style.setName(null); //set to null to make applyStyleToElement(...) assign a name
          } catch (Exception e) {  }
          applyStyleToElement(style, textField);
View Full Code Here

  }

  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 (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

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.