Package ar.com.fdvs.dj.domain

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


    designStaticText.setHeight(columnsGroup.getHeaderHeight().intValue());
    designStaticText.setWidth(col.getWidth().intValue());
    designStaticText.setX(col.getPosX().intValue());
    designStaticText.setY(col.getPosY().intValue());

    Style headerStyle = columnsGroup.getColumnHeaderStyle(col);
    if (headerStyle == null)
      headerStyle = columnsGroup.getDefaultColumnHeaederStyle();
    if (headerStyle == null)
      headerStyle = col.getHeaderStyle();
View Full Code Here


      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.getDefaulHeaderVariableStyle()
            : columnsGroup.getDefaulFooterVariableStyle();

      if (var.getStyle() != null)
        applyStyleToElement(var.getStyle(), textField);
      else if (col.getStyle() != null) {
        //Last resource is to 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);
      }
      else if (defStyle != null)
        applyStyleToElement(defStyle, textField);
View Full Code Here

    designStaticText.setHeight(columnsGroup.getHeaderHeight().intValue());
    designStaticText.setWidth(col.getWidth().intValue());
    designStaticText.setX(col.getPosX().intValue());
    designStaticText.setY(col.getPosY().intValue());

    Style headerStyle = columnsGroup.getColumnHeaderStyle(col);
    if (headerStyle == null)
      headerStyle = columnsGroup.getDefaultColumnHeaederStyle();
    if (headerStyle == null)
      headerStyle = col.getHeaderStyle();
View Full Code Here

     
     
      //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)
            ? djGroup.getDefaulHeaderVariableStyle()
            : djGroup.getDefaulFooterVariableStyle();

      if (var.getStyle() != null)
        applyStyleToElement(var.getStyle(), textField);
      else if (col.getStyle() != null) {
        //Last resource is to 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) style.clone();
          style.setName(null); //set to null to make applyStyleToElement(...) assign a name
        } catch (Exception e) {  }
        applyStyleToElement(style, textField);
      }
      else if (defStyle != null)
        applyStyleToElement(defStyle, textField);
View Full Code Here

            //this is the inner most cell
            layoutManager.applyStyleToElement(djmeasure.getStyle() , element);
          }
          //row total only
          if (isRowTotal && !isColumnTotal) {
            Style style = getRowTotalStyle(crosstabRow);
            if (style == null)
              style = djmeasure.getStyle();
            if (style != null)
              layoutManager.applyStyleToElement(style, element);
          }
          //column total only
          if (isColumnTotal && !isRowTotal) {
            Style style = getColumnTotalStyle(crosstabColumn);
            if (style == null)
              style = djmeasure.getStyle();
            if (style != null)
              layoutManager.applyStyleToElement(style, element);
          }
          //row and column total
          if (isRowTotal && isColumnTotal) {
            Style style = getRowTotalStyle(crosstabRow);
            if (style == null)
              style = getColumnTotalStyle(crosstabColumn);
            if (style == null)
              style = djmeasure.getStyle();
            if (style != null)
View Full Code Here

      //The width can be the sum of the with of all the rows starting from the current one, up to the inner most one.
      int auxHeight = getRowHeaderMaxHeight(crosstabRow);
//      int auxHeight = crosstabRow.getHeight(); //FIXME getRowHeaderMaxHeight() must be FIXED because it breaks when 1rs row shows total and 2nd doesn't
      rowTitle.setHeight(auxHeight);

      Style headerstyle = crosstabRow.getHeaderStyle() == null ? this.djcross.getRowHeaderStyle(): crosstabRow.getHeaderStyle();

      if (headerstyle != null){
        layoutManager.applyStyleToElement(headerstyle, rowTitle);
        rowHeaderContents.setBackcolor(headerstyle.getBackgroundColor());
      }

      rowHeaderContents.addElement(rowTitle);
      rowHeaderContents.setMode(new Byte(Transparency.OPAQUE.getValue()));
      applyCellBorder(rowHeaderContents);
View Full Code Here

      //The height can be the sum of the heights of all the columns starting from the current one, up to the inner most one.
      int auxWidth = calculateRowHeaderMaxWidth(crosstabColumn);
      colTitle.setWidth(auxWidth);

      Style headerstyle = crosstabColumn.getHeaderStyle() == null ? this.djcross.getColumnHeaderStyle(): crosstabColumn.getHeaderStyle();
     
      if (headerstyle != null){
        layoutManager.applyStyleToElement(headerstyle,colTitle);
        colHeaerContent.setBackcolor(headerstyle.getBackgroundColor());
      }


      colHeaerContent.addElement(colTitle);
      colHeaerContent.setMode(new Byte(Transparency.OPAQUE.getValue()));
View Full Code Here

    JRDesignCellContents totalHeaderContent = new JRDesignCellContents();
    ctRowGroup.setTotalHeader(totalHeaderContent);
    ctRowGroup.setTotalPosition(BucketDefinition.TOTAL_POSITION_END); //FIXME the total can be at the end of a group or at the beginin
   

    Style totalHeaderstyle = crosstabRow.getTotalHeaderStyle() == null ? this.djcross.getRowTotalheaderStyle(): crosstabRow.getTotalHeaderStyle();
   
    totalHeaderContent.setMode(new Byte(Transparency.OPAQUE.getValue()));
   
    JRDesignTextField element = new JRDesignTextField();
    JRDesignExpression exp = ExpressionUtils.createExpression("\"Total "+crosstabRow.getTitle()+"\"",String.class);
    element.setExpression(exp);
    element.setHeight(crosstabRow.getHeight());

    if (totalHeaderstyle != null) {
      totalHeaderContent.setBackcolor(totalHeaderstyle.getBackgroundColor());
      layoutManager.applyStyleToElement(totalHeaderstyle, element);
    }

    //The width can be the sum of the with of all the rows starting from the current one, up to the inner most one.
    int auxWidth = 0;
View Full Code Here

  private void createColumTotalHeader(JRDesignCrosstabColumnGroup ctColGroup, DJCrosstabColumn crosstabColumn) {
    JRDesignCellContents totalHeaderContent = new JRDesignCellContents();
    ctColGroup.setTotalHeader(totalHeaderContent);
    ctColGroup.setTotalPosition(BucketDefinition.TOTAL_POSITION_END);

    Style totalHeaderstyle = crosstabColumn.getTotalHeaderStyle() == null ? this.djcross.getColumnTotalheaderStyle(): crosstabColumn.getTotalHeaderStyle();
   
    totalHeaderContent.setMode(new Byte(Transparency.OPAQUE.getValue()));

    JRDesignExpression exp = ExpressionUtils.createExpression("\"Total "+crosstabColumn.getTitle()+"\"",String.class);
    JRDesignTextField element = new JRDesignTextField();
    element.setExpression(exp);
    element.setWidth(crosstabColumn.getWidth());


    if (totalHeaderstyle != null) {
      layoutManager.applyStyleToElement(totalHeaderstyle, element);
      totalHeaderContent.setBackcolor(totalHeaderstyle.getBackgroundColor());
    }

    //The height can be the sum of the heights of all the columns starting from the current one, up to the inner most one.
    int auxWidth = 0;
    boolean found = false;
View Full Code Here

   * Creates the graphic element to be shown when the datasource is empty
   */
  protected void setWhenNoDataBand() {
    log.debug("setting up WHEN NO DATA band");
    String whenNoDataText = getReport().getWhenNoDataText();
    Style style = getReport().getWhenNoDataStyle();
    if (whenNoDataText == null || "".equals(whenNoDataText))
      return;
    JRDesignBand band = new JRDesignBand();
    getDesign().setNoData(band);

View Full Code Here

TOP

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

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.