本文整理汇总了Java中net.sf.jasperreports.crosstabs.JRCrosstabCell.getHeight方法的典型用法代码示例。如果您正苦于以下问题:Java JRCrosstabCell.getHeight方法的具体用法?Java JRCrosstabCell.getHeight怎么用?Java JRCrosstabCell.getHeight使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.sf.jasperreports.crosstabs.JRCrosstabCell
的用法示例。
在下文中一共展示了JRCrosstabCell.getHeight方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createDetailCells
import net.sf.jasperreports.crosstabs.JRCrosstabCell; //导入方法依赖的package包/类
private void createDetailCells(JRDesignCrosstab jdc) {
List<JRCrosstabCell> cells = jdc.getCellsList();
JRCrosstabMeasure[] measures = jdc.getMeasures();
if (measures != null && cells != null)
for (JRCrosstabCell c : cells) {
int y = 0;
if (c.getHeight() != null && measures.length > 0) {
int h = c.getHeight() / measures.length;
for (int i = 0; i < measures.length; i++) {
JRDesignExpression exp = new JRDesignExpression();
exp.setText("$V{" + measures[i].getName() + "}"); //$NON-NLS-1$ //$NON-NLS-2$
JRDesignTextField tf = (JRDesignTextField) new MTextField()
.createJRElement(getConfig().getJasperDesign());
tf.setX(0);
tf.setY(y);
tf.setWidth(c.getWidth());
tf.setHeight(h);
tf.setExpression(exp);
((JRDesignCellContents) c.getContents()).addElement(tf);
y += h;
}
}
}
}
示例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: verifyCrosstabCells
import net.sf.jasperreports.crosstabs.JRCrosstabCell; //导入方法依赖的package包/类
private void verifyCrosstabCells(JRDesignCrosstab crosstab)
{
JRCrosstabCell[][] cells = crosstab.getCells();
JRCrosstabRowGroup[] rowGroups = crosstab.getRowGroups();
JRCrosstabColumnGroup[] columnGroups = crosstab.getColumnGroups();
JRCrosstabCell baseCell = cells[rowGroups.length][columnGroups.length];
if(baseCell == null || baseCell.getWidth() == null)
{
addBrokenRule("Crosstab base cell width not specified.", crosstab);
}
if(baseCell == null || baseCell.getHeight() == null)
{
addBrokenRule("Crosstab base cell height not specified.", crosstab);
}
for (int i = rowGroups.length; i >= 0 ; --i)
{
for (int j = columnGroups.length; j >= 0 ; --j)
{
JRCrosstabCell cell = cells[i][j];
String cellText = getCrosstabCellText(rowGroups, columnGroups, i, j);
if (cell != null)
{
JRCellContents contents = cell.getContents();
if (i < rowGroups.length)
{
JRCrosstabCell colCell = cells[rowGroups.length][j];
if (colCell != null && colCell.getContents().getWidth() != contents.getWidth())
{
addBrokenRule("Crosstab " + cellText + " width should be " + colCell.getContents().getWidth() + ".", cell);
}
}
if (j < columnGroups.length)
{
JRCrosstabCell rowCell = cells[i][columnGroups.length];
if (rowCell != null && rowCell.getContents().getHeight() != contents.getHeight())
{
addBrokenRule("Crosstab " + cellText + " height should be " + rowCell.getContents().getHeight() + ".", cell);
}
}
verifyCellContents(contents, cellText);
}
}
}
}