当前位置: 首页>>代码示例>>Java>>正文


Java JRCrosstabCell.getHeight方法代码示例

本文整理汇总了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;
				}
			}
		}
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:26,代码来源:CrosstabWizard.java

示例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());
}
 
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:13,代码来源:JRBaseCrosstabCell.java

示例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);
			}
		}
	}
}
 
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:53,代码来源:JRVerifier.java


注:本文中的net.sf.jasperreports.crosstabs.JRCrosstabCell.getHeight方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。