• 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏吧

Java SplitTypeEnum类的典型用法和代码示例

java 2次浏览

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

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

示例1: readObject

点赞 3

import net.sf.jasperreports.engine.type.SplitTypeEnum; //导入依赖的package包/类
@SuppressWarnings("deprecation")
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException
{
	in.defaultReadObject();
	
	if (PSEUDO_SERIAL_VERSION_UID < JRConstants.PSEUDO_SERIAL_VERSION_UID_3_5_2)
	{
		splitType = isSplitAllowed ? SplitTypeEnum.STRETCH.getValueByte() : SplitTypeEnum.PREVENT.getValueByte();
	}

	if (PSEUDO_SERIAL_VERSION_UID < JRConstants.PSEUDO_SERIAL_VERSION_UID_3_7_2)//FIXMEENUM check order of ifs for all
	{
		splitTypeValue = SplitTypeEnum.getByValue(splitType);
		
		splitType = null;
	}
}
 

开发者ID:TIBCOSoftware,
项目名称:jasperreports,
代码行数:18,
代码来源:JRBaseBand.java

示例2: getBreakHeight

点赞 3

import net.sf.jasperreports.engine.type.SplitTypeEnum; //导入依赖的package包/类
private static int getBreakHeight(JRBand band)
{
	int breakHeight = 0;

	if (band != null)
	{
		breakHeight = band.getHeight();
		JRElement[] elements = band.getElements();
		if (
			SplitTypeEnum.IMMEDIATE == band.getSplitTypeValue()
			&& elements != null && elements.length > 0
			)
		{
			for(int i = 0; i < elements.length; i++)
			{
				JRElement element = elements[i];
				int bottom = element.getY() + element.getHeight();
				breakHeight = bottom < breakHeight ? bottom : breakHeight;
			}
		}
	}

	return breakHeight;
}
 

开发者ID:TIBCOSoftware,
项目名称:jasperreports,
代码行数:25,
代码来源:JRVerifier.java

示例3: readObject

点赞 3

import net.sf.jasperreports.engine.type.SplitTypeEnum; //导入依赖的package包/类
@SuppressWarnings("deprecation")
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException
{
	in.defaultReadObject();
	
	if (PSEUDO_SERIAL_VERSION_UID < JRConstants.PSEUDO_SERIAL_VERSION_UID_3_5_2)
	{
		splitType = isSplitAllowed ? SplitTypeEnum.STRETCH.getValueByte() : SplitTypeEnum.PREVENT.getValueByte();
	}
	
	if (PSEUDO_SERIAL_VERSION_UID < JRConstants.PSEUDO_SERIAL_VERSION_UID_3_7_2)//FIXMEENUM check order of ifs for all
	{
		splitTypeValue = SplitTypeEnum.getByValue(splitType);
		
		splitType = null;
	}
}
 

开发者ID:TIBCOSoftware,
项目名称:jasperreports,
代码行数:18,
代码来源:JRDesignBand.java

示例4: createDetailBand

点赞 3

import net.sf.jasperreports.engine.type.SplitTypeEnum; //导入依赖的package包/类
protected JRBand createDetailBand(List<FillColumn> fillColumns)
{
	final JRDesignBand detailBand = new JRDesignBand();
	detailBand.setSplitType(SplitTypeEnum.PREVENT);
	
	ReportBandInfo bandInfo = new ReportBandInfo(detailBand, BandTypeEnum.DETAIL.getName());
	int xOffset = 0;
	for (FillColumn subcolumn : fillColumns)
	{
		DetailBandCreator subVisitor = new DetailBandCreator(
				bandInfo, subcolumn, xOffset, 0, 0);
		subVisitor.visit();
		xOffset = subVisitor.xOffset;
	}

	setPdfTags(bandInfo, false);
	
	return detailBand;
}
 

开发者ID:TIBCOSoftware,
项目名称:jasperreports,
代码行数:20,
代码来源:TableReport.java

示例5: createColumnHeader

点赞 3

import net.sf.jasperreports.engine.type.SplitTypeEnum; //导入依赖的package包/类
protected JRDesignBand createColumnHeader(List<FillColumn> fillColumns)
{
	JRDesignBand columnHeader = new JRDesignBand();
	columnHeader.setSplitType(SplitTypeEnum.PREVENT);
	
	ReportBandInfo bandInfo = new ReportBandInfo(columnHeader, BandTypeEnum.COLUMN_HEADER.getName());
	int xOffset = 0;
	for (FillColumn subcolumn : fillColumns)
	{
		ColumnHeaderCreator subVisitor = new ColumnHeaderCreator(
				bandInfo, subcolumn, xOffset, 0, 0, headerHtmlBaseProperties,
				new AtomicBoolean());
		subVisitor.visit();
		xOffset = subVisitor.xOffset;
	}

	setPdfTags(bandInfo, true);
	
	if (columnHeader.getHeight() == 0)
	{
		columnHeader = null;
	}
	return columnHeader;
}
 

开发者ID:TIBCOSoftware,
项目名称:jasperreports,
代码行数:25,
代码来源:TableReport.java

示例6: createPageFooter

点赞 3

import net.sf.jasperreports.engine.type.SplitTypeEnum; //导入依赖的package包/类
protected JRDesignBand createPageFooter(List<FillColumn> fillColumns)
{
	JRDesignBand pageFooter = new JRDesignBand();
	pageFooter.setSplitType(SplitTypeEnum.PREVENT);
	
	ReportBandInfo bandInfo = new ReportBandInfo(pageFooter, BandTypeEnum.PAGE_FOOTER.getName());
	int xOffset = 0;
	for (FillColumn subcolumn : fillColumns)
	{
		PageFooterCreator subVisitor = new PageFooterCreator(
				bandInfo, subcolumn, xOffset, 0, 0);
		subVisitor.visit();
		xOffset = subVisitor.xOffset;
	}
	
	setPdfTags(bandInfo, false);

	if (pageFooter.getHeight() == 0)
	{
		pageFooter = null;
	}
	return pageFooter;
}
 

开发者ID:TIBCOSoftware,
项目名称:jasperreports,
代码行数:24,
代码来源:TableReport.java

示例7: createTitle

点赞 3

import net.sf.jasperreports.engine.type.SplitTypeEnum; //导入依赖的package包/类
protected JRDesignBand createTitle(List<FillColumn> fillColumns)
{
	JRDesignBand title = new JRDesignBand();
	title.setSplitType(SplitTypeEnum.PREVENT);
	
	ReportBandInfo bandInfo = new ReportBandInfo(title, BandTypeEnum.TITLE.getName());
	int xOffset = 0;
	for (FillColumn subcolumn : fillColumns)
	{
		TitleCreator subVisitor = new TitleCreator(
				bandInfo, subcolumn, xOffset, 0, 0);
		subVisitor.visit();
		xOffset = subVisitor.xOffset;
	}

	setPdfTags(bandInfo, false);
	
	if (title.getHeight() == 0) //FIXMETABLE not sure we actually need this; maybe check the section is truly empty; do the same for the other sections as well
	{
		title = null;
	}
	return title;
}
 

开发者ID:TIBCOSoftware,
项目名称:jasperreports,
代码行数:24,
代码来源:TableReport.java

示例8: createSummary

点赞 3

import net.sf.jasperreports.engine.type.SplitTypeEnum; //导入依赖的package包/类
protected JRDesignBand createSummary(List<FillColumn> fillColumns)
{
	JRDesignBand summary = new JRDesignBand();
	summary.setSplitType(SplitTypeEnum.PREVENT);
	
	ReportBandInfo bandInfo = new ReportBandInfo(summary, BandTypeEnum.SUMMARY.getName());
	int xOffset = 0;
	for (FillColumn subcolumn : fillColumns)
	{
		SummaryCreator subVisitor = new SummaryCreator(
				bandInfo, subcolumn, xOffset, 0, 0);
		subVisitor.visit();
		xOffset = subVisitor.xOffset;
	}
	
	setPdfTags(bandInfo, false);

	if (summary.getHeight() == 0)
	{
		summary = null;
	}
	return summary;
}
 

开发者ID:TIBCOSoftware,
项目名称:jasperreports,
代码行数:24,
代码来源:TableReport.java

示例9: createGroupHeader

点赞 3

import net.sf.jasperreports.engine.type.SplitTypeEnum; //导入依赖的package包/类
protected JRBand createGroupHeader(String groupName, List<FillColumn> fillColumns)
{
	JRDesignBand header = new JRDesignBand();
	header.setSplitType(SplitTypeEnum.PREVENT);
	
	ReportBandInfo bandInfo = new ReportBandInfo(header, BandTypeEnum.GROUP_HEADER + "-" + groupName);
	int xOffset = 0;
	for (FillColumn subcolumn : fillColumns)
	{
		GroupHeaderCreator subVisitor = new GroupHeaderCreator(groupName,
				bandInfo, subcolumn, xOffset, 0, 0);
		subVisitor.visit();
		xOffset = subVisitor.xOffset;
	}
	
	setPdfTags(bandInfo, false);
	
	if (header.getHeight() == 0)
	{
		header = null;
	}
	return header;
}
 

开发者ID:TIBCOSoftware,
项目名称:jasperreports,
代码行数:24,
代码来源:TableReport.java

示例10: createGroupFooter

点赞 3

import net.sf.jasperreports.engine.type.SplitTypeEnum; //导入依赖的package包/类
protected JRBand createGroupFooter(String groupName, List<FillColumn> fillColumns)
{
	JRDesignBand footer = new JRDesignBand();
	footer.setSplitType(SplitTypeEnum.PREVENT);
	
	ReportBandInfo bandInfo = new ReportBandInfo(footer, BandTypeEnum.GROUP_FOOTER + "-" + groupName);
	int xOffset = 0;
	for (FillColumn subcolumn : fillColumns)
	{
		GroupFooterCreator subVisitor = new GroupFooterCreator(groupName,
				bandInfo, subcolumn, xOffset, 0, 0);
		subVisitor.visit();
		xOffset = subVisitor.xOffset;
	}

	setPdfTags(bandInfo, false);
	
	if (footer.getHeight() == 0)
	{
		footer = null;
	}
	return footer;
}
 

开发者ID:TIBCOSoftware,
项目名称:jasperreports,
代码行数:24,
代码来源:TableReport.java

示例11: setPropertyValue

点赞 3

import net.sf.jasperreports.engine.type.SplitTypeEnum; //导入依赖的package包/类
public void setPropertyValue(Object id, Object value) {
	JRDesignBand jrband = (JRDesignBand) getValue();
	if (jrband != null) {
		if (id.equals(JRDesignBand.PROPERTY_HEIGHT)) {
			jrband.setHeight(Math.max(0, (Integer) Misc.nvl(value, Integer.valueOf(0))));
		} else if (id.equals(JRDesignBand.PROPERTY_SPLIT_TYPE))
			jrband.setSplitType((SplitTypeEnum) splitStyleD.getEnumValue(value));
		else if (id.equals(JRDesignBand.PROPERTY_PRINT_WHEN_EXPRESSION))
			jrband.setPrintWhenExpression(ExprUtil.setValues(jrband.getPrintWhenExpression(), value, null));
		else if (id.equals(MGraphicElement.PROPERTY_MAP)) {
			JRPropertiesMap v = (JRPropertiesMap) value;
			String[] names = jrband.getPropertiesMap().getPropertyNames();
			for (int i = 0; i < names.length; i++) {
				jrband.getPropertiesMap().removeProperty(names[i]);
			}
			names = v.getPropertyNames();
			for (int i = 0; i < names.length; i++)
				jrband.getPropertiesMap().setProperty(names[i], v.getProperty(names[i]));
			this.getPropertyChangeSupport().firePropertyChange(MGraphicElement.PROPERTY_MAP, false, true);
		}
	}
}
 

开发者ID:OpenSoftwareSolutions,
项目名称:PDFReporter-Studio,
代码行数:23,
代码来源:MBand.java

示例12: createDesign

点赞 3

import net.sf.jasperreports.engine.type.SplitTypeEnum; //导入依赖的package包/类
/**
 * Create a very minimal jasperdesign where the static text is placed. It is cached
 * since we don't need to create it everytime
 */
private static void createDesign()
 {
      jasperDesign = new JasperDesign();
      JRDesignBand jrBand = new JRDesignBand();
  		 jasperDesign.setTitle(jrBand);
      textElement = new JRDesignStaticText();
      jasperDesign.setLeftMargin(0);
      jasperDesign.setRightMargin(0);
      jasperDesign.setTopMargin(0);
      jasperDesign.setBottomMargin(0);
      jrBand.addElement(textElement);
      jrBand.setSplitType(SplitTypeEnum.STRETCH);
      textElement.setStretchType(StretchTypeEnum.NO_STRETCH);
      textElement.setPrintRepeatedValues(false);
      textElement.setPrintWhenDetailOverflows(true);
  }
 

开发者ID:OpenSoftwareSolutions,
项目名称:PDFReporter-Studio,
代码行数:21,
代码来源:PreviewGenerator.java

示例13: setValue

点赞 3

import net.sf.jasperreports.engine.type.SplitTypeEnum; //导入依赖的package包/类
public void setValue(Object val) throws IllegalAccessException, IllegalArgumentException, InvocationTargetException {

            if (IReportManager.getPreferences().getBoolean("designer_debug_mode", false))
            {
                System.out.println(new java.util.Date() + ": setting SplitType to: " + val + ". If the value is unattended or null, please report this notification to http://jasperforge.org/plugins/mantis/view.php?id=4139");
                Thread.dumpStack();
            }
            
            if (val == null || val instanceof SplitTypeEnum) {

                SplitTypeEnum oldValue = band.getSplitTypeValue();
                SplitTypeEnum newValue = (SplitTypeEnum) val;
                band.setSplitType(newValue);
                ObjectPropertyUndoableEdit urob = new ObjectPropertyUndoableEdit(band, "SplitType", SplitTypeEnum.class, oldValue, newValue);
                IReportManager.getInstance().addUndoableEdit(urob);
            }
        }
 

开发者ID:JockiHendry,
项目名称:ireport-fork,
代码行数:18,
代码来源:BandNode.java

示例14: setSplitType

点赞 2

import net.sf.jasperreports.engine.type.SplitTypeEnum; //导入依赖的package包/类
@Override
public void setSplitType(SplitTypeEnum splitTypeValue)
{
	SplitTypeEnum old = this.splitTypeValue;
	this.splitTypeValue = splitTypeValue;
	getEventSupport().firePropertyChange(JRBaseBand.PROPERTY_splitType, old, this.splitTypeValue);
}
 

开发者ID:TIBCOSoftware,
项目名称:jasperreports,
代码行数:8,
代码来源:JRBaseBand.java

示例15: createObject

点赞 2

import net.sf.jasperreports.engine.type.SplitTypeEnum; //导入依赖的package包/类
@Override
public Object createObject(Attributes atts)
{
	JRDesignBand band = new JRDesignBand();
	
	String height = atts.getValue(JRXmlConstants.ATTRIBUTE_height);
	if (height != null && height.length() > 0)
	{
		band.setHeight(Integer.parseInt(height));
	}

	String isSplitAllowed = atts.getValue(JRXmlConstants.ATTRIBUTE_isSplitAllowed);
	if (isSplitAllowed != null && isSplitAllowed.length() > 0)
	{
		if (log.isWarnEnabled())
		{
			log.warn("The 'isSplitAllowed' attribute is deprecated. Use the 'splitType' attribute instead.");
		}
			
		if (Boolean.valueOf(isSplitAllowed).booleanValue())
		{
			band.setSplitType(SplitTypeEnum.STRETCH);
		}
		else
		{
			band.setSplitType(SplitTypeEnum.PREVENT);
		}
	}

	SplitTypeEnum splitType = SplitTypeEnum.getByName(atts.getValue(JRXmlConstants.ATTRIBUTE_splitType));
	if (splitType != null)
	{
		band.setSplitType(splitType);
	}

	return band;
}
 

开发者ID:TIBCOSoftware,
项目名称:jasperreports,
代码行数:38,
代码来源:JRBandFactory.java

示例16: writeBand

点赞 2

import net.sf.jasperreports.engine.type.SplitTypeEnum; //导入依赖的package包/类
/**
 *
 */
private void writeBand(JRBand band) throws IOException
{
	writer.startElement(JRXmlConstants.ELEMENT_band);
	writer.addAttributePositive(JRXmlConstants.ATTRIBUTE_height, band.getHeight());
	if(isNewerVersionOrEqual(JRConstants.VERSION_3_5_2))
	{
		writer.addAttribute(JRXmlConstants.ATTRIBUTE_splitType, band.getSplitTypeValue());
	}
	else
	{
		writer.addAttribute(JRXmlConstants.ATTRIBUTE_isSplitAllowed, band.getSplitTypeValue() != SplitTypeEnum.PREVENT, true);
	}

	if(isNewerVersionOrEqual(JRConstants.VERSION_4_8_0))
	{
		writeProperties(band);
	}
	writeExpression(JRXmlConstants.ELEMENT_printWhenExpression, band.getPrintWhenExpression(), false);
	
	writeChildElements(band);

	if (isNewerVersionOrEqual(JRConstants.VERSION_6_1_1))
	{
		List<ExpressionReturnValue> returnValues = band.getReturnValues();
		if (returnValues != null && !returnValues.isEmpty())
		{
			for (ExpressionReturnValue returnValue : returnValues)
			{
				writeReturnValue(returnValue);
			}
		}
	}
	
	writer.closeElement();
}
 

开发者ID:TIBCOSoftware,
项目名称:jasperreports,
代码行数:39,
代码来源:JRXmlWriter.java

示例17: createPropertyDescriptors

点赞 2

import net.sf.jasperreports.engine.type.SplitTypeEnum; //导入依赖的package包/类
/**
 * Creates the property descriptors.
 * 
 * @param desc
 *          the desc
 */
@Override
public void createPropertyDescriptors(List<IPropertyDescriptor> desc, Map<String, Object> defaultsMap) {
	PixelPropertyDescriptor heightD = new PixelPropertyDescriptor(JRDesignBand.PROPERTY_HEIGHT, Messages.common_height);
	heightD.setDescription(Messages.MBand_height_description);
	desc.add(heightD);

	splitStyleD = new JSSEnumPropertyDescriptor(JRDesignBand.PROPERTY_SPLIT_TYPE, Messages.common_split_type,
			SplitTypeEnum.class, NullEnum.NULL);
	splitStyleD.setDescription(Messages.MBand_split_type_dscription);
	desc.add(splitStyleD);
	splitStyleD.setHelpRefBuilder(new HelpReferenceBuilder(
			"net.sf.jasperreports.doc/docs/schema.reference.html?cp=0_1#band_splitType")); //$NON-NLS-1$

	JRExpressionPropertyDescriptor printWhenExpD = new JRExpressionPropertyDescriptor(
			JRDesignBand.PROPERTY_PRINT_WHEN_EXPRESSION, Messages.common_print_when_expression);
	printWhenExpD.setDescription(Messages.MBand_print_when_expression_description);
	desc.add(printWhenExpD);

	printWhenExpD.setHelpRefBuilder(new HelpReferenceBuilder(
			"net.sf.jasperreports.doc/docs/schema.reference.html?cp=0_1#printWhenExpression")); //$NON-NLS-1$

	JPropertiesPropertyDescriptor propertiesMapD = new JPropertiesPropertyDescriptor(MGraphicElement.PROPERTY_MAP,
			Messages.common_properties);
	propertiesMapD.setDescription(Messages.common_properties);
	desc.add(propertiesMapD);

	defaultsMap.put(JRDesignBand.PROPERTY_HEIGHT, CONST_HEIGHT);
	defaultsMap.put(JRDesignBand.PROPERTY_SPLIT_TYPE, null);
	defaultsMap.put(JRDesignBand.PROPERTY_PRINT_WHEN_EXPRESSION, null);

	setHelpPrefix(desc, "net.sf.jasperreports.doc/docs/schema.reference.html?cp=0_1#band"); //$NON-NLS-1$
}
 

开发者ID:OpenSoftwareSolutions,
项目名称:PDFReporter-Studio,
代码行数:39,
代码来源:MBand.java

示例18: getPropertyEditor

点赞 2

import net.sf.jasperreports.engine.type.SplitTypeEnum; //导入依赖的package包/类
@Override
@SuppressWarnings(value = "unchecked")
public PropertyEditor getPropertyEditor() {
    if (editor == null) {
        ArrayList l = new ArrayList();
        l.add(new Tag(null, "<Default>"));
        l.add(new Tag(SplitTypeEnum.IMMEDIATE, I18n.getString("band.property.splitType.immediate")));
        l.add(new Tag(SplitTypeEnum.PREVENT, I18n.getString("band.property.splitType.prevent")));
        l.add(new Tag(SplitTypeEnum.STRETCH, I18n.getString("band.property.splitType.stretch")));
        editor = new ComboBoxPropertyEditor(false, l);
    }
    return editor;
}
 

开发者ID:JockiHendry,
项目名称:ireport-fork,
代码行数:14,
代码来源:BandNode.java

示例19: getSplitTypeValue

点赞 2

import net.sf.jasperreports.engine.type.SplitTypeEnum; //导入依赖的package包/类
@Override
public SplitTypeEnum getSplitTypeValue()
{
	return splitTypeValue;
}
 

开发者ID:TIBCOSoftware,
项目名称:jasperreports,
代码行数:6,
代码来源:JRBaseBand.java

示例20: JRFillBand

点赞 2

import net.sf.jasperreports.engine.type.SplitTypeEnum; //导入依赖的package包/类
/**
 *
 */
protected JRFillBand(
	JRBaseFiller filler,
	JRBand band,
	JRFillObjectFactory factory
	)
{
	super(filler, band, factory);

	parent = band;
	
	// we need to do this before setBand()
	returnValuesSet = new LinkedHashSet<FillReturnValues>();

	if (deepElements.length > 0)
	{
		for(int i = 0; i < deepElements.length; i++)
		{
			deepElements[i].setBand(this);
		}
	}

	List<ExpressionReturnValue> expRetValues = getReturnValues();
	returnValues = 
		new FillReturnValues(
			expRetValues == null ? null : (ExpressionReturnValue[]) expRetValues.toArray(new ExpressionReturnValue[expRetValues.size()]), //FIXMERETURN make special class for constructor differentiation
			factory, 
			filler
			);
	registerReturnValues(returnValues);
	
	splitType = (parent == null ? null : parent.getSplitTypeValue());
	if (splitType == null)
	{
		splitType = 
			SplitTypeEnum.getByName(
				filler.getPropertiesUtil().getProperty(filler.getMainDataset(), JRBand.PROPERTY_SPLIT_TYPE)
				);
	}
	
	breakHeight = getHeight();
	if (
		SplitTypeEnum.IMMEDIATE == getSplitTypeValue()
		&& elements != null && elements.length > 0
		)
	{
		for(int i = 0; i < elements.length; i++)
		{
			JRElement element = elements[i];
			int bottom = element.getY() + element.getHeight();
			breakHeight = bottom < breakHeight ? bottom : breakHeight;
		}
	}

	initElements();

	initConditionalStyles();

	nowEvaluationTimes = new HashSet<JREvaluationTime>();
}
 

开发者ID:TIBCOSoftware,
项目名称:jasperreports,
代码行数:63,
代码来源:JRFillBand.java

示例21: getSplitTypeValue

点赞 2

import net.sf.jasperreports.engine.type.SplitTypeEnum; //导入依赖的package包/类
@Override
public SplitTypeEnum getSplitTypeValue()
{
	return splitType;
}
 

开发者ID:TIBCOSoftware,
项目名称:jasperreports,
代码行数:6,
代码来源:JRFillBand.java

示例22: setSplitType

点赞 2

import net.sf.jasperreports.engine.type.SplitTypeEnum; //导入依赖的package包/类
@Override
public void setSplitType(SplitTypeEnum splitType)
{
	throw new UnsupportedOperationException();
}
 

开发者ID:TIBCOSoftware,
项目名称:jasperreports,
代码行数:6,
代码来源:JRFillBand.java

示例23: isSplitPrevented

点赞 2

import net.sf.jasperreports.engine.type.SplitTypeEnum; //导入依赖的package包/类
/**
 *
 */
protected boolean isSplitPrevented()
{
	return SplitTypeEnum.PREVENT == getSplitTypeValue();
}
 

开发者ID:TIBCOSoftware,
项目名称:jasperreports,
代码行数:8,
代码来源:JRFillBand.java

示例24: addSummaryGroup

点赞 2

import net.sf.jasperreports.engine.type.SplitTypeEnum; //导入依赖的package包/类
protected void addSummaryGroup(List<FillColumn> fillColumns)
{
	JRDesignGroup summaryGroup = new JRDesignGroup();
	summaryGroup.setName(SUMMARY_GROUP_NAME);//TODO check for uniqueness
	
	JRDesignBand groupFooter = new JRDesignBand();
	groupFooter.setSplitType(SplitTypeEnum.PREVENT);
	groupFooter.setHeight(pageFooter.getHeight());
	
	// we need to put everything in a frame so that we can tell the frame
	// not to print when there are no detail bands on the current page
	// 
	// we can't do that directly to the band since its print when expression
	// is evaluated too soon
	JRDesignFrame footerFrame = new JRDesignFrame();
	UUID uuid = DigestUtils.instance().deriveUUID(
			fillContext.getComponentElement().getUUID(), 
			BandTypeEnum.GROUP_FOOTER + "-" + SUMMARY_GROUP_NAME);
	footerFrame.setUUID(uuid);
	footerFrame.setX(0);
	footerFrame.setY(0);
	footerFrame.setWidth(computeTableWidth(fillColumns));
	footerFrame.setHeight(pageFooter.getHeight());
	footerFrame.getLineBox().setPadding(0);
	footerFrame.getLineBox().getPen().setLineWidth(0f);
	footerFrame.setRemoveLineWhenBlank(true);
	
	JRDesignExpression footerPrintWhen = builtinEvaluatorFactory.createExpression(new SummaryGroupFooterPrintWhenEvaluator());
	footerFrame.setPrintWhenExpression(footerPrintWhen);
	
	// clone the contents of the page footer in the frame
	List<JRChild> footerElements = pageFooter.getChildren();
	for (Iterator<JRChild> iterator = footerElements.iterator(); iterator
			.hasNext();)
	{
		JRChild child = iterator.next();
		JRChild childClone = (JRChild) child.clone(footerFrame);
		if (childClone instanceof JRElement)
		{
			footerFrame.addElement((JRElement) childClone);
		}
		else if (childClone instanceof JRElementGroup)
		{
			footerFrame.addElementGroup((JRElementGroup) childClone);
		}
		else
		{
			throw 
				new JRRuntimeException(
					EXCEPTION_MESSAGE_KEY_UNKNOWN_CHILD_TYPE,  
					new Object[]{childClone.getClass().getName()} 
					);
		}
	}
	
	groupFooter.addElement(footerFrame);
	((JRDesignSection) summaryGroup.getGroupFooterSection()).addBand(groupFooter);
	
	mainDataset.addScriptlet(TABLE_SCRIPTLET_NAME, TableReportScriptlet.class);
	mainDataset.addFirstGroup(summaryGroup);
}
 

开发者ID:TIBCOSoftware,
项目名称:jasperreports,
代码行数:62,
代码来源:TableReport.java

示例25: getSplitTypeValue

点赞 1

import net.sf.jasperreports.engine.type.SplitTypeEnum; //导入依赖的package包/类
/**
 * Specifies the band split behavior.
 */
public SplitTypeEnum getSplitTypeValue();
 

开发者ID:TIBCOSoftware,
项目名称:jasperreports,
代码行数:5,
代码来源:JRBand.java

示例26: setSplitType

点赞 1

import net.sf.jasperreports.engine.type.SplitTypeEnum; //导入依赖的package包/类
/**
 *
 */
public void setSplitType(SplitTypeEnum splitType);
 

开发者ID:TIBCOSoftware,
项目名称:jasperreports,
代码行数:5,
代码来源:JRBand.java


版权声明:本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系管理员进行删除。
喜欢 (0)