if (crosstabRow.getProperty() != null)
cell.setRowTotalGroup(crosstabRow.getProperty().getProperty());
JRDesignCellContents contents = new JRDesignCellContents();
JRDesignTextField element = new JRDesignTextField();
element.setWidth(crosstabColumn.getWidth());
element.setHeight(crosstabRow.getHeight());
JRDesignExpression measureExp = new JRDesignExpression();
DJCrosstabMeasure measure = djcross.getMeasure(0);
measureExp.setValueClassName(measure.getProperty().getValueClassName());
measureExp.setText("$V{"+measure.getProperty().getProperty()+"}");
element.setExpression(measureExp);
/**
* Is there any style for this object?
*/
if (crosstabRow.getProperty() == null && crosstabColumn.getProperty() == null && measure.getStyle() != null ){
//this is the inner most cell
layoutManager.applyStyleToElement(measure.getStyle() , element);
} else if (crosstabRow.getTotalStyle() != null) {
layoutManager.applyStyleToElement(crosstabRow.getTotalStyle(), element);
}
else if (crosstabColumn.getTotalStyle() != null) {
layoutManager.applyStyleToElement(crosstabColumn.getTotalStyle(), element);
}
// if ((i == auxCols.length-1 && j != auxRows.length-1) || (i != auxCols.length-1 && j != auxRows.length-1)){
// cell.setWidth(Integer.valueOf( 100));
// }
// if (crosstabColumn.getProperty() != null && j != auxRows.length-1 && crosstabRow.getTotalHeaderHeight() != 0){
// cell.setWidth(Integer.valueOf( crosstabRow.getTotalHeaderHeight() ));
// }
// if (i != auxCols.length-1 && j != auxRows.length-1 && crosstabRow.getTotalHeaderHeight() != 0){
// cell.setWidth(Integer.valueOf( crosstabRow.getTotalHeaderHeight() ));
// }
contents.setMode(new Byte(Transparency.OPAQUE.getValue()));
contents.setBackcolor(colors[i][j]);
contents.addElement(element);
applyCellBorder(contents);
cell.setContents(contents);