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 changed to see what happens (must come from the column property)
header.addElement(designTextField);
}
}
DJGroupLabel label = columnsGroup.getFooterLabel();
if (label != null /*&& !footerVariables.isEmpty()*/) {
List footerVariables = columnsGroup.getFooterVariables();
PropertyColumn col = columnsGroup.getColumnToGroupBy();
JRDesignBand band = (JRDesignBand)jgroup.getGroupFooter();
int x = 0, y = 0;
//max width
int width = getDesign().getPageWidth() - getDesign().getLeftMargin() - getDesign().getRightMargin();
int height = label.getHeight();
int yOffset = 0;
if (label.getLabelPosition() == LabelPosition.LEFT) {
DJGroupVariable lmvar = findLeftMostColumn(footerVariables);
x = col.getPosX().intValue(); //label starts in the column-to-group-by x position
y = findYOffsetForGroupLabel(band);
if (lmvar != null) {
AbstractColumn lmColumn = lmvar.getColumnToApplyOperation();
width = lmColumn.getPosX().intValue() - x;
}
else
width -= x;
height = getFooterVariableHeight(columnsGroup);
}
else if (label.getLabelPosition() == LabelPosition.RIGHT) {
DJGroupVariable rmvar = findRightMostColumn(footerVariables);
if (rmvar != null) {
AbstractColumn rmColumn = rmvar.getColumnToApplyOperation();
x = rmColumn.getPosX().intValue() + rmColumn.getWidth().intValue();
}
else
x = col.getPosX().intValue(); //label starts in the column-to-group-by x position
y = findYOffsetForGroupLabel(band);
width -= x;
height = getFooterVariableHeight(columnsGroup);
}
else if (label.getLabelPosition() == LabelPosition.TOP) {
x = col.getPosX().intValue(); //label starts in the column-to-group-by x position
width -= x;
yOffset = height;
}
else if (label.getLabelPosition() == LabelPosition.BOTTOM) {
x = col.getPosX().intValue(); //label starts in the column-to-group-by x position
y = getFooterVariableHeight(columnsGroup);
width -= x;
}
layoutGroupFooterLabels(columnsGroup, jgroup, x, y, width, height);