本文整理汇总了Java中net.sf.jasperreports.crosstabs.JRCrosstabCell.getRowTotalGroup方法的典型用法代码示例。如果您正苦于以下问题:Java JRCrosstabCell.getRowTotalGroup方法的具体用法?Java JRCrosstabCell.getRowTotalGroup怎么用?Java JRCrosstabCell.getRowTotalGroup使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.sf.jasperreports.crosstabs.JRCrosstabCell
的用法示例。
在下文中一共展示了JRCrosstabCell.getRowTotalGroup方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setCellRow
import net.sf.jasperreports.crosstabs.JRCrosstabCell; //导入方法依赖的package包/类
public void setCellRow(int y, String rowTotal) {
JRCrosstabCell[][] cells = crosstab.getCells();
for (int i = cells.length - 1; i >= 0; i--) {
for (int j = cells[i].length - 1; j >= 0; j--) {
JRCrosstabCell jrCrosstabCell = cells[i][j];
if (jrCrosstabCell != null
&& ((jrCrosstabCell.getRowTotalGroup() != null && jrCrosstabCell.getRowTotalGroup().equals(rowTotal)) || (rowTotal == null && jrCrosstabCell.getRowTotalGroup() == null))) {
Rectangle r = matrix.getBounds(new CrosstabCell((JRDesignCellContents) jrCrosstabCell.getContents()));
if (r != null)
r.setLocation(r.x, y);
}
}
}
}
示例2: JRBaseCrosstabCell
import net.sf.jasperreports.crosstabs.JRCrosstabCell; //导入方法依赖的package包/类
public JRBaseCrosstabCell(JRCrosstabCell crosstabCell, JRBaseObjectFactory factory)
{
factory.put(crosstabCell, this);
width = crosstabCell.getWidth();
height = crosstabCell.getHeight();
rowTotalGroup = crosstabCell.getRowTotalGroup();
columnTotalGroup = crosstabCell.getColumnTotalGroup();
contents = factory.getCell(crosstabCell.getContents());
}
示例3: removeRowGroup
import net.sf.jasperreports.crosstabs.JRCrosstabCell; //导入方法依赖的package包/类
/**
* Removes a row group.
*
* @param groupName the group name
* @return the removed group
*/
public JRCrosstabRowGroup removeRowGroup(String groupName)
{
JRCrosstabRowGroup removed = null;
Integer idx = rowGroupsMap.remove(groupName);
if (idx != null)
{
removed = rowGroups.remove(idx.intValue());
for (ListIterator<JRCrosstabRowGroup> it = rowGroups.listIterator(idx.intValue()); it.hasNext();)
{
JRCrosstabRowGroup group = it.next();
rowGroupsMap.put(group.getName(), Integer.valueOf(it.previousIndex()));
}
for (Iterator<JRCrosstabCell> it = cellsList.iterator(); it.hasNext();)
{
JRCrosstabCell cell = it.next();
String rowTotalGroup = cell.getRowTotalGroup();
if (rowTotalGroup != null && rowTotalGroup.equals(groupName))
{
it.remove();
cellsMap.remove(new Pair<String,String>(rowTotalGroup, cell.getColumnTotalGroup()));
getEventSupport().fireCollectionElementRemovedEvent(PROPERTY_CELLS, cell, -1);
}
}
removeRowGroupVars(removed);
getEventSupport().fireCollectionElementRemovedEvent(PROPERTY_ROW_GROUPS, removed, idx.intValue());
}
return removed;
}
示例4: addDetailCellH
import net.sf.jasperreports.crosstabs.JRCrosstabCell; //导入方法依赖的package包/类
private void addDetailCellH(JRCrosstabCell[][] cells, int i, Guide north, Guide south, String name) {
for (int j = 0; j < cells.length; j++) {
JRCrosstabCell rc = cells[j][i];
if (rc != null) {
String rtg = rc.getRowTotalGroup();
if ((rtg != null && rtg.equals(name)) || (rtg == null && name == null)) {
CrosstabCell cc = createCell((JRDesignCellContents) rc.getContents(), JRCrosstabOrigin.TYPE_DATA_CELL);
north.addSouth(cc);
south.addNorth(cc);
break;
}
}
}
}