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


Java JRCellContents类代码示例

本文整理汇总了Java中net.sf.jasperreports.crosstabs.JRCellContents的典型用法代码示例。如果您正苦于以下问题:Java JRCellContents类的具体用法?Java JRCellContents怎么用?Java JRCellContents使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


JRCellContents类属于net.sf.jasperreports.crosstabs包,在下文中一共展示了JRCellContents类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: writeCrosstabRowGroup

import net.sf.jasperreports.crosstabs.JRCellContents; //导入依赖的package包/类
protected void writeCrosstabRowGroup(JRCrosstabRowGroup group) throws IOException
{
	writer.startElement(JRCrosstabRowGroupFactory.ELEMENT_rowGroup);
	writer.addEncodedAttribute(JRCrosstabGroupFactory.ATTRIBUTE_name, group.getName());
	writer.addAttribute(JRCrosstabRowGroupFactory.ATTRIBUTE_width, group.getWidth());
	writer.addAttribute(JRCrosstabGroupFactory.ATTRIBUTE_totalPosition, group.getTotalPositionValue(), CrosstabTotalPositionEnum.NONE);
	writer.addAttribute(JRCrosstabRowGroupFactory.ATTRIBUTE_headerPosition, group.getPositionValue(), CrosstabRowPositionEnum.TOP);
	if (isNewerVersionOrEqual(JRConstants.VERSION_6_2_0))
	{
		writer.addAttribute(JRCrosstabGroupFactory.ATTRIBUTE_mergeHeaderCells, group.getMergeHeaderCells());
	}

	writeBucket(group.getBucket());

	JRCellContents header = group.getHeader();
	writer.startElement(JRCrosstabRowGroupFactory.ELEMENT_crosstabRowHeader);
	writeCellContents(header);
	writer.closeElement();

	JRCellContents totalHeader = group.getTotalHeader();
	writer.startElement(JRCrosstabRowGroupFactory.ELEMENT_crosstabTotalRowHeader);
	writeCellContents(totalHeader);
	writer.closeElement();

	writer.closeElement();
}
 
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:27,代码来源:JRXmlWriter.java

示例2: writeCellContents

import net.sf.jasperreports.crosstabs.JRCellContents; //导入依赖的package包/类
protected void writeCellContents(JRCellContents contents) throws IOException
{
	if (contents != null)
	{
		writer.startElement(JRCellContentsFactory.ELEMENT_cellContents);
		writer.addAttribute(JRCellContentsFactory.ATTRIBUTE_backcolor, contents.getBackcolor());
		writer.addAttribute(JRCellContentsFactory.ATTRIBUTE_mode, contents.getModeValue());
		writeStyleReferenceAttr(contents);

		if(isNewerVersionOrEqual(JRConstants.VERSION_4_8_0))
		{
			writeProperties(contents);
		}
		writeBox(contents.getLineBox());

		writeChildElements(contents);

		writer.closeElement();
	}
}
 
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:21,代码来源:JRXmlWriter.java

示例3: writeCrosstabTitleCell

import net.sf.jasperreports.crosstabs.JRCellContents; //导入依赖的package包/类
protected void writeCrosstabTitleCell(JRCrosstab crosstab, String crosstabName)
{
	CrosstabColumnCell titleCell = crosstab.getTitleCell();
	if (titleCell != null)
	{
		String titleCellName = crosstabName + "TitleCell";
		write("DesignCrosstabColumnCell {0} = new DesignCrosstabColumnCell();\n", titleCellName);
		writePattern("{0}.setHeight({1, number, #});\n", titleCellName, titleCell.getHeight());
		writePattern("{0}.setContentsPosition({1});\n", titleCellName, titleCell.getContentsPosition());//default value for educative purposes
		
		JRCellContents cellContents = titleCell.getCellContents();
		if (cellContents != null)
		{
			String contentsName = titleCellName + "Contents";
			writeCellContents(cellContents, contentsName);
			writePattern("{0}.setCellContents({1});\n", titleCellName, contentsName);
		}
		
		writePattern("{0}.setTitleCell({1});\n", crosstabName, titleCellName);
		flush();
	}
}
 
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:23,代码来源:JRApiWriter.java

示例4: writeCellContents

import net.sf.jasperreports.crosstabs.JRCellContents; //导入依赖的package包/类
/**
 * 
 */
protected void writeCellContents( JRCellContents contents, String cellName)
{
	if (contents != null)
	{
		write( "JRDesignCellContents " + cellName + " = new JRDesignCellContents();\n");
		write( cellName + ".setBackcolor({0});\n", contents.getBackcolor());
		write( cellName + ".setMode({0});\n", contents.getModeValue());
		writeStyleReferenceAttr( contents, cellName);

		writeBox( contents.getLineBox(), cellName + ".getLineBox()");

		writeChildElements( contents, cellName);

		flush();
	}
}
 
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:20,代码来源:JRApiWriter.java

示例5: determineLastColumnGroupWithHeaderIndex

import net.sf.jasperreports.crosstabs.JRCellContents; //导入依赖的package包/类
private int determineLastColumnGroupWithHeaderIndex()
{
	int colGroupIdx = columnGroups.length -1;
	while (colGroupIdx >= 0)
	{
		JRCellContents header = columnGroups[colGroupIdx].getHeader();
		if (header != null && !header.getChildren().isEmpty())
		{
			break;
		}
		
		--colGroupIdx;
	}
	
	int lastGroupIndex = colGroupIdx >= 0 ? colGroupIdx : 0;
	if (log.isDebugEnabled())
	{
		log.debug("last column group with header is " + lastGroupIndex);
	}
	return lastGroupIndex;
}
 
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:22,代码来源:JRFillCrosstab.java

示例6: setCellProperties

import net.sf.jasperreports.crosstabs.JRCellContents; //导入依赖的package包/类
protected void setCellProperties(JRTemplatePrintFrame printCell)
{
	if (verticalSpan > 1)
	{
		printCell.getPropertiesMap().setProperty(
				JRCellContents.PROPERTY_ROW_SPAN, Integer.toString(verticalSpan));
	}
	
	if (horizontalSpan > 1)
	{
		printCell.getPropertiesMap().setProperty(
				JRCellContents.PROPERTY_COLUMN_SPAN, Integer.toString(horizontalSpan));
	}
	
	// TODO lucianc find a way to put this in templates
	for (Entry<String, String> propEntry : printProperties.entrySet())
	{
		printCell.getPropertiesMap().setProperty(propEntry.getKey(), propEntry.getValue());
	}

	// not transferring cell properties for now
}
 
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:23,代码来源:JRFillCellContents.java

示例7: getTemplateFrame

import net.sf.jasperreports.crosstabs.JRCellContents; //导入依赖的package包/类
protected JRTemplateFrame getTemplateFrame()
{
	JRStyle style = getStyle();
	JRTemplateFrame template = templateFrames.get(style);
	if (template == null)
	{
		template = new JRTemplateFrame(getOrigin(), 
				filler.getJasperPrint().getDefaultStyleProvider(), this);
		template.getPropertiesMap().setProperty(
				JRCellContents.PROPERTY_TYPE, cellType);
		
		template = filler.fillContext.deduplicate(template);
		templateFrames.put(style, template);
	}
	return template;
}
 
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:17,代码来源:JRFillCellContents.java

示例8: inScope

import net.sf.jasperreports.crosstabs.JRCellContents; //导入依赖的package包/类
protected boolean inScope(PropertyMetadata propertyMetadata, JRElementGroup container)
{
	if (container instanceof JRFrame)
	{
		return inScope(propertyMetadata, (JRElement) container);
	}
	
	List<PropertyScope> scopes = propertyMetadata.getScopes();
	
	if (container instanceof JRBand)
	{
		return scopes.contains(PropertyScope.BAND);
	}
	
	if (container instanceof Cell)
	{
		return scopes.contains(PropertyScope.TABLE_CELL);
	}
	
	if (container instanceof JRCellContents)
	{
		return scopes.contains(PropertyScope.CROSSTAB_CELL);
	}
	
	return false;
}
 
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:27,代码来源:PropertiesMetadataUtil.java

示例9: propertyChange

import net.sf.jasperreports.crosstabs.JRCellContents; //导入依赖的package包/类
@Override
public void propertyChange(PropertyChangeEvent evt) {
	if (evt.getPropertyName().equals(JRDesignCrosstabGroup.PROPERTY_TOTAL_POSITION)) {
		this.removeChildren();
		CrosstabComponentFactory.createColumnGroupCells(this, (JRCrosstabColumnGroup) getValue());
		MCrosstab mCrosstab = getMCrosstab();
		CrosstabComponentFactory.deleteCellNodes(mCrosstab);
		CrosstabComponentFactory.createCellNodes((JRDesignCrosstab) mCrosstab.getValue(), mCrosstab);
	} else if (evt.getPropertyName().equals(JRDesignCrosstabColumnGroup.PROPERTY_CROSSTAB_HEADER)) {

		for (int i = 0; i < getChildren().size(); i++) {
			INode n = getChildren().get(i);
			if (n instanceof MColumnCrosstabHeaderCell) {
				getChildren().remove(n);
				new MColumnCrosstabHeaderCell(this, (JRCellContents) evt.getNewValue(), i);
				getMCrosstab().getCrosstabManager().refresh();
				break;
			}
		}
	}
	super.propertyChange(evt);
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:23,代码来源:MColumnGroup.java

示例10: getCell

import net.sf.jasperreports.crosstabs.JRCellContents; //导入依赖的package包/类
public JRBaseCellContents getCell(JRCellContents cell)
{
	JRBaseCellContents baseCell = null;

	if (cell != null)
	{
		baseCell = (JRBaseCellContents)get(cell);
		if (baseCell == null)
		{
			baseCell = new JRBaseCellContents(cell, this);
		}
	}

	return baseCell;
}
 
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:16,代码来源:JRBaseObjectFactory.java

示例11: writeCrosstabWhenNoDataCell

import net.sf.jasperreports.crosstabs.JRCellContents; //导入依赖的package包/类
private void writeCrosstabWhenNoDataCell(JRCrosstab crosstab) throws IOException
{
	JRCellContents whenNoDataCell = crosstab.getWhenNoDataCell();
	if (whenNoDataCell != null)
	{
		writer.startElement(JRCrosstabFactory.ELEMENT_whenNoDataCell);
		writeCellContents(whenNoDataCell);
		writer.closeElement();
	}
}
 
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:11,代码来源:JRXmlWriter.java

示例12: writeCrosstabHeaderCell

import net.sf.jasperreports.crosstabs.JRCellContents; //导入依赖的package包/类
private void writeCrosstabHeaderCell(JRCrosstab crosstab) throws IOException
{
	JRCellContents headerCell = crosstab.getHeaderCell();
	if (headerCell != null)
	{
		writer.startElement(JRCrosstabFactory.ELEMENT_crosstabHeaderCell);
		writeCellContents(headerCell);
		writer.closeElement();
	}
}
 
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:11,代码来源:JRXmlWriter.java

示例13: writeCrosstabColumnGroup

import net.sf.jasperreports.crosstabs.JRCellContents; //导入依赖的package包/类
protected void writeCrosstabColumnGroup(JRCrosstabColumnGroup group) throws IOException
{
	writer.startElement(JRCrosstabGroupFactory.ELEMENT_columnGroup);
	writer.addEncodedAttribute(JRCrosstabGroupFactory.ATTRIBUTE_name, group.getName());
	writer.addAttribute(JRCrosstabColumnGroupFactory.ATTRIBUTE_height, group.getHeight());
	writer.addAttribute(JRCrosstabGroupFactory.ATTRIBUTE_totalPosition, group.getTotalPositionValue(), CrosstabTotalPositionEnum.NONE);
	writer.addAttribute(JRCrosstabColumnGroupFactory.ATTRIBUTE_headerPosition, group.getPositionValue(), CrosstabColumnPositionEnum.LEFT);
	if (isNewerVersionOrEqual(JRConstants.VERSION_6_2_0))
	{
		writer.addAttribute(JRCrosstabGroupFactory.ATTRIBUTE_mergeHeaderCells, group.getMergeHeaderCells());
	}

	writeBucket(group.getBucket());

	JRCellContents crosstabHeader = group.getCrosstabHeader();
	if (crosstabHeader != null)
	{
		writer.startElement(JRCrosstabColumnGroupFactory.ELEMENT_crosstabHeader);
		writeCellContents(crosstabHeader);
		writer.closeElement();
	}
	
	JRCellContents header = group.getHeader();
	writer.startElement(JRCrosstabGroupFactory.ELEMENT_crosstabColumnHeader);
	writeCellContents(header);
	writer.closeElement();

	JRCellContents totalHeader = group.getTotalHeader();
	writer.startElement(JRCrosstabGroupFactory.ELEMENT_crosstabTotalColumnHeader);
	writeCellContents(totalHeader);
	writer.closeElement();

	writer.closeElement();
}
 
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:35,代码来源:JRXmlWriter.java

示例14: collect

import net.sf.jasperreports.crosstabs.JRCellContents; //导入依赖的package包/类
protected void collect(JRCellContents cell)
{
	if (cell != null)
	{
		collect(cell.getStyle());
		JRElement[] elements = cell.getElements();
		if (elements != null && elements.length > 0)
		{
			for(int i = 0; i < elements.length; i++)
			{
				elements[i].collectExpressions(this);
			}
		}
	}
}
 
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:16,代码来源:JRExpressionCollector.java

示例15: writeCrosstabWhenNoDataCell

import net.sf.jasperreports.crosstabs.JRCellContents; //导入依赖的package包/类
/**
 * 
 */
private void writeCrosstabWhenNoDataCell( JRCrosstab crosstab, String parentName)
{
	JRCellContents whenNoDataCell = crosstab.getWhenNoDataCell();
	if (whenNoDataCell != null)
	{
		writeCellContents( whenNoDataCell, parentName + "NoDataCell");
		write( parentName + ".setWhenNoDataCell(" + parentName + "NoDataCell);\n");
		flush();
	}
}
 
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:14,代码来源:JRApiWriter.java


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