Examples of JRDesignCrosstabRowGroup


Examples of net.sf.jasperreports.crosstabs.design.JRDesignCrosstabRowGroup

  public static final String ATTRIBUTE_width = "width";
  public static final String ATTRIBUTE_headerPosition = "headerPosition";

  public Object createObject(Attributes attributes)
  {
    JRDesignCrosstabRowGroup group = new JRDesignCrosstabRowGroup();
   
    setGroupAtts(attributes, group);
   
    String widthAttr = attributes.getValue(ATTRIBUTE_width);
    if (widthAttr != null)
    {
      group.setWidth(Integer.parseInt(widthAttr));
    }
   
    CrosstabRowPositionEnum position = CrosstabRowPositionEnum.getByName(attributes.getValue(ATTRIBUTE_headerPosition));
    if (position != null)
    {
      group.setPosition(position);
    }
   
    return group;
  }
View Full Code Here

Examples of net.sf.jasperreports.crosstabs.design.JRDesignCrosstabRowGroup

   */
  private void registerRows() {
    for (int i =  0; i < rows.length; i++) {
      DJCrosstabRow crosstabRow = rows[i];

      JRDesignCrosstabRowGroup ctRowGroup = new JRDesignCrosstabRowGroup();
      ctRowGroup.setWidth(crosstabRow.getHeaderWidth());
      ctRowGroup.setName(crosstabRow.getProperty().getProperty());

      JRDesignCrosstabBucket rowBucket = new JRDesignCrosstabBucket();
      ctRowGroup.setBucket(rowBucket);

      JRDesignExpression bucketExp = ExpressionUtils.createExpression("$F{"+crosstabRow.getProperty().getProperty()+"}", crosstabRow.getProperty().getValueClassName());
      rowBucket.setExpression(bucketExp);


      JRDesignCellContents rowHeaderContents = new JRDesignCellContents();
      JRDesignTextField rowTitle = new JRDesignTextField();

      JRDesignExpression rowTitExp = new JRDesignExpression();
      rowTitExp.setValueClassName(crosstabRow.getProperty().getValueClassName());
      rowTitExp.setText("$V{"+crosstabRow.getProperty().getProperty()+"}");

      rowTitle.setExpression(rowTitExp);
      rowTitle.setWidth(crosstabRow.getHeaderWidth());

      //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 sho total and 2nd doesnt
      rowTitle.setHeight(auxHeight);


      if (crosstabRow.getHeaderStyle() != null)
        layoutManager.applyStyleToElement(crosstabRow.getHeaderStyle(), rowTitle);

      rowHeaderContents.addElement(rowTitle);
      rowHeaderContents.setBackcolor(colors[cols.length-1][i]);
//      rowHeaderContents.setBackcolor(colors[0][0]);
//      rowHeaderContents.setBackcolor(Color.blue);
      rowHeaderContents.setMode(new Byte(Transparency.OPAQUE.getValue()));
      applyCellBorder(rowHeaderContents);

      ctRowGroup.setHeader(rowHeaderContents );

      if (crosstabRow.isShowTotals())
        createRowTotalHeader(ctRowGroup,crosstabRow);


View Full Code Here

Examples of net.sf.jasperreports.crosstabs.design.JRDesignCrosstabRowGroup

   */
  private void registerRows() {
    for (int i =  0; i < rows.length; i++) {
      DJCrosstabRow crosstabRow = rows[i];

      JRDesignCrosstabRowGroup ctRowGroup = new JRDesignCrosstabRowGroup();
      ctRowGroup.setWidth(crosstabRow.getHeaderWidth());
      ctRowGroup.setName(crosstabRow.getProperty().getProperty());

      JRDesignCrosstabBucket rowBucket = new JRDesignCrosstabBucket();
      ctRowGroup.setBucket(rowBucket);

      JRDesignExpression bucketExp = ExpressionUtils.createExpression("$F{"+crosstabRow.getProperty().getProperty()+"}", crosstabRow.getProperty().getValueClassName());
      rowBucket.setExpression(bucketExp);


      JRDesignCellContents rowHeaderContents = new JRDesignCellContents();
      JRDesignTextField rowTitle = new JRDesignTextField();

      JRDesignExpression rowTitExp = new JRDesignExpression();
      rowTitExp.setValueClassName(crosstabRow.getProperty().getValueClassName());
      rowTitExp.setText("$V{"+crosstabRow.getProperty().getProperty()+"}");

      rowTitle.setExpression(rowTitExp);
      rowTitle.setWidth(crosstabRow.getHeaderWidth());

      //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 sho total and 2nd doesnt
      rowTitle.setHeight(auxHeight);


      if (crosstabRow.getHeaderStyle() != null)
        layoutManager.applyStyleToElement(crosstabRow.getHeaderStyle(), rowTitle);

      rowHeaderContents.addElement(rowTitle);
      rowHeaderContents.setBackcolor(colors[cols.length-1][i]);
//      rowHeaderContents.setBackcolor(colors[0][0]);
//      rowHeaderContents.setBackcolor(Color.blue);
      rowHeaderContents.setMode(new Byte(Transparency.OPAQUE.getValue()));
      applyCellBorder(rowHeaderContents);

      ctRowGroup.setHeader(rowHeaderContents );

      if (crosstabRow.isShowTotals())
        createRowTotalHeader(ctRowGroup,crosstabRow);


View Full Code Here

Examples of net.sf.jasperreports.crosstabs.design.JRDesignCrosstabRowGroup

   */
  private void registerRows() {
    for (int i =  0; i < rows.length; i++) {
      DJCrosstabRow crosstabRow = rows[i];

      JRDesignCrosstabRowGroup ctRowGroup = new JRDesignCrosstabRowGroup();
      ctRowGroup.setWidth(crosstabRow.getHeaderWidth());
      ctRowGroup.setName(crosstabRow.getProperty().getProperty());

      JRDesignCrosstabBucket rowBucket = new JRDesignCrosstabBucket();
      ctRowGroup.setBucket(rowBucket);

      JRDesignExpression bucketExp = ExpressionUtils.createExpression("$F{"+crosstabRow.getProperty().getProperty()+"}", crosstabRow.getProperty().getValueClassName());
      rowBucket.setExpression(bucketExp);


      JRDesignCellContents rowHeaderContents = new JRDesignCellContents();
      JRDesignTextField rowTitle = new JRDesignTextField();

      JRDesignExpression rowTitExp = new JRDesignExpression();
      rowTitExp.setValueClassName(crosstabRow.getProperty().getValueClassName());
      rowTitExp.setText("$V{"+crosstabRow.getProperty().getProperty()+"}");

      rowTitle.setExpression(rowTitExp);
      rowTitle.setWidth(crosstabRow.getHeaderWidth());

      //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 sho total and 2nd doesnt
      rowTitle.setHeight(auxHeight);


      if (crosstabRow.getHeaderStyle() != null)
        layoutManager.applyStyleToElement(crosstabRow.getHeaderStyle(), rowTitle);

      rowHeaderContents.addElement(rowTitle);
      rowHeaderContents.setBackcolor(colors[i][rows.length-1]);
      rowHeaderContents.setMode(new Byte(Transparency.OPAQUE.getValue()));
      applyCellBorder(rowHeaderContents);

      ctRowGroup.setHeader(rowHeaderContents );

      if (crosstabRow.isShowTotals())
        createRowTotalHeader(ctRowGroup,crosstabRow);


View Full Code Here

Examples of net.sf.jasperreports.crosstabs.design.JRDesignCrosstabRowGroup

   */
  private void registerRows() {
    for (int i =  0; i < rows.length; i++) {
      DJCrosstabRow crosstabRow = rows[i];

      JRDesignCrosstabRowGroup ctRowGroup = new JRDesignCrosstabRowGroup();
     
      ctRowGroup.setWidth(crosstabRow.getHeaderWidth());
     
      ctRowGroup.setName(crosstabRow.getProperty().getProperty());

      JRDesignCrosstabBucket rowBucket = new JRDesignCrosstabBucket();
      ctRowGroup.setBucket(rowBucket);

      JRDesignExpression bucketExp = ExpressionUtils.createExpression("$F{"+crosstabRow.getProperty().getProperty()+"}", crosstabRow.getProperty().getValueClassName());
      rowBucket.setExpression(bucketExp);


      JRDesignCellContents rowHeaderContents = new JRDesignCellContents();
      JRDesignTextField rowTitle = new JRDesignTextField();

      JRDesignExpression rowTitExp = new JRDesignExpression();
      rowTitExp.setValueClassName(crosstabRow.getProperty().getValueClassName());
      rowTitExp.setText("$V{"+crosstabRow.getProperty().getProperty()+"}");

      rowTitle.setExpression(rowTitExp);
      rowTitle.setWidth(crosstabRow.getHeaderWidth());

      //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);

      ctRowGroup.setHeader(rowHeaderContents );

      if (crosstabRow.isShowTotals())
        createRowTotalHeader(ctRowGroup,crosstabRow);


View Full Code Here

Examples of net.sf.jasperreports.crosstabs.design.JRDesignCrosstabRowGroup

   */
  private void registerRows() {
    for (int i =  0; i < rows.length; i++) {
      DJCrosstabRow crosstabRow = rows[i];

      JRDesignCrosstabRowGroup ctRowGroup = new JRDesignCrosstabRowGroup();
      ctRowGroup.setWidth(crosstabRow.getHeaderWidth());
      ctRowGroup.setName(crosstabRow.getProperty().getProperty());

      JRDesignCrosstabBucket rowBucket = new JRDesignCrosstabBucket();
      ctRowGroup.setBucket(rowBucket);

      JRDesignExpression bucketExp = ExpressionUtils.createExpression("$F{"+crosstabRow.getProperty().getProperty()+"}", crosstabRow.getProperty().getValueClassName());
      rowBucket.setExpression(bucketExp);


      JRDesignCellContents rowHeaderContents = new JRDesignCellContents();
      JRDesignTextField rowTitle = new JRDesignTextField();

      JRDesignExpression rowTitExp = new JRDesignExpression();
      rowTitExp.setValueClassName(crosstabRow.getProperty().getValueClassName());
      rowTitExp.setText("$V{"+crosstabRow.getProperty().getProperty()+"}");

      rowTitle.setExpression(rowTitExp);
      rowTitle.setWidth(crosstabRow.getHeaderWidth());

      //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 sho total and 2nd doesnt
      rowTitle.setHeight(auxHeight);


      if (crosstabRow.getHeaderStyle() != null)
        layoutManager.applyStyleToElement(crosstabRow.getHeaderStyle(), rowTitle);

      rowHeaderContents.addElement(rowTitle);
      rowHeaderContents.setBackcolor(colors[cols.length-1][i]);
//      rowHeaderContents.setBackcolor(colors[0][0]);
//      rowHeaderContents.setBackcolor(Color.blue);
      rowHeaderContents.setMode(new Byte(Transparency.OPAQUE.getValue()));
      applyCellBorder(rowHeaderContents);

      ctRowGroup.setHeader(rowHeaderContents );

      if (crosstabRow.isShowTotals())
        createRowTotalHeader(ctRowGroup,crosstabRow);


View Full Code Here

Examples of net.sf.jasperreports.crosstabs.design.JRDesignCrosstabRowGroup

   */
  private void registerRows() {
    for (int i =  0; i < rows.length; i++) {
      DJCrosstabRow crosstabRow = rows[i];

      JRDesignCrosstabRowGroup ctRowGroup = new JRDesignCrosstabRowGroup();
     
      ctRowGroup.setWidth(crosstabRow.getHeaderWidth());
     
      ctRowGroup.setName(crosstabRow.getProperty().getProperty());

      JRDesignCrosstabBucket rowBucket = new JRDesignCrosstabBucket();
      ctRowGroup.setBucket(rowBucket);

      JRDesignExpression bucketExp = ExpressionUtils.createExpression("$F{"+crosstabRow.getProperty().getProperty()+"}", crosstabRow.getProperty().getValueClassName());
      rowBucket.setExpression(bucketExp);


      JRDesignCellContents rowHeaderContents = new JRDesignCellContents();
      JRDesignTextField rowTitle = new JRDesignTextField();

      JRDesignExpression rowTitExp = new JRDesignExpression();
      rowTitExp.setValueClassName(crosstabRow.getProperty().getValueClassName());
      rowTitExp.setText("$V{"+crosstabRow.getProperty().getProperty()+"}");

      rowTitle.setExpression(rowTitExp);
      rowTitle.setWidth(crosstabRow.getHeaderWidth());

      //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);

      ctRowGroup.setHeader(rowHeaderContents );

      if (crosstabRow.isShowTotals())
        createRowTotalHeader(ctRowGroup,crosstabRow);


View Full Code Here

Examples of net.sf.jasperreports.crosstabs.design.JRDesignCrosstabRowGroup

   */
  private void registerRows() {
    for (int i =  0; i < rows.length; i++) {
      DJCrosstabRow crosstabRow = rows[i];

      JRDesignCrosstabRowGroup ctRowGroup = new JRDesignCrosstabRowGroup();
      ctRowGroup.setWidth(crosstabRow.getHeaderWidth());
      ctRowGroup.setName(crosstabRow.getProperty().getProperty());

      JRDesignCrosstabBucket rowBucket = new JRDesignCrosstabBucket();
      ctRowGroup.setBucket(rowBucket);

      JRDesignExpression bucketExp = ExpressionUtils.createExpression("$F{"+crosstabRow.getProperty().getProperty()+"}", crosstabRow.getProperty().getValueClassName());
      rowBucket.setExpression(bucketExp);


      JRDesignCellContents rowHeaderContents = new JRDesignCellContents();
      JRDesignTextField rowTitle = new JRDesignTextField();

      JRDesignExpression rowTitExp = new JRDesignExpression();
      rowTitExp.setValueClassName(crosstabRow.getProperty().getValueClassName());
      rowTitExp.setText("$V{"+crosstabRow.getProperty().getProperty()+"}");

      rowTitle.setExpression(rowTitExp);
      rowTitle.setWidth(crosstabRow.getHeaderWidth());

      //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 sho total and 2nd doesnt
      rowTitle.setHeight(auxHeight);


      if (crosstabRow.getHeaderStyle() != null)
        layoutManager.applyStyleToElement(crosstabRow.getHeaderStyle(), rowTitle);

      rowHeaderContents.addElement(rowTitle);
      rowHeaderContents.setBackcolor(colors[cols.length-1][i]);
//      rowHeaderContents.setBackcolor(colors[0][0]);
//      rowHeaderContents.setBackcolor(Color.blue);
      rowHeaderContents.setMode(new Byte(Transparency.OPAQUE.getValue()));
      applyCellBorder(rowHeaderContents);

      ctRowGroup.setHeader(rowHeaderContents );

      if (crosstabRow.isShowTotals())
        createRowTotalHeader(ctRowGroup,crosstabRow);


View Full Code Here

Examples of net.sf.jasperreports.crosstabs.design.JRDesignCrosstabRowGroup

   */
  private void registerRows() {
    for (int i =  0; i < rows.length; i++) {
      DJCrosstabRow crosstabRow = rows[i];

      JRDesignCrosstabRowGroup ctRowGroup = new JRDesignCrosstabRowGroup();
     
      ctRowGroup.setWidth(crosstabRow.getHeaderWidth());
     
      ctRowGroup.setName(crosstabRow.getProperty().getProperty());

      JRDesignCrosstabBucket rowBucket = new JRDesignCrosstabBucket();
      ctRowGroup.setBucket(rowBucket);

      JRDesignExpression bucketExp = ExpressionUtils.createExpression("$F{"+crosstabRow.getProperty().getProperty()+"}", crosstabRow.getProperty().getValueClassName());
      rowBucket.setExpression(bucketExp);


      JRDesignCellContents rowHeaderContents = new JRDesignCellContents();
      JRDesignTextField rowTitle = new JRDesignTextField();

      JRDesignExpression rowTitExp = new JRDesignExpression();
      rowTitExp.setValueClassName(crosstabRow.getProperty().getValueClassName());
      rowTitExp.setText("$V{"+crosstabRow.getProperty().getProperty()+"}");

      rowTitle.setExpression(rowTitExp);
      rowTitle.setWidth(crosstabRow.getHeaderWidth());

      //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);

      ctRowGroup.setHeader(rowHeaderContents );

      if (crosstabRow.isShowTotals())
        createRowTotalHeader(ctRowGroup,crosstabRow);


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.